forked from dotnet/android
-
Notifications
You must be signed in to change notification settings - Fork 0
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] ILRepack the NuGet.* Tasks Dependencies. (
dotnet#1694) `<ResolveAssemblies/>` is throwing the following error on a newer mono versions (2018-04): error : Could not load file or assembly 'NuGet.ProjectModel, Version=4.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. This is because we took a dependency on NuGet.ProjectModel 4.6 and the newer mono has 4.7. We cannot always be sure which version of the NuGet assemblies will be installed since users are able to upgrade mono independently. Instead, use the `ILRepack` NuGet to package up the dependencies we need so that `Xamarin.Android.Build.Tasks.dll` contains all the correct assemblies it needs.
- Loading branch information
1 parent
88ef36b
commit 610ade7
Showing
3 changed files
with
33 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Target Name="ILRepacker" AfterTargets="Build"> | ||
<ItemGroup> | ||
<InputAssemblies Include="$(OutputPath)\NuGet.ProjectModel.dll" /> | ||
<InputAssemblies Include="$(OutputPath)\Newtonsoft.Json.dll" /> | ||
<InputAssemblies Include="$(OutputPath)\NuGet.Common.dll" /> | ||
<InputAssemblies Include="$(OutputPath)\NuGet.Common.dll" /> | ||
<InputAssemblies Include="$(OutputPath)\NuGet.Frameworks.dll" /> | ||
<InputAssemblies Include="$(OutputPath)\NuGet.LibraryModel.dll" /> | ||
<InputAssemblies Include="$(OutputPath)\NuGet.Versioning.dll" /> | ||
<InputAssemblies Include="$(OutputPath)\NuGet.Packaging.dll" /> | ||
<InputAssemblies Include="$(OutputPath)\NuGet.Packaging.Core.dll" /> | ||
<InputAssemblies Include="$(OutputPath)\NuGet.DependencyResolver.Core.dll" /> | ||
<InputAssemblies Include="$(OutputPath)\NuGet.Configuration.dll" /> | ||
</ItemGroup> | ||
<ILRepack Parallel="true" | ||
Internalize="true" | ||
Verbose="true" | ||
DebugInfo="true" | ||
InternalizeExclude="@(DoNotInternalizeAssemblies)" | ||
InputAssemblies="$(OutputPath)\$(AssemblyName).dll;@(InputAssemblies)" | ||
LibraryPath="$(OutputPath)" | ||
TargetKind="Dll" | ||
OutputFile="$(OutputPath)\$(AssemblyName).dll" | ||
/> | ||
<Delete Files="@(InputAssemblies)" /> | ||
</Target> | ||
</Project> |
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