Open VasylZvarydchuk opened 2 years ago
Just out of curiosity, if you right-click the Newtonsoft.Json.dll
file, choose 'Properties' and check the 'Unblock' box, will PowerShell let you use AddType
? Note, you may need to restart your PowerShell instance.
I was able to re-produce and fix this issue by unblocking the dll; depending on your download method, Windows may have it blocked by default. Of course, this doesn't affect the LoadFile method.
Just out of curiosity, if you right-click the
Newtonsoft.Json.dll
file, choose 'Properties' and check the 'Unblock' box, will PowerShell let you useAddType
? Note, you may need to restart your PowerShell instance.I was able to re-produce and fix this issue by unblocking the dll; depending on your download method, Windows may have it blocked by default. Of course, this doesn't affect the LoadFile method.
Hi Michael, first in what tab is Unblock box located? I don't see it in my Windows 10. I guess it's applicable only if to download file from Internet. Next even if this option will work it can be used only locally and not on any machine like in Azure DevOps VM. Also, the question why the previous version worked and new one doesn't work on many machines including Azure DevOps VM and so on.
After installing the 13.0.0.1 nuget, my project is referencing version 13.0.0.0
When my app tries to run and references the dll somewhere, it crashes saying it was looking for version 13.0.0.0 but couldn't find it.
My build output DLL is 13.0.0.1
I lied, it seems the project consuming this project was the one that did not have Newtonsoft.JSON installed, so it just used some one that it found from other assemblies.
Hello, I updated
Newtonsoft.Json
library from 12.0.3 to 13.0.1 version and the following PowerShell code stopped workingfailing with error
The same error is happening if to include
Newtonsoft.Json
intoRequiredAssemblies
PowerShell module definition file or if PowerShell loads some other assembly which has a reference toNewtonsoft.Json
version 13.0.1.My PowerShell version is
The same is happening for PowerShell 7.0. Fusion logs don't show anything unfortunately. Interesting that this code works fine