-
Notifications
You must be signed in to change notification settings - Fork 122
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
Use csproj as pack input instead of nuspec #1119
Use csproj as pack input instead of nuspec #1119
Conversation
c4c0f00
to
13aebe2
Compare
Does the team intend to keep publishing sourcelink NuGet packages for use with older SDKs? |
13aebe2
to
b117671
Compare
I'm not the owner of sourcelink but AFAIK yes and this PR doesn't change that. The .NET 9 source link packages will work on all the officially supported MSBuild flavours and supported runtimes. |
4fb3860
to
b117671
Compare
Unfortunately I can't reproduce the failures locally: |
Example of the usage of NetToolMinimum: dotnet/sourcelink#1119
c575a10
to
42c31c5
Compare
cc @tmat |
@davidwengier can you take a look at this? |
src/Microsoft.Build.Tasks.Git/build/Microsoft.Build.Tasks.Git.props
Outdated
Show resolved
Hide resolved
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.
We should avoid including the TFM in the tools
package path. It makes things unnecessarily complicated.
a8489fb
to
481ba16
Compare
I finally found time to continue to work on this. @tmat, please take a look. I used the same approach that we came up with in arcade for build task projects. Btw, it would be good to switch this repository to Central Package Management with a future change. |
aa1832b
to
90685b6
Compare
Now that sourcelink is a native part of the .NET SDK, Arcade doesn't bring sourcelink packages in anymore. Now that the cyclic package dependency is avoided, these projects don't need to use nuspecs anymore. This removes custom infrastructure and allows better source build controls. I diffed the produced packages and the content in the .NETCoreApp folder is identical (a deps.json file is added but that's recommended by msbuild for build tasks these days). The .NET Framework output is significantly different as it now includes all dependencies that aren't supplied by the MSBuild inside Visual Studio.
90685b6
to
c056a87
Compare
Would you mind listing the differences? |
src/Microsoft.Build.Tasks.Git/buildTransitive/Microsoft.Build.Tasks.Git.props
Show resolved
Hide resolved
Sure. I will post the nuspec diffs next week. |
@tmat now I really finally got to finishing this PR. I just diffed the package contents before and after this change and noticed a bug that resulted in assemblies being copied into the package layout unnecessarily. This is now fixed and the diff doesn't show any unexpected changes. The expected ones are:
Example files diff:(Ignore the package, _rels folder and the ContentType.xml file -> those are things that NuGet creates automatically) Example nuspec diff: |
@tmat when you are back from holiday, please take a look. Thanks in advance. |
@tmat gentle ping |
@@ -0,0 +1,112 @@ | |||
<!-- Copied from arcade with small modifications. --> |
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.
It'd be nice to share this rather than making a copy.
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.
The msbuild team is working on an epic to make msbuild plugin (task) development easier: dotnet/msbuild#10733
That will replace all this when it gets implemented (planned for .NET 10).
@tmat PTAL |
gentle ping @tmat |
Now that sourcelink is a native part of the .NET SDK, Arcade doesn't bring sourcelink packages in anymore. Now that the cyclic package dependency is avoided, these projects don't need to use nuspecs anymore.
This removes custom infrastructure and hacks, and allows better source build controls.
I diffed the produced packages and the content is identical (a deps.json file is added but that's recommended by msbuild for build tasks these days).