Merge DLL files with ILMerge error

First of all, I'm not sure if this is a problem with ILMerge or not, but I cannot merge.dll files in my application. I tried this on the command line:

ilmerge /target:winexe /out:test.exe MyApp.exe lib1.dll lib2.dll lib3.dll 

I got the following error and I have no idea what this means:

Errors detected in MyApp metadata. The pdb associated with D: \ C # \ source \ bin \ ReleaseMyApp.exe is deprecated.

I am using the latest version (2.10.526.0), but yes, I cannot get this to work, and I really need help. What does the above error mean and how to fix it?

+3
source share
3 answers

The pdb associated with D: \ C # \ source \ bin \ ReleaseMyApp.exe is deprecated.

Since you did not explicitly say that you checked that pdb and exes are synchronized, I assume that I will ask the obvious question: is there pdb in the folder and have you checked the timestamps on the files?

As I understand it, if there is debugging information for the source files, then ilmerge will create debugging information for the target, and if the original is out of date, it probably displays this error, and does not generate incorrect information.

If you don't need debugging information, what happens if you delete the pdb files?

+3
source

I expect that metadata of this type will be stored as a string, possibly in explicit code, but perhaps through "typeof" in the attribute.

You can try to handle the AppDomain TypeResolve event by finding a type string that fails and returning the type you intend to - this should work around the fact that it is now in a different assembly.

http://msdn.microsoft.com/en-us/library/system.appdomain.typeresolve.aspx

0
source

Did it help you to try . NETZ instead of ILMerge?

0
source

Source: https://habr.com/ru/post/887094/


All Articles