I`m creating VS2017 Extension, There some DLLs my Interface depends on, I would like to copy these DLLs to this folder:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE
I have the DLLs added to my project with IncludeInVsix set to true in the properties window.
I made sure of that by changing VSIX to ZIP and the DLLs are there. However they are not copied to the IDE folder, and though I have to copy them manually to get the extension to work.
Any idea how to accomplish this ?
Instead of copying dlls to VS IDE Folder, it is recommended to use ProvideBindingPath or ProvideCodeBase attributes to tell VS where to look for your dlls.
Related
How can we include a separate .NET application inside a VSIX package? Preferably in a subdirectory so that it doesn't interfere with DLLs of the Visual Studio extension itself (different versions). The application is available in the same solution, but for the same reason I van also not add a reference to it in the main project.
The intention is to run that application as a separate process, started by the extension. The extension will then connect to that application through WCF.
I'm pretty certain you just need to include the .EXE in your .VSIX. A .VSIX is just a .zip file, and you can include additional files into it by simply adding them to your project and setting the Include in VSIX property to true.
To confirm, try downloading something like the Azure Data Lake and Stream Analytics Tools VSIX to disk. (I mention this one because I noticed it installed a number of .EXE's under my C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions directory).
Once you have the .VSIX on disk, rename it as a .zip file and unzip, or view its contents with the windows explorer. Note that the extensions.vsixmanifest file contained in that .zip has no references or entries for any of the .exe files installed by that .VSIX. Which means, all you really need to do is include it in the .zip file.
Add a subfolder to your .VSIX project, copy the .exe there, add it to your project, set the Include In VISX property to true, and I suspect you'll be all set.
Sincerely,
I am using Visual Studio 2010 with MCV4 (Installed separately).
Some dlls are linked to the orignal path, and some are copied to the project.
I don't want them to be copied to the project.
i.e when building Web project (MCV4 -> Web API), I see several dlls, that automatically created:
Antlr3.Runtime.dll - created on project folder (and path is not the original folder).
also: EntityFramework.dll, System.Web.Optimization.dll and some more,
where system.web is on C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\System.Web.dll folder.
Why the above dlls are copied to the project folder, and how can I enforce that they would be on the original one?
Thanks :)
If you rightclick each references assembly in your project there is a propery "Copy Local". For each reference you set Copy Local=true it will be copied into your output folder (\bin).
Unless the DLL is in the GAC (Global Assembly Cache), you will want to copy it locally as the application will not know where to load these DLLs from. By default when you add a reference, Copy Local will be true when the DLL is not in the GAC.
If the application can not find the DLL's it needs it will fail when the DLL is needed.
A .Net application can only load DLLs from the GAC or from your application path and subdirectories unless you employ your own Assembly.Load() code to do this.
I'm working on an installer that needs to add several files to AVR Studio 5, an IDE developed by Atmel that is based on the Visual Studio Isolated Shell. These files include project templates for the "New Project" dialog.
By experimenting, I found that I can successfully add the project templates and get them to show up in the dialog if I simply copy them into C:\Program Files (x86)\Atmel\AVR Studio 5.0\ProjectTemplates\ and then delete or rename C:\Program Files (x86)\Atmel\AVR Studio 5.0\ProjectTemplateCache\cache.bin. I have not been able to find any good documentation on how the Visual Studio ProjectTemplateCache folder works. It seems to contain the same files as the ProjectTemplates folder, plus the cache.bin file, so I'm not sure why it would be useful. After I rename cache.bin, Visual Studio does not regenerate it, which makes me worried that renaming it might have some permanent consequences. Is renaming cache.bin a bad idea? What problems can it cause?
Is there another, easy way to install new project templates? Ideally I would like something that is easier than creating a Visual Studio Extension (.vsix) file, as recommended in this previous StackOverflow question: Installing a custom project template with Visual Studio Installer project
The installer I am working on uses NSIS, if that matters.
For my isolated shell I copy my template .zip files to 'Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ProjectTemplates' and '\ItemTemplates'. I then run my isolated shell with the command line '/installvstemplates'. This rebuilds the caches and when you next run the isolated shell, they show up properly.
I also had to target the isolated shell in my extension manifest files.
Have you tried any of these?
If per user project templates are fine, you can drop them in <My Documents>\AVRStudio\Templates\ProjectTemplates.
I can't find the program i made as in find i mean find without the IDE Visual Studio Express 2010
In visual studio, click on your project in the solution explorer.
You should see the path to your project file (csproj or vbproj).
Open this folder in Windows Explorer, then open bin/debug or bin/release, depending on your build configuration (debug by default).
Look in the bin\debug folder under your project directory.
Is there a way to set a vcproj Project folder in order to automatically include all .cpp or .h files depending on the path of the project ?
On other words, when adding files to the folder of my project using Windows explorer, is it possible to have these new files automatically added to a vcproj Project, inside Visual Studio ? (even if I have to relaunch Visual Studio).
I do not need just to see them, but I need them to be automatically included inside the project for compiling and other operations...
The only way I see is to create a Visual Studio addin or a VB Script to do that...
Thanks,
Regards
You can edit project file and use wildcards. http://msdn.microsoft.com/en-us/library/ms171454%28v=VS.90%29.aspx