The root problem seems to be in the version of Newtonsoft.json – if you set it to version 11.0.1 all of the problems magically disappear
The root problem seems to be in the version of Newtonsoft.json – if you set it to version 11.0.1 all of the problems magically disappear
After much searching and repair, I could not find a good way – the error does seem to be documented on Github – so at least there’s that.
My solution to the problem, after trying several other ways, was to downgrade Visual Studio as described here – note – you really do have to run all of the cleanup tools.
UPDATE ON 09/21/2018 – this fixes the problem – thank you Stack Overflow User.
Update on 05/02/2019 – this affects Visual Studio 2019 as well – one thing to note, this is the path to the new file
C:\Users\WarHorse\AppData\Local\Microsoft\VisualStudio\16.0_181cd91f
Copy and paste this
<dependentAssembly>
<assemblyIdentity name=”System.Management.Automation” publicKeyToken=”31bf3856ad364e35″ />
<bindingRedirect oldVersion=”0.0.0.0-3.0.0.0″ newVersion=”3.0.0.0″/>
<publisherPolicy apply=”no” />
</dependentAssembly>
There are two things:
1. Just insert this code in the web.release.config
<system.webServer xdt:Transform=”Insert”>
<rewrite>
<rules>
<rule name=”Force HTTPS” enabled=”true”>
<match url=”(.*)” ignoreCase=”false” />
<conditions>
<add input=”{HTTPS}” pattern=”off” />
</conditions>
<action type=”Redirect” url=”https://{HTTP_HOST}/{R:1}” appendQueryString=”true” redirectType=”Permanent” />
</rule>
</rules>
</rewrite>
</system.webServer>
2. Then make sure that the Url Rewrite module is installed in IIS – if that module is not installed you will get perplexing, unhelpful error messages
Just restart the app pool and the problem goes away.
So – you’re getting the following problem
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(3763) : Error in type “System.Management.Automation.FormatViewDefinition”: Exception: The getter method should be public, non void, static, and have one parameter of type PSObject.
For some reason this just started happening after the last Visual Studio 2017 update
Update – 5/29/2018 – make sure to leave VS Code open while you open Visual Studio 2017 – the problem does recur after every restart for some reason.
First – locate devenv.exe.config in the C:\Users\WarHorse\AppData\Local\Microsoft\VisualStudio\15.0_YOURIDENTIFIER directory
Open that file in VS Code
paste the following in with the other dependent assemblies
<dependentAssembly>
<assemblyIdentity name=”System.Management.Automation” publicKeyToken=”31bf3856ad364e35″ />
<publisherPolicy apply=”no” />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name=”Microsoft.PowerShell.Commands.Utility” publicKeyToken=”31bf3856ad364e35″ />
<publisherPolicy apply=”no” />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name=”Microsoft.PowerShell.ConsoleHost” publicKeyToken=”31bf3856ad364e35″ />
<publisherPolicy apply=”no” />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name=”Microsoft.PowerShell.Commands.Management” publicKeyToken=”31bf3856ad364e35″ />
<publisherPolicy apply=”no” />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name=”Microsoft.PowerShell.Security” publicKeyToken=”31bf3856ad364e35″ />
<publisherPolicy apply=”no” />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name=”Microsoft.PowerShell.Commands.Diagnostics” publicKeyToken=”31bf3856ad364e35″ />
<publisherPolicy apply=”no” />
</dependentAssembly>
I’ve been doing a little Facial Recognition lately – then came across the following error “The type initializer for ‘Emgu.CV.CvInvoke’ threw an exception.” after I deployed to azure web apps. Everything was working fine locally.
After doing more digging I realized that the actual .exe files for open cv were not being included in the web deployment – all that was necessary was to include the x86 and x64 directories in the project in the Solution Explorer in the project and presto! Everything works wonderfully.
Often times when you are using Entity Framework and trying to update objects using the handy
db.Entry(useableProperty).CurrentValues.SetValues(property);
Method you will encounter the error
InvalidOperationException: The property ‘PropertyID’ is part of the object’s key information and cannot be modified problem
After lots of thought I came across the remarkably simple answer, to wit – the PropertyID field is not being EXPLICITLY included in the object you are passing back to the controller. Just put that in a “HiddenFor and you’re all set.
So, you’re using the standard autonumeric.js jquery plugin on your html 5 site – you set up the initialization properties and nothing happens – what is wrong?
First check to make sure that your textbox is of type “text” and not type “number” – that threw me for about ten minutes today.
The problem – I was working on a project that required frames – and I was trying to pass a querystring value to the frameset, as in /FramePage/?page=/SomePageOffSite.aspx – my first thought was to just pass the url of one of the frames to the frameset page as a string. I made the model for the view a string and attempted to pass it via the usual way in the controller, i.e.
return View(“MyFramedInPage.aspx”);
My thought was that I could just use the Model property as the url, as in
frame src=”@Model” name=”main” noresize scrolling=”auto” marginheight=”0″ marginwidth=”0″
However, whenever I did that MVC would try to find a view with the url of the string (in this case SomePageOffSite.aspx – which did not exist) I was passing in the model. I eventually figured it out – there is a feature I never use on return View – to wit – you can redirect it to another view simply by passing in the view name (I always used the redirect option) – therefore you can’t ever use a model as a string. Lesson learned.
I recently had this problem when working with an older site – I fixed it by changing the AppPool Managed Pipeline mode to “Classic”.
Why that worked I had no idea, but work it did!
Copyright 2011 Digital Tool Factory. All Rights Reserved. Powered by raw technical talent. And in this case, WordPress.