yck1509 / ConfuserEx

An open-source, free protector for .NET applications
http://yck1509.github.io/ConfuserEx/
Other
3.56k stars 1.62k forks source link

Failed to resolve assembly (MvvmLight) #233

Closed CptObviousDuh closed 9 years ago

CptObviousDuh commented 9 years ago

I'm using MvvmLight (5.0.2) in my WPF application and have therefore embedded the GalaSoft.MvvmLight.dll as an embedded resource, so that there's only one needed file.

When I try to apply the protection with ConfuserEx v0.5.0 I get the following error:

[ERROR] Failed to resolve dependency of 'MyApp.exe'. Exception: dnlib.DotNet.AssemblyResolveException: Could not resolve assembly: GalaSoft.MvvmLight, Version=5.0.2.32240, Culture=neutral, PublicKeyToken=e7570ab207bcb616 bei dnlib.DotNet.Extensions.ResolveThrow(IAssemblyResolver self, IAssembly assembly, ModuleDef sourceModule) in E:\Source\Public\Confuser2\dnlib\src\DotNet\IAssemblyResolver.cs:Zeile 113. bei Confuser.Core.ConfuserEngine.Inspection(ConfuserContext context) in e:\Source\Public\Confuser2\Confuser.Core\ConfuserEngine.cs:Zeile 254. Failed at 22:40, 0:00 elapsed.`

I wouldn't even care if this dll could not be protected, but due to that error the whole application fails.

yck1509 commented 9 years ago

Hi, You could just put that dll near your application without including it in the protections.

CptObviousDuh commented 9 years ago

Yes that would be possible, but I'd like to keep my 1-file solution, due to it's simplicity (easy to deliver, easy to move on disk etc.) Is there a way to support this use case?

yck1509 commented 9 years ago

ConfuserEx only need that dll to analyze your application; if you had embedded the dll into your exe, you don't need to keep the dll when you release the application.

CptObviousDuh commented 9 years ago

This works, thank you! :) I found a problem which resulted out of this, but I will open a new issue for that, this one is solved.