Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing SDK when setting MSBUILD_EXE_PATH to .NET Core 3.0 MSBuild.dll #4269

Closed
bugproof opened this issue Mar 26, 2019 · 1 comment
Closed
Labels

Comments

@bugproof
Copy link

https://blog.rsuter.com/missing-sdk-when-using-the-microsoft-build-package-in-net-core/ (this fix was working until I installed .NET Core 3 SDK)

MSBuild.dll from 3.0 SDK seems to break something and the workaround doesn't work anymore.

Steps to reproduce

<PackageReference Include="Microsoft.Build" Version="15.9.20" />
<PackageReference Include="Microsoft.Build.Framework" Version="15.9.20" />
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="15.9.20" />
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="15.9.20" />
using Microsoft.Build.Definition;
using Microsoft.Build.Evaluation;

// Program.Main

Environment.SetEnvironmentVariable("MSBUILD_EXE_PATH", @"C:\Program Files\dotnet\sdk\3.0.100-preview3-010431\MSBuild.dll");
//2.2.104 works
// Environment.SetEnvironmentVariable("MSBUILD_EXE_PATH", @"C:\Program Files\dotnet\sdk\2.2.104\MSBuild.dll");
// throws exception , uncomment previous line and see that it will fix it
var project = Project.FromFile("someproject.csproj", new ProjectOptions()); 

@rainersigwald

#2532

@bugproof bugproof changed the title Missing SDK when using the Microsoft.Build package Missing SDK when setting MSBUILD_EXE_PATH to .NET Core 3.0's MSBuild.dll Mar 26, 2019
@bugproof bugproof changed the title Missing SDK when setting MSBUILD_EXE_PATH to .NET Core 3.0's MSBuild.dll Missing SDK when setting MSBUILD_EXE_PATH to .NET Core 3.0 MSBuild.dll Mar 26, 2019
@bugproof
Copy link
Author

It appears to be working again in the GA release. I'm not 100% sure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants