microsoft / MSBuildSdks

MSBuild project SDKs
MIT License
459 stars 81 forks source link

Suppress package dependencies in msbuild sdk packages #436

Closed ViktorHofer closed 1 year ago

ViktorHofer commented 1 year ago

Fixes https://github.com/microsoft/MSBuildSdks/issues/431

Unrelated question: Why do the Traversal and the NoTargets projects target net40?

jeffkl commented 1 year ago

Unrelated question: Why do the Traversal and the NoTargets projects target net40?

In order to load the projects in Visual Studio, you need to specify a target framework. I think at the time I just picked the lowest one? The target framework shouldn't be used anywhere so it could probably be anything.

ViktorHofer commented 1 year ago

In order to load the projects in Visual Studio, you need to specify a target framework. I think at the time I just picked the lowest one? The target framework shouldn't be used anywhere so it could probably be anything.

Sorry, I should have elaborated. I meant the build target framework in this repository for the projects: <TargetFrameworks>net40;netstandard2.0</TargetFrameworks>.

jeffkl commented 1 year ago

Oh I think it so we can run tests against multiple frameworks. net40 and netstandard2.0 are the most compatible with runtime frameworks:

https://github.com/microsoft/MSBuildSdks/blob/main/src/CentralPackageVersions.UnitTests/Microsoft.Build.CentralPackageVersions.UnitTests.csproj#L3