-
Notifications
You must be signed in to change notification settings - Fork 533
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Xamarin.Android.Build.Tasks] Handle Ref Assemblies from Nuget (#3938)
Fixes: #3920 Context: https://github.com/mattleibow/NuGetFoldersTest What is a [reference assembly][0]? The short & glib answer is "an assembly with the [`[assembly:ReferenceAssemblyAttribute]`][1] custom attribute". Unfortunately, the short & glib answer is incomplete: NuGet also has a convention in that assemblies within a [`/ref/` directory][2] are treated as reference assemblies: > …if you want to provide the corresponding compile time assembly > as well then have `AnyCPU` assembly in `/ref/{tfm}` folder. > > Please note, NuGet always picks these compile or runtime assets > from one folder so if there are some compatible assets from `/ref` > then `/lib` will be ignored to add compile-time assemblies. Unfortunately, the `<ResolveAssemblies/>` task only treated assemblies with `[assembly:ReferenceAssembly]` as reference assemblies, not the "NuGet `/ref/` convention" assemblies. Consequently, we would never switch out the "reference assembly" for the `monodroid90`-profile assembly during build time. Update `<ResolveAssemblies/>` so that NuGet-style assemblies located within a `/ref/` directory are treated as reference assemblies, even if they do *not* have the `[assembly:ReferenceAssembly]` attribute. [0]: https://docs.microsoft.com/en-us/dotnet/standard/assembly/reference-assemblies [1]: https://docs.microsoft.com/en-us/dotnet/api/system.runtime.compilerservices.referenceassemblyattribute?view=netframework-4.8 [2]: https://docs.microsoft.com/en-us/nuget/create-packages/supporting-multiple-target-frameworks#architecture-specific-folders
- Loading branch information
1 parent
dd49af3
commit aa05045
Showing
6 changed files
with
103 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters