开发者

Filehelpers Publish Release file without need for DLL

开发者 https://www.devze.com 2023-03-21 21:15 出处:网络
this might be a bi开发者_运维技巧t of a noob question.. I\'ve coded a simple file conversion app in C Sharp (.net 4, VS2010) that uses the Filehelpers library. I\'ve got a reference to the library in

this might be a bi开发者_运维技巧t of a noob question..

I've coded a simple file conversion app in C Sharp (.net 4, VS2010) that uses the Filehelpers library. I've got a reference to the library in my project references. When I publish the project in Release mode, it outputs the Filehelpers.dll file with the executable together, and the executable won't work unless it's in the same folder as the DLL.

I tried setting Copy Local to False, but it still doesn't work. Is there any way to package the library as part of the exe file?? This is a very simple app which is meant to be distributed easily and having this required Dll floating around is a huge downside.

thanks T


Got it working after some fiddling with ILmerge not running on .net v4. Here is my command for future thread visitors:

ILMerge /targetplatform:v4,C:\windows\microsoft.net\framework\v4.0.30319 /out:merged.exe /log Original.exe FileHelepers.dll


You may want to look in to your project property settings where you can custom copy files where ever you want post build if you are looking to move files around after the build. If you are looking to include a .dll in your .exe look here

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号