-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 Restore target when building with Microsoft.Build #892
Comments
Do you want this to work on a machine without MSBuild installed on it, or would it be OK if when you call the MSBuild APIs it used an installed version of MSBuild with the targets and SDK you need? |
Ultimately my tool will be run on developer and CI machines. If a requirement is to install some tools like Build Tools or dotnet CLI, I'm fine with it (it will just add a requirement to the configuration of the machine).
I have just uninstalled Build Tools 2017 RC, and the compiler from Visual Studio is now used:
Another consequence is that the "Restore" target is now working. |
Right now, the Build Tools installer doesn't have a checkbox to enable .NET Core scenarios. Ideally it would, but that will have to wait until some post-RTW release. Setting The only current ways to get the Sdk + NuGet installed in the right place relative to MSBuild is through the VS installer (for full-framework MSBuild) and through the |
…0190820.2 (dotnet#892) - Microsoft.AspNetCore.Mvc.Analyzers - 5.0.0-alpha1.19420.2 - Microsoft.AspNetCore.Mvc.Api.Analyzers - 5.0.0-alpha1.19420.2 - Microsoft.AspNetCore.Analyzers - 5.0.0-alpha1.19420.2 - Microsoft.AspNetCore.Components.Analyzers - 5.0.0-alpha1.19420.2
I'm trying to build a .NET Core csproj using directly the Microsoft.Build API. The attempt can be seen here:
https://github.com/debanne/dotnet-builder/blob/master/Builder/Program.cs
I know that there is no nuget providing the targets (until issue #300 is solved), so I configured the "MSBuildSDKsPath" environment variable as a workaround.
My problem is that MSBuild complains when building the "Restore" target with this message:
The "Build" target works correctly though if I have run first a "dotnet restore".
I see the Restore target is present in dotnet/sdk/1.0.0-rc4-004771/Nuget.targets. Is there a way to make the Microsoft.Build API use it?
The full output is in attachment:
builder_log.txt
The text was updated successfully, but these errors were encountered: