-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Create a NuGet package containing the MSBuild runtime #1039
Comments
I copied most of the <file /> items from the existing NUSPEC and was able to add in the "shim" ones for full framework only. Fixes dotnet#1039 and dotnet#882
I copied most of the <file /> items from the existing NUSPEC and was able to add in the "shim" ones for full framework only. Fixes dotnet#1039 and dotnet#882
I copied most of the <file /> items from the existing NUSPEC and was able to add in the "shim" ones for full framework only. Fixes dotnet#1039 and dotnet#882
I see it's not mentioned above, but was consideration given to the scenario of a DotNetCli tools that need to evaluate a project? e.g. ASP.NET CLI tools |
Yes sorry we consider in-process builds and project evaluation to be the same thing. So any tool that wants to evaluate a project should be able to reference this package and do project evaluation. I've tested it out and it works for very basic scenarios. You must have all of the imports available so we'll probably need to work with other teams to ensure they have packages available for users to reference so that then end up with everything needed to evaluate and build projects. I have updated the design above to mention project evaluation. |
Ok thanks for clarifying. |
I see the PR was merged. Should this be closed at some point? |
Yeah sorry I was leaving it open while I did some more testing. I'll close it for now. |
Out of curiosity, is this published anywhere yet? I didn't see it in the dotnet-buildtools feed. |
@jeffkl which feed is the "Microsoft.Build.Runtime" package pushed to? |
Sorry I'm fixing the versioning of the package and then I'll be publishing it. We had done some work in |
I have pushed the runtime package to our MSBuild MyGet feed: https://dotnet.myget.org/feed/msbuild/package/nuget/Microsoft.Build.Runtime/15.1.262-preview5 I'll work on getting daily builds pushed there. Let me know if you have any issues with the package. |
I'm going to try the package shortly. Should this be uploaded to https://dotnet.myget.org/gallery/dotnet-buildtools? That's where we're currently grabbing MSBuild packages from. |
@DustinCampbell by request of the CLI team, we're moving away from the build-tools feed into our own. Unfortunately, right now we're in an awkward transition phase where you might need both. |
Sounds good. I just wanted to check. I have no worries about changing feeds. |
So far, I've been unable to successfully add a dependency on this package. It sends OmniSharp restore into fits: |
Just switching the feed without moving to the new package results in all manner of package downgrades, such as System.Collections from 4.0.11 to 4.0.11-rc3-24128-00 |
We need a NuGet package that customers can reference to load projects and evaluate properties/items or do in-proc builds.
Proposal
Create a new package containing the
.props
,.targets
, and.tasks
files needed for evaluating projects. This will supersede theMicrosoft.Build.Targets' and
MSBuild` packages which we will deprecate.The new package,
Microsoft.Build.Runtime
will have the following layout:This will place what we consider to be the core MSBuild runtime into the end user's output directory.
Scenarios
.NET Core via
dotnet run
In this scenario, the CLR loads assemblies from their NuGet package location. This means that our BuildEnvironmentHelper will need to be updated to look in
AppContext.BaseDirectory
instead of the directory containingMicrosoft.Build.dll
..NET Core via
dotnet publish
This command places all dependencies in a folder named 'publish' and when running an application from this folder, the assemblies are loaded from that directory. The
AppContext.BaseDirectory
is still the correct place to use as MSBuild directory..NET Framework via building against net46
NuGet copies all of the referenced assemblies and content files to the output directory. The
BuildEnvironmentHelper
can remain the same for this scenario and use the directory containingMicrosoft.Build.dll
as the MSBuild directory.Visual Studio
The
BuildEnvironmentHelper
already looks for the MSBuild directory based on the process name beingdevenv.exe
or theVSINSTALLDIR
environment variable. This means that extensions within Visual Studio or the Visual Studio Developer Command Prompt will use the MSBuild that ships with Visual Studio and won't need to redistribute the MSBuild runtime.In-proc builds and project evaluation
Not everything will work when building or evaluating projects. This is because some build logic comes from various teams. This includes building Azure cloud projects, C++ projects, FSharp, etc. These teams will need to provide a package that users can reference along with the
Microsoft.Build.Runtime
package that will give them all of the required functionality to evaluate or build their projects.Tasks
BuildEnvironmentHelper
to look inAppContext.BaseDirectory
for .NET Core (Update BuildEnvironmentHelper to locate .NET Core app directory #1069).nuspec
that will package up the intended.props
,.targets
, and.tasks
as well asMSBuild.exe
(NuGet package containing the MSBuild runtime #1080)Related issues
This new package should fix the following issues:
It is also related to:
The text was updated successfully, but these errors were encountered: