1

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?

Jim
  • 4,910
  • 4
  • 32
  • 50
  • 1
    See [this GitHub issue](https://github.com/Microsoft/msbuild/issues/2460) that links to this question – Martin Ullrich Aug 22 '17 at 04:18
  • Possible duplicate of [Microsoft.CSharp.Core.targets missing](https://stackoverflow.com/questions/47260114/microsoft-csharp-core-targets-missing) – kenorb Sep 18 '18 at 14:35

1 Answers1

2

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.

Jim
  • 4,910
  • 4
  • 32
  • 50
  • 1
    thanks for sharing your solution here, you could mark it as the answer, so it could help other community members who get the same issues. BTW, why you install the team explorer? I guess you should already installed the Visual Studio 2017? AFAIK, the team explorer ship as a part of Visual Studio, we do not need to install it when we have the VS installed. – Leo Liu Aug 21 '17 at 02:26
  • 1
    There was a [GitHub issue](https://github.com/Microsoft/msbuild/issues/2460) opened so I wouldn't mark it as answer yet or update in the future.. – Martin Ullrich Aug 22 '17 at 04:18
  • @Leo-MSFT, I installed Team Explorer to get the TeamFoundation assemblies I needed for writing custom console app to query TFS 2010, which worked, Also our company wants to test installing Team Explorer for non-developers and I installed it as a test but my main reason was the TFS client assemblies for the API. – Jim Aug 22 '17 at 13:18
  • I'll mark it as the answer until a better solution comes along. – Jim Aug 22 '17 at 13:19