-
Notifications
You must be signed in to change notification settings - Fork 734
Projects no longer rely on runtime assets from Microsoft.Build.* packages #4761
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
Conversation
src/NuGet.Core/NuGet.CommandLine.XPlat/NuGet.CommandLine.XPlat.csproj
Outdated
Show resolved
Hide resolved
| /lib:$(PkgMicrosoft_Build_Utilities_Core)\lib\netstandard2.0 ^ | ||
| /lib:$(PkgMicrosoft_Build_Tasks_Core)\lib\netstandard2.0 ^ | ||
| /lib:$(PkgMicrosoft_Build_Framework)\lib\netstandard2.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ILMerge must be pointed to the MSBuild assemblies when using .NET Core.
| <PackageReference Include="Microsoft.Build.Framework" ExcludeAssets="runtime" GeneratePathProperty="true" /> | ||
| <PackageReference Include="Microsoft.Build.Tasks.Core" ExcludeAssets="runtime" GeneratePathProperty="true" /> | ||
| <PackageReference Include="Microsoft.Build.Utilities.Core" ExcludeAssets="runtime" GeneratePathProperty="true" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GeneratePathProperty required here due to the ILMerge used later.
src/NuGet.Core/NuGet.CommandLine.XPlat/NuGet.CommandLine.XPlat.csproj
Outdated
Show resolved
Hide resolved
dominoFire
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. If MSBuild.Locator assembly is causing trouble, we will know at dotnet insertion time.
|
This PR has been automatically marked as stale because it has no activity for 7 days. It will be closed if no further activity occurs within another 7 days of this comment. If it is closed, you may reopen it anytime when you're ready again, as long as you don't delete the branch. |
2e6f74b to
7951f94
Compare
|
@donnie-msft I just want to make sure my comment #4761 (comment) isn't missed. It's not only about whether the compiler adds a reference to msbuild locator dll in our assembly, but also whether our package lists the locator as a dependency when it's inserted int he .NET SDK. I think we should re-instate the condition, so our package doesn't have a dependency on MSBuild Locator. |
@zivkan I created a meeting for next week so we can discuss this with @jeffkl. Also replied in the other thread: #4761 (comment) |
….csproj Co-authored-by: Nikolche Kolev <[email protected]>
7951f94 to
52a0615
Compare
Bug
Fixes: https://github.com/NuGet/Client.Engineering/issues/1816
Regression? Last working version:
Description
Similar to #4751, MSBuild does not support runtime scenarios where the
Microsoft.BuildDLL is placed in an output directory.See https://docs.microsoft.com/en-us/visualstudio/msbuild/updating-an-existing-application?view=vs-2022#use-nuget-packages-preferred
PackageReferencecannot have use the Condition on Configuration property, I removed it, knowing that the compiler will trim unused references.IlmergeCommandhad to be pointed to the NET Framework path when running from .NET Core, because its behavior is to look for assemblies in the specified paths. Now that I've removed MSBuild's runtime assembly, it needs to know where to look.GeneratePathPropertyis a pretty cool feature, which enables me to do this :) Thanks @jeffkl !PR Checklist
PR has a meaningful title
PR has a linked issue.
Described changes
Tests
Documentation