1
votes

I installed the VS 2017 TeamExplorer which added a separate VS 2017 install folder. Now when I try to build a nuget package, I get an error saying

The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\TeamExplorer\MSBuild\15.0\bin\Roslyn\Microsoft.CSharp.Core.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk. C:\Program Files (x86)\Microsoft Visual Studio\2017\TeamExplorer\MSBuild\15.0\bin\Microsoft.CSha rp.CurrentVersion.targets

So it appears now it is trying to use MSBuild from the TeamExplorer install path instead of the Enterprise path.

MSBuild auto-detection: using msbuild version '15.3.409.57025' from 'C:\Program Files (x86)\Microsoft Visual Studio\2017\TeamExplorer\MSBuild\15.0\bin'.

Is there a way to make the original path (Enterprise) the default for MSBuild?

1
See this GitHub issue that links to this questionMartin Ullrich
Possible duplicate of Microsoft.CSharp.Core.targets missingkenorb

1 Answers

2
votes

UPDATE I will mark this as the answer until a better solution comes along!


This isn't a GOOD answer but I uninstalled the VS 2017 Team Explorer and it now works properly. I still would like to know how we can control this.