Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Build #336

Closed
ardalis opened this issue Jan 18, 2024 · 4 comments
Closed

Fix Build #336

ardalis opened this issue Jan 18, 2024 · 4 comments

Comments

@ardalis
Copy link
Owner

ardalis commented Jan 18, 2024

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.

@OttoHein
Copy link

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?

@canro91
Copy link
Contributor

canro91 commented Jul 1, 2024

@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 😄

@ardalis
Copy link
Owner Author

ardalis commented Jul 2, 2024

Can you send a PR, @canro91 ?

@ardalis
Copy link
Owner Author

ardalis commented Jul 8, 2024

Fixed by #352.

@ardalis ardalis closed this as completed Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants