[英]VS2010 add a .dll reference error
I am trying to add a DLL to my project but there are some problems. 我试图将DLL添加到我的项目,但有一些问题。 first of all, VS dont compile when I add the dll in references.
首先,当我在引用中添加dll时,VS不会编译。 it shows the error :
它显示错误:
The "NativeAssemblies=@(NativeReferenceFile);@(_DeploymentNativePrerequisite)" parameter for the "ResolveManifestFiles" task is invalid. “ResolveManifestFiles”任务的“NativeAssemblies = @(NativeReferenceFile); @(_ DeploymentNativePrerequisite)”参数无效。
The "ResolveManifestFiles" task could not be initialized with its input parameters. 无法使用其输入参数初始化“ResolveManifestFiles”任务。
anyone can tell me what is wrong ? 谁能告诉我出了什么问题?
A similar question was asked previously. 之前曾问过类似的问题。 You can refer to the links below to see if it helps alleviate your errors.
您可以参考下面的链接,看看它是否有助于缓解您的错误。
See this StackOverflow question : ResolveManifestFiles 请参阅StackOverflow问题:ResolveManifestFiles
I have already resolved the problem. 我已经解决了这个问题。
first, the dll isn´ta .NET dll so I has to put it in bin/debug directory of project folder. 首先,dll不是.NET dll所以我必须将它放在项目文件夹的bin / debug目录中。
then I access it with : 然后我用以下方式访问它:
[DllImportAttribute(@".\LDACTL.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int LDA_GetStatus();
LDA_GetStatus() is a function on dll.... LDA_GetStatus()是dll上的一个函数....
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.