You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Microsoft.Sbom.Targets.csproj should set <DevelopmentDependency>true</DevelopmentDependency> so that, when dotnet add package adds the Microsoft.Sbom.Targets package to a project, the PackageReference item gets this kind of metadata by default:
DevelopmentDependency does not matter if the PackageReference is automatically added by .NET SDK as in dotnet/sdk#43151, because dotnet add package is not used in this case; but it can be useful if the package is used with an older SDK that does not do so, or perhaps if the developer wants to use a specific version of Microsoft.Sbom.Targets instead of the SDK default.
KalleOlaviNiemitalo
changed the title
[Microsoft.Sbom.Targets] DevelopmentDependency
[Microsoft.Sbom.Targets] mDevelopmentDependency
Sep 19, 2024
KalleOlaviNiemitalo
changed the title
[Microsoft.Sbom.Targets] mDevelopmentDependency
[Microsoft.Sbom.Targets] Mark as DevelopmentDependency
Sep 19, 2024
Microsoft.Sbom.Targets.csproj
should set<DevelopmentDependency>true</DevelopmentDependency>
so that, whendotnet add package
adds the Microsoft.Sbom.Targets package to a project, the PackageReference item gets this kind of metadata by default:Then, any NuGet package built from that project will not declare a dependency on Microsoft.Sbom.Targets. The DevelopmentDependency setting is documented in https://learn.microsoft.com/nuget/reference/msbuild-targets#pack-target and https://github.com/NuGet/Home/wiki/DevelopmentDependency-support-for-PackageReference.
DevelopmentDependency does not matter if the PackageReference is automatically added by .NET SDK as in dotnet/sdk#43151, because
dotnet add package
is not used in this case; but it can be useful if the package is used with an older SDK that does not do so, or perhaps if the developer wants to use a specific version of Microsoft.Sbom.Targets instead of the SDK default.Originally posted by @KalleOlaviNiemitalo in #674 (comment) and then #693 (comment)
The text was updated successfully, but these errors were encountered: