Antonello
Antonello

Reputation: 1376

Merging .NET Standard assemblies

I couldn't find any documentation on the possibility to merge two (or more) .NET Standard assemblies, either using ILRepack or ILMerge. Both of the tools are merging assemblies of the .NET profiles 2.0, 3.5 and 4.0, but I believe they're not compatible with .NET standard profile.

Has anyone any experience with that? Anyone can point to any documentation of the feature?

Thanks!

Upvotes: 8

Views: 2834

Answers (1)

Michael Goin
Michael Goin

Reputation: 416

Not sure if you are still interested but I was able to get this to work with ILRepack a while back.

The main trick was adding a path for NETStandard.Library to RepackOptions.SearchDirectories. Can be as simple as pointing at your nuget dir. Something like: \.nuget\packages\NETStandard.Library\2.0.0\build\netstandard2.0\ref

Otherwise, would get exceptions like "Failed to resolve assembly: 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'"

Upvotes: 7

Related Questions