Fody/Costura

Missing TypeForwardedToAttribute in assembly definition when using Costura.Fody 2.0.1

Closed this issue · 5 comments

Unfortunately i cannot upload a little solution now.
The problem is that Costura loses assembly attribute TypeForwardedToAttribute. You can see original assembly and Costura processed copy on screenshots.
clip2net_180520044258
clip2net_180520044317

Steps for reproduce:

  1. Create a new .NetStandard project in Visual Studio 2017;
  2. Add a new nuget package "System.IO.FileSystem.AccessControl";
  3. Add Fody 3.0.3 and Costura.Fody 2.0.1;
  4. Add a FodyWeavers.xml with body
<?xml version="1.0" encoding="utf-8"?>
<Weavers>
  <Costura CreateTemporaryAssemblies='true' />
</Weavers>
  1. Compile and try to load.

This problem appears too when CreateTemporaryAssemblies is disabled - i try to use ACL methods in System.IO.FileSystem.AccessControl and get an PlatformNotSupportedException. This is not appears when assemblies are loaded not through Costura.

Problem is with resolving references for NetStandard/NetCore. Resolving references with copy local is not correct way becouse of possible different platform running app. Costura needs to attach all platforms of nuget reference (netcore, netsandard, net461 etc) into assembly and load different dependency depending on current runtime. Is it possible?

Costura needs to attach all platforms of nuget reference (netcore, netsandard, net461 etc) into assembly and load different dependency depending on current runtime. Is it possible?

no this is not possible

closing this as stale. if it is still an problem please raise a new issue