本文介绍了ILMerge&保留装配名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我需要合并一些dll,文件名和程序集的名称需要与我的主dll(mydll.dll)相同。我也需要pdb文件。如何完成这项工作?

I need to merge some dlls and both the file name and assembly name need to be the same as for my main dll (mydll.dll). I also need the pdb file. How do I get this done?

以下是我尝试的几件事:

Here are a few things I tried:


  • 只需使用ILMerge mydll.dll .... /out:mydll.dll
    无法使用访问路径... mydll.pdb被拒绝。

  • Just use ILMerge mydll.dll .... /out:mydll.dllThis fails with "Access to the path ...mydll.pdb is denied."

将mydll.dll重命名为mydllTemp.dll和mydll.pdb到mydllTemp.pdb,然后
ILMerge mydelltemp.dll .... /out:mydll.dll
这会失败,与... mydlltemp.dll关联的pdb已过期我认为这是因为ilmerge查看程序集名称以查找pdb,因此它会查找已重命名的mydll.pdb。

Rename mydll.dll to mydllTemp.dll and mydll.pdb to mydllTemp.pdb and thenILMerge mydelltemp.dll .... /out:mydll.dllThis fails with "The pdb associated with ...mydlltemp.dll is out of date" I think this is because ilmerge looks at the assembly name to find the pdb, hence it looks for mydll.pdb which was renamed.

将mydll.dll重命名为mydllTemp,然后
ILMerge mydelltemp.dll .... /out:mydll.dll
这个工作没有错误,但是当我将调试器附加到一个进程时,它不会触发

Rename mydll.dll to mydllTemp and thenILMerge mydelltemp.dll .... /out:mydll.dllThis works without errors but when I attach the debugger to a process it does not trigger

ILMerge mydll.dll ... /out:mydlltemp.dll
重命名mydlltemp。 dll到mydll.dll和mydlltemp.pdb到mydll.pdb
现在我可以将调试器附加到一个具有断点被触发的进程。然而,现在的汇编名称是mydlltemp而不是mydll

ILMerge mydll.dll ... /out:mydlltemp.dllrename mydlltemp.dll to mydll.dll and mydlltemp.pdb to mydll.pdbNow I can attach the debugger to a process with breakpoints being triggered. However, the assembly name now is mydlltemp instead of mydll

那么我该如何让它工作,程序集名称?

So how can I get this to work AND have the original assembly name?

推荐答案

你没有真正提到这是在标准开发过程中,还是这是一部分构建过程。

You didn't really mention is this is in the course of standard development or if this is part of a build process.

如果是标准开发,你真的需要一切合并才能测试出来吗?

If it's for standard development, do you really need everything merged just to test things out?

如果是您的构建过程,您可以输出到另一个目录(您可能需要mkdir首先),然后可以重用相同的程序集名称。

If it's for your build process, you can have the output go to a different directory (which you will probably need to mkdir first) and then you can reuse the same assembly name.

这篇关于ILMerge&保留装配名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-08 06:35