Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

BundleResource usage fails build with CS1508 #57

Open
LeadAssimilator opened this issue Sep 19, 2023 · 7 comments
Open

BundleResource usage fails build with CS1508 #57

LeadAssimilator opened this issue Sep 19, 2023 · 7 comments

Comments

@LeadAssimilator
Copy link

LeadAssimilator commented Sep 19, 2023

XMI 16.4.0.15,.NET 6.0.201,7.0.401 w/ 0.2.0-alpha4

When building an iOS binding project targeting xamarin.ios10 with one or more BundleResource items, build fails with CS1508.

Workaround:

  <Target Name="_RemoveEmbeddedResourceDuplicates" BeforeTargets="_GenerateCompileInputs">
    <ItemGroup>
      <_DistinctEmbeddedResource Include="@(EmbeddedResource->Distinct())" />
      <EmbeddedResource Remove="@(EmbeddedResource)" />
      <EmbeddedResource Include="@(_DistinctEmbeddedResource)" />
    </ItemGroup>
  </Target>
@jonathanpeppers
Copy link
Member

Can you share a .binlog of this issue? https://aka.ms/binlog

Is something including all EmbeddedResource / BundleResource items twice?

@LeadAssimilator
Copy link
Author

_PackLibraryResources and _CreateEmbeddedResources are both adding the same items. If I omit BundleResource items then neither targets add any items to EmbeddedResource (or run, don't remember), but they both do as soon as I add BundleResource items back.

I can eventually get a binlog, but because they are still not properly sanitized it will be a while - it should be trivial to repro though in the interim.

@jonathanpeppers
Copy link
Member

Yeah, it's just not going to be a high priority for us to look at this. We mostly use this for building AndroidX libraries, and Xamarin goes out of support in May (as of now). You may need to send us a pull request, if you have an idea for a fix, thanks!

@LeadAssimilator
Copy link
Author

Yeah, but priority or not, you should still triage it at least. And that date is more than 6mos away, and will probably get pushed back (or so I hope) because net 6/7/8 are still broken in countless ways preventing migration, it is a huge amount of work to update and one dependency not being updated is all it takes to ruin everything. Having tooling to ease migration is actually pretty important which is what I thought this project was attempting to provide on the dependency front...

Here is the binlog - msbuild.zip

@jonathanpeppers
Copy link
Member

We tried to put a disclaimer on this project, just fyi:

image

@LeadAssimilator
Copy link
Author

Not fully supported sure, but BundleResource - that is pretty basic...

@jonathanpeppers
Copy link
Member

Yes, we made this primarily for Android, and I believe a contributor added Mac & iOS.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants