GuardClauses
GuardClauses copied to clipboard
Fix Build
I think this is due to multi-targeting.
https://github.com/ardalis/GuardClauses/actions/runs/7564844299/job/20599626486?pr=335
Need to set a value in the build - not sure where/how. Will look into it soon but this is blocking the new release going out.
The error you're encountering is thrown on line 62 of the following project you're using: https://github.com/tunnelvisionlabs/ReferenceAssemblyAnnotator/blob/master/TunnelVisionLabs.ReferenceAssemblyAnnotator/TunnelVisionLabs.ReferenceAssemblyAnnotator.targets It's not entirely clear to me why, since you set the requested property here: https://github.com/ardalis/GuardClauses/blob/main/Directory.Build.props Maybe the build process isn't picking up the latter file?
@ardalis I guess you're referring to the error message: "RA0001 There is more than one PackageDownload of Microsoft.NETCore.App.Ref"
After sneaking into other repos, I found this workaround:
<ItemGroup>
<PackageReference Include="TunnelVisionLabs.ReferenceAssemblyAnnotator" Version="1.0.0-alpha.160" PrivateAssets="all" />
<PackageDownload Include="Microsoft.NETCore.App.Ref" Version="[$(AnnotatedReferenceAssemblyVersion)]" />
<!-- ^^^^^^ -->
</ItemGroup>
<PropertyGroup>
<AnnotatedReferenceAssemblyVersion>3.1.0</AnnotatedReferenceAssemblyVersion>
</PropertyGroup>
<!-- ^^^^^^ -->
Not sure if that's the official fix. But it worked on my machine 😄
Can you send a PR, @canro91 ?
Fixed by #352.