When use the DotNet.ReproducibleBuilds.Isolated SDK in .NET Framework project, it is incompatible with central package version management because it uses the Version attribute in the <PackageReference>.
error NU1008: Projects that use central package version management should not define the version on the PackageReference items but on the PackageVersion items: Microsoft.NETFramework.ReferenceAssemblies.
Workaround
Manually reference the Microsoft.NETFramework.ReferenceAssemblies package and define its version in <PackageVersion>.
If central package version management is enabled, use the <PackageVersion> element to specify the version of the Microsoft.NETFramework.ReferenceAssemblies package.
Abstract
When use the
DotNet.ReproducibleBuilds.Isolated
SDK in .NET Framework project, it is incompatible with central package version management because it uses theVersion
attribute in the<PackageReference>
.Repro Steps
git clone https://github.com/aetos382/reproducible-builds-issue-report.git
cd reproducible-builds-issue-report
dotnet build
Expected behavior
No error
Actual behavior
Workaround
Manually reference the
Microsoft.NETFramework.ReferenceAssemblies
package and define its version in<PackageVersion>
.Directory.Build.props
Directory.Packages.props
Suggestions for improvement
If central package version management is enabled, use the
<PackageVersion>
element to specify the version of theMicrosoft.NETFramework.ReferenceAssemblies
package.Sdk.targets
UPDATE: I've submitted PR #20.
Environment