Fody / Costura

Embed references as resources

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Costura.dll does not have a strong name

tom-englert opened this issue · comments

When compiling a strong named assembly that uses Costura, the following warning appears

CSC : warning CS8002: Referenced assembly 'Costura, Version=5.7.0.0, Culture=neutral, PublicKeyToken=null' does not have a strong name.

Please check all of the platforms you are having the issue on (if platform is not listed, it is not supported)

  • WPF
  • UWP
  • iOS
  • Android
  • .NET Standard
  • .NET Core

Component

NA

Version of Library

5.7.0.0

Version of OS(s) listed above with issue

NA

Steps to Reproduce

Build an assembly with a strong name

Expected Behavior

No warnings

Actual Behavior

CSC : warning CS8002: Referenced assembly 'Costura, Version=5.7.0.0, Culture=neutral, PublicKeyToken=null' does not have a strong name.

Thanks @tom-englert , just pushed a new alpha to nuget. If it works for you, I'll release a new version.

https://www.nuget.org/packages/Costura.Fody/5.8.0-alpha0094

With this version I can't build 😞

1>MSBUILD : error : Fody: An unhandled exception occurred:
1>MSBUILD : error : Exception:
1>MSBUILD : error : Failed to execute weaver C:\Users\englertt\.nuget\packages\costura.fody\5.8.0-alpha0094\build\..\netclassicweaver\Costura.Fody.dll
1>MSBUILD : error : Type:
1>MSBUILD : error : System.Exception
1>MSBUILD : error : StackTrace:
1>MSBUILD : error :    at InnerWeaver.ExecuteWeavers() in C:\projects\fody\FodyIsolated\InnerWeaver.cs:line 221
1>MSBUILD : error :    at InnerWeaver.Execute() in C:\projects\fody\FodyIsolated\InnerWeaver.cs:line 112
1>MSBUILD : error : Source:
1>MSBUILD : error : FodyIsolated
1>MSBUILD : error : TargetSite:
1>MSBUILD : error : Void ExecuteWeavers()
1>MSBUILD : error : Value cannot be null.
1>MSBUILD : error : Parameter name: type
1>MSBUILD : error : Type:
1>MSBUILD : error : System.ArgumentNullException
1>MSBUILD : error : StackTrace:
1>MSBUILD : error :    at Mono.Cecil.Mixin.CheckType(Object type) in D:\Code\Fody\cecil\Mono.Cecil\ModuleDefinition.cs:line 1258
1>MSBUILD : error :    at Mono.Cecil.ModuleDefinition.ImportReference(TypeReference type, IGenericParameterProvider context) in D:\Code\Fody\cecil\Mono.Cecil\ModuleDefinition.cs:line 861
1>MSBUILD : error :    at ModuleWeaver.Resolve(TypeReference baseType)
1>MSBUILD : error :    at ModuleWeaver.ImportAssemblyLoader(Boolean createTemporaryAssemblies)
1>MSBUILD : error :    at ModuleWeaver.Execute()
1>MSBUILD : error :    at InnerWeaver.ExecuteWeavers() in C:\projects\fody\FodyIsolated\InnerWeaver.cs:line 185
1>MSBUILD : error : Source:
1>MSBUILD : error : Mono.Cecil
1>MSBUILD : error : TargetSite:
1>MSBUILD : error : Void CheckType(System.Object)```

Checking...

Releasing an update with additional logging. Hopefully it will tell us why it's failing.

Fails when using TargetFramework net462, succeeds in net5.0
Might be the changes in 5c088d4, since it worked before.

I think it's similar to #764