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

[.NET 6] Change the identify of the Xamarin.iOS.Tasks.dll and Xamarin.Localization.MSBuild.dll so that they're not duplicated across packages. #9835

Closed
Tracked by #44736
rolfbjarne opened this issue Oct 9, 2020 · 3 comments · Fixed by #12831
Assignees
Labels
dotnet An issue or pull request related to .NET (6) dotnet-pri1 .NET 6: important for stable release estimate-3d feature A feature to be implemented iOS Issues affecting Xamarin.iOS macOS Issues affecting Xamarin.Mac
Projects
Milestone

Comments

@rolfbjarne
Copy link
Member

rolfbjarne commented Oct 9, 2020

We currently ship Xamarin.iOS.Tasks.dll and Xamarin.Localization.MSBuild.dll in three/four packages: Microsoft.[iOS|tvOS|watchOS|macOS].Sdk. This is problematic if the user uses different versions of these packages in the same solution, because only one of them will be loaded in the MSBuild process, and there might be incompatibilities.

This is a very similar issue as #9830, just for .NET instead of old-style Xamarin.iOS/Mac.

It's the same reason we use ILRepack to merge all the dependent assemblies into Xamarin.[iOS|Mac].Tasks.dll.

Potential solutions:

  • Rename the assemblies according to the platform (say Xamarin.tvOS.Tasks.dll / Xamarin.tvOS.Localization.MSBuild.dll for instance).
  • Sign each version with different keys? Not sure if this would work, but it might be the simplest.

Time estimate: 3 days.

@rolfbjarne rolfbjarne added bug If an issue is a bug or a pull request a bug fix macOS Issues affecting Xamarin.Mac iOS Issues affecting Xamarin.iOS dotnet An issue or pull request related to .NET (6) labels Oct 9, 2020
@rolfbjarne rolfbjarne added this to the .NET 6 milestone Oct 9, 2020
@rolfbjarne rolfbjarne added dotnet-pri0 .NET 6: required for stable release feature A feature to be implemented and removed bug If an issue is a bug or a pull request a bug fix labels Feb 3, 2021
@rolfbjarne rolfbjarne added this to Pri 0 - Not Started in .NET 6 Feb 3, 2021
@rolfbjarne
Copy link
Member Author

I believe this to be a rather uncommon scenario to run into (I'm not even sure how to create a realistic test case for it), so I'm lowering the priority.

@rolfbjarne rolfbjarne moved this from Pri 0 - Not Started to Pri 3 - Not Started in .NET 6 Aug 17, 2021
@rolfbjarne rolfbjarne added dotnet-pri3 .NET 6: wishlist for stable release and removed dotnet-pri0 .NET 6: required for stable release labels Aug 17, 2021
@rolfbjarne
Copy link
Member Author

Looks like we found a scenario: #12561, and it's not that uncommon (have a legacy Xamarin.iOS project and a new-style .NET iOS project in the same solution), so I'm bumping priority again.

@rolfbjarne rolfbjarne added dotnet-pri1 .NET 6: important for stable release and removed dotnet-pri3 .NET 6: wishlist for stable release labels Aug 27, 2021
@rolfbjarne rolfbjarne moved this from Pri 3 - Not Started to Pri 1 - Not Started in .NET 6 Aug 27, 2021
@rolfbjarne
Copy link
Member Author

XA was able to solve this by strong-naming their assemblies: dotnet/android#6116

@rolfbjarne rolfbjarne self-assigned this Sep 24, 2021
@rolfbjarne rolfbjarne moved this from Pri 1 - Not Started to September 2021 - In Progress in .NET 6 Sep 24, 2021
rolfbjarne added a commit to rolfbjarne/xamarin-macios that referenced this issue Sep 24, 2021
…amarin#9835.

We need to strongname our MSBuild assemblies, so that different versions can
be loaded side-by-side (one example being having both a legacy and a .NET
project in the same solution).

This also required signing the corresponding test assemblies, since they poke
into the internals of the task assemblies.

Fixes xamarin#9835.
.NET 6 automation moved this from September 2021 - In Progress to September 2021 - Done Sep 28, 2021
rolfbjarne added a commit that referenced this issue Sep 28, 2021
…9835. (#12831)

We need to strongname our MSBuild assemblies, so that different versions
can be loaded side-by-side (one example being having both a legacy and a
.NET project in the same solution).

This required setting a version for Xamarin.iOS.Tasks.dll and
Xamarin.Mac.Tasks.dll, otherwise strong-naming won't work properly (all
versions of an assembly would have the same identity).

Also sign the corresponding test assemblies, since they poke into the
internals of the task assemblies.

Fixes #9835.
@ghost ghost locked as resolved and limited conversation to collaborators Apr 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dotnet An issue or pull request related to .NET (6) dotnet-pri1 .NET 6: important for stable release estimate-3d feature A feature to be implemented iOS Issues affecting Xamarin.iOS macOS Issues affecting Xamarin.Mac
Projects
No open projects
.NET 6
  
September 2021 - Done
1 participant