我已经在C#windows中开发了一个应用程序,我需要添加vb.net dll文件。我尝试从源添加dll文件 - >添加References.But,我收到错误
**Could not find the dll files **
因为我正在添加dll文件( assembly1到程序集** 2和** assembly2到assembly3 )
**新密码**
C:\ Program Files(x86)\ Microsoft \ ILMerge> ilmerge / t:dll /out:ExcelImportnew.dll ExcelImport.dll BOL.dll
合并期间发生异常:
Access to the path 'C:\Program Files (x86)\Microsoft\ILMerge\ExcelImportnew.dll' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolea
useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, Sring msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, In32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at System.Compiler.Writer.WritePE(String location, Boolean writeDebugSymbols, Module module, Boolean delaySign, String keyFileName, String keyName)
at System.Compiler.Writer.WritePE(CompilerParameters compilerParameters, Module module)
at ILMerging.ILMerge.Merge()
at ILMerging.ILMerge.Main(String[] args)
请告诉我为什么我收到此错误。如何解决此错误。 谢谢!
答案 0 :(得分:1)
您是否尝试将dll与ILMerge结合使用?
ilmerge /target:library /out:YourLib.dll ClassLibrary1.dll ClassLibrary2.dll
答案 1 :(得分:0)
如果您有VB和C#项目的源代码,请将它们都添加到Visual Studio解决方案中。现在您可以将它们添加为项目引用。
这可能是最简单的入门方式。