-
Notifications
You must be signed in to change notification settings - Fork 41
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
Compiler conflicts for the types in Xamarin.Android.Arch.Work.* #55
Comments
This might work, well it appears it does. It removes the Support assembly from the core compile (the csc / roslyn). This way the build will create the assembly, and then leave the migration tasks to clean it all up. <!-- remove the bad assembly from csc -->
<Target Name="RemoveOldSupportFromCsc" BeforeTargets="CoreCompile">
<ItemGroup>
<__RemovingFromReferencePathWithRefAssemblies Include="%(ReferencePathWithRefAssemblies.Identity)" Condition="'%(Filename)' == 'Xamarin.Android.Arch.Work.Runtime'" />
</ItemGroup>
<ItemGroup>
<ReferencePathWithRefAssemblies Remove="@(__RemovingFromReferencePathWithRefAssemblies)" />
</ItemGroup>
</Target>
<!-- add it back, just in case -->
<Target Name="AddOldSupportFromCsc" AfterTargets="CoreCompile">
<ItemGroup>
<ReferencePathWithRefAssemblies Include="@(__RemovingFromReferencePathWithRefAssemblies)" />
</ItemGroup>
</Target> This may seem like a thing we should be adding to the migration, but it could potentially cause more issues that it solves. Potentially. An example would be if you are using the OptionA: Option B: The number of people using I had a check, and I believe the types that may have this issue are:
At the end of the day, there are a few, but the ones you might hit are the types in
|
This might or might not be useful, but a thought crossed my mind that one way to avoid the C# compilation error might be to use an For assemblies from NuGet packages, this requires a custom So I tried:
Result: The build completed successfully. |
This seems to document the workarounds pretty good and I don't think we're going to make a code change for this, so I'm gonna close it. It can be reopened if anyone feels different. |
Describe your Issue:
xamarin/Xamarin.Forms#9546 (comment)
Steps to Reproduce (with link to sample solution if possible):
App29.zip
The text was updated successfully, but these errors were encountered: