简体   繁体   中英

How to reference assemblies not in the GAC with Visual Studio 2010 Extension/Addin?

I'm trying to write a Visual Studio 2010 Extension to show an IronPython shell for debugging C# projects. So obviously I have a reference to IronPython.dll (and a bunch of others). I'm referencing IronPython 2.0.1 here.

My project compiles fine. When I debug it, a new instance of VS is started and all. But when I run the addin command, I get a System.FileNotFoundException for the IronPython.dll .

I did make sure the DLL is in the project output directory ( bin/Debug ). I'm guessing this is being run under another context, so the path resolution or whatever doesn't pick this up. Any ideas on what to do?

Yes, that won't work. The probing path for devenv.exe (Visual Studio) is not going to include the current project build directory. The common7\\ide\\devenv.exe.config on my machine adds the PublicAssemblies and PrivateAssemblies subdirectories in common7\\ide to the probing path. You could copy your assemblies there.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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