Build/Test Issues

VS2017 Version 3.5.0.1 Microsoft.CSharp.Core.Targets

Started by damiga on 8,445 views

Any suggestions how to solve this..?

..\..\..\..\..\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.CSharp.Core.targets (71, 5): The specified task executable "csc.exe" could not be run. Could not load file or assembly 'System.Security.Cryptography.Primitives, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Hi, thanks for sharing this problem.

I'll need to some more information to try and understand what is happening here.

Do you receive this for all projects on your machine? If you set up a new dummy empty project, does it happen?

Is this for .NET Core projects, or standard .NET projects, or both?
It happens for standard .NET projects, even if i setup a dummy project.

NCrunch: If you are experiencing problems in getting this project to build, have a look at http://www.ncrunch.net/documentation/troubleshooting_project-build-issues
..\..\..\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.CSharp.Core.targets (71, 5): The specified task executable "csc.exe" could not be run. Could not load file or assembly 'System.Security.Cryptography.Primitives, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Thanks for this extra information. This must be something related to the setup of your environment.

Do you have multiple versions of VS2017 installed? Can you confirm that you're using the latest update of VS2017?

Something else that could be revealing. Under the NCrunch Tests Window, right click on your failed build, then go to Advanced->Browse to workspace. Find the generated .csproj file.

Then try running MSBuild (usually C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\msbuild.exe) over this file. Does it build successfully?
I've had another user report this same problem. They were running VS2017 RC, and upgrading to VS2017 RTM apparently solved the problem for them.

For anyone else that hits this issue and is running VS2017 RC, try upgrading to RTM.

Post a reply

Log in to reply.