-
Notifications
You must be signed in to change notification settings - Fork 360
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
State of dotnet/arcade's NuGet dependencies: how to use NuGet.Packaging in a new build task #6014
Comments
Today, in Arcade, the above workaround means that if you need to use NuGet.Packaging, you use the one that comes with the dotnet sdk instead of whatever your package specified. if you needed a newer version of NuGet.Packaging, you'd have to update the dotnet sdk that you're running on. Is that sufficient? Last I heard, I thought there was an option to ease the version matching for assembly loading, but yeah, Rainer would probably know better and if we can / should revisit this. |
Yep. (For source-build in particular, we actually directly compile against the SDK's DLLs to avoid having to deal with maintaining dependency versions that match what the SDK happens to include. But tightly binding with a specific SDK's DLLs is only reasonable because we don't distribute our task DLLs.) A concern is that if I add a usage of a NuGet |
After the sleet removal, we should be able to remove a long standing workound that required that the arcade SDK load a very old version on NuGet.Versioning because of a conflicting dependency with sleet. I have unified the references under NuGet.Packaging's version, so that source-build can properly override the NuGet version. The relevant issues around the old workaround are dotnet#6014 and dotnet#1965
After the sleet removal, we should be able to remove a long standing workound that required that the arcade SDK load a very old version on NuGet.Versioning because of a conflicting dependency with sleet. I have unified the references under NuGet.Packaging's version, so that source-build can properly override the NuGet version. The relevant issues around the old workaround are dotnet#6014 and dotnet#1965
After the sleet removal, we should be able to remove a long standing workound that required that the arcade SDK load a very old version on NuGet.Versioning because of a conflicting dependency with sleet. I have unified the references under NuGet.Packaging's version, so that source-build can properly override the NuGet version. The relevant issues around the old workaround are #6014 and #1965
After the sleet removal, we should be able to remove a long standing workound that required that the arcade SDK load a very old version on NuGet.Versioning because of a conflicting dependency with sleet. I have unified the references under NuGet.Packaging's version, so that source-build can properly override the NuGet version. The relevant issues around the old workaround are dotnet/arcade#6014 and dotnet/arcade#1965 Original commit: dotnet/arcade@3900335 [[ commit created by automation ]]
Right now, it looks like a one-word summary of the NuGet dependencies in dotnet/arcade is "fragile"--but this is nothing new or surprising. This repo has two different versions of NuGet packages that it uses:
arcade/eng/Versions.props
Lines 40 to 41 in 1b5940f
The Arcade SDK uses only
NuGetVersioningVersion
:arcade/src/Microsoft.DotNet.Arcade.Sdk/Microsoft.DotNet.Arcade.Sdk.csproj
Line 28 in 1b5940f
NuGetVersion
shows up in other SDK projects and MSBuild extension projects, and it's used for various NuGet package IDs.There's also the long thread at #1965 that ended up with this workaround:
arcade/src/Microsoft.DotNet.Build.Tasks.Feed/Microsoft.DotNet.Build.Tasks.Feed.csproj
Lines 28 to 35 in 1b5940f
Q's
My first impression is that I shouldn't touch this at all. If I need to use
NuGet.Packaging
, instead of putting my task in the Arcade SDK, I should set up a new SDK or MSBuild extension project and use it there. Does this sound like a good precaution? For now I'm assuming it's what I have to do (and that it'll be sufficient to avoid problems...)Is this something that should be revisited/simplified? I see dotnet/msbuild#5073 (bug) is still open, but dotnet/msbuild#5086 (workaround mentioned in the comment) is closed and presumably available. However... I don't know if this only addresses the workaround target, or also the underlying fragility and two-version usage.
/cc @chcosta @rainersigwald
The text was updated successfully, but these errors were encountered: