简体   繁体   English

DLL与Visual Studio 2013一起导入

[英]DLLImports with Visual Studio 2013

I am very new to using Visual Studio 2013. Where should I put the DLL's Within the Microsoft Visual Studio folders if I want to call it from my c# application. 我是使用Visual Studio 2013的新手。如果要从c#应用程序调用DLL,应在Microsoft Visual Studio文件夹中放置DLL的位置。

For example, I want to use [DllImport("QAUWVED.DLL")]. 例如,我要使用[DllImport(“ QAUWVED.DLL”)]。

Which folder would I put the DLL in? 将DLL放入哪个文件夹?

ConsoleApplication1
---- ConsoleApplication1
---- ---- bin
---- ---- obj
---- ---- Properties

Yes, you should probably create a new 'DLL' folder to store the DLL. 是的,您可能应该创建一个新的“ DLL”文件夹来存储该DLL。 But then you would have to add a reference of the DLL to the project before you would be able to use it. 但是,随后您将必须在工程中add a reference DLL add a reference ,然后才能使用它。

Once, referenced, you should be able to use the import. 一旦被引用,您应该可以使用导入。 Don't put in /bin or /obj. 不要放入/ bin或/ obj。 It will be cleared on each build you do for the application. 您为应用程序执行的每个构建都将清除它。 All references will be automatically copied to the /bin or /obj upon build you do for the c# application. 在为C#应用程序执行构建时,所有引用将自动复制到/ bin或/ obj。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM