microsoft / MSBuildSdks

MSBuild project SDKs
MIT License
459 stars 81 forks source link

Avoid restoring net45 targeting pack in Traversal SDK #430

Closed ViktorHofer closed 1 year ago

ViktorHofer commented 1 year ago

The NoTargets SDK already sets the AutomaticallyUseReferenceAssemblyPackages property to false but the Traversal SDK didn't. As the Traversal SDK defines a default TFM (net45), the reference assembly pack is being downloaded automatically. This shows us as a prebuild in dotnet/runtime and other repositories that build from source.

cc @NikolaMilosavljevic

ViktorHofer commented 1 year ago

@jeffkl @AndyGerlicher any idea why CI is failing? Unsure if that's related to my change as it complains about a file not found. I wouldn't expect the current Traversal tests to depend on the .NET Framework reference assemblies.

EDIT: Looks like CI just passed after a retry (?).

jeffkl commented 1 year ago

Yeah sorry that's a weird error that MSBuild throws occasionally, I haven't had time to root cause it.

ViktorHofer commented 1 year ago

Omg, sorry for that, I should have tested it locally... Thanks for the fix. After merging the change in, can we please publish a new version to nuget.org?

jeffkl commented 1 year ago

After merging the change in, can we please publish a new version to nuget.org?

Yes absolutely, I usually publish a package for every change