PackageReference defined in .props file not appearing in project.assets.json when using dotnet restore #9132
Labels
Functionality:Restore
Resolution:ByDesign
This issue appears to be ByDesign
Resolution:Duplicate
This issue appears to be a Duplicate of another issue
Style:PackageReference
I have a
tools.props
file which contains somePackageReference
's. When I import the file into a.csproj
either via<Import Project="tools.props" />
or via a NuGet package where to 'tools.propsfile in packed into the
buildfolder, then all dependencies defined in the
.propsare not appearing in
project.assets.json`.The funny thing is, that when using VS 2019 and build it, then everything works and
project.assets.json
created correctly.But when using
dotnet restore
command ormsbuild /t:restore
the dependency are not itproject.assets.json
.tools.props
When I define the
ItemGroup
directly in the.csproj
and not in the.props
file, then it works aswell.Why is the behavoir differnent in VS than in msbuild or dotnet restore?
Is there a hint, flag, property to pass, they dotnet restore should handle those package references same as they would be directly defined in the csproj?
The text was updated successfully, but these errors were encountered: