When trying to build my project in Visual Studio I get the error “Could not load file or assembly ‘Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed’ or one of its dependencies. The system cannot find the file specified.”
I checked in the Nuget package manager and I do have a version of Newtonsoft.Json but with version 13.0.1 and I don’t know how I can install 9.0.0.0 and/or if it is even necessary.
I’m on Microsoft Visual Studio 2019 Enterprise version 16.9.3.
I’m trying to compile for the default in executable properties which should be powershell 5.
Ok. Strange. I don’t know exactly why this is happening for you but not in my test environments but I’m going to remove the depedency on NewtonSoft since i always seems to cause issues like this.
Hang tight. If you need to roll back to the previous version, you can grab it from our downloads page: Downloads - Ironman Software
I was having the same issue on 5.8.10 on Visual Studios 2019 Community and I had to roll back to PowerShellTools.5.8.6 to get it building projects again.
I’ve updated to 5.8.11 and I am now getting the following error on build.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\PowerShell Tools for Visual Studio\PowerShellProTools.targets(5,5): error : Failed to run ‘System.Linq.Enumerable+WhereEnumerableIterator`1[System.Management.Automation.Language.CommandAst]’