0

I have merged some .net standard projects dlls into one big dll MergedAssemblies.dll. Now I have a xamarin app which uses MergedAssemblies.dll and also has a reference to Nuget1.

Unfortunately Nuget1 has dependencies on its own, and some of those dependencies where already merged into the MergedAssemblies.dll. Now when the xamarin apps builds it cannot solve some types as they exist in 2 places.

Is it possible to not load some dependencies of the Nuget1 as they have already been loaded into MergedAssemblies.dll?

Is there another approach of solving this?

I cannot merge the Nuget1 directly into MergedAssemblies.dll because it is not compatible.

Bogdan Daniel
  • 2,689
  • 11
  • 43
  • 76

1 Answers1

0

You can unload project then right-click and edit .cproj, then insert "an exclusive reference", ex:

<PackageReference Include="System.Reflection.Emit">
  <Version>4.3.0</Version>
  <ExcludeAssets>all</ExcludeAssets>
</PackageReference>

that would exclude reference to System.Reflection.Emit that could come from other referenced nugets.

Nick Kovalsky
  • 5,378
  • 2
  • 23
  • 50