How to deploy visual studio addin? - visual-studio-2010

I have an Addin. I have the .Addin file and DLL file. I need to know what the best way of distributing this to people would be?
It's mainly for people in the office.
The way I got it on a friends machine was to copy the .addin and .dll file to the Visual Studio Addin folder, however I had to open the .addin in Notepad++ and change the Assembly path to point to where the DLL is. How can I automate this so the plugin can be installed and have the Assembly area get updated to the install path?
Thanks for any help!

You can just put the assembly's filename in the .Addin file:
<Assembly>MyAddin.dll</Assembly>
No need for a full path.

Related

VSIX - include other application in package

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,

Saving a program as a .exe file in Visual Studio 2017 with using no programs

I am trying to save a program in Visual Studio 2017 as a .exe file so I can send it by e-mail. You can save it as a .sln and as a .vb file (I'm using VB.NET) but I can't find any way to save it as a .exe file inside the program. I also don't want to use any downloadable programs that can do this.
Build the solution.
Open the folder that the solution is in.
Navigate to the Bin folder.
Under this folder there will likely be a folder called Debug (or a name that corresponds to your build configuration). In here will be your exe file if it built correctly and you have the correct type of visual studio project.

In a Visual C++ project, how do I give users redistributable .dll files?

I'm a new C++ / visual studio learner so sorry if I don't know something that might be obvious.
Alright so I understand that to get my programs to run on machines without VS I need to distribute the correct .dll files to them. Here are my questions:
How do I know what files to distribute? Once I know the files I need, where can I find them? I already have the .dll package microsoft provides installed but I don't know where to find it or the files in it.
How do I supply these files to the user? Can I just include the files with the installer and then on program start through code move the files to the correct spot? How do I do this? Is it possible to move the files to the correct location through the installer or do I have to do it when the program launches for the first time?
Thanks! Sorry if I left out information or if I formatted this question improperly.
You can choose to statically link your application, then no C++ DLLs are needed.
Otherwise, Microsoft has "redistributable package" EXEs for each version of Visual Studio that you can include with the files that you provide to users. Your installer then runs these as a sub-install. (It does something like start another process that runs that package then waits for it to finish.)
Google visual studio redistributable.
Normally you would use a setup program / installer like InstallShield or WIX, and some of them already have built-in support for adding the redistributables for C++ and DirectX.

Compressing(Zipping) VS2010 Solutions - issue when opening

I need to compress a Visual Studio 2010 Solution into zipped folder, so I can transfer it over email.
I have done this before, but for some reason, when I just tried it, and tested reopening the zipped solution, I get the following
*C:\Users\Eric\AppData\Local\Temp\Temp3_WcfServiceConsole.zip\WcfServiceConsole\WcfServiceConsole\WcfServiceConsole.csproj:
error : Unable to read the project file 'WcfServiceConsole.csproj'.
C:\Users\Eric\AppData\Local\Temp\Temp3_WcfServiceConsole.zip\WcfServiceConsole\WcfServiceConsole\WcfServiceConsole.csproj:
The project file could not be loaded. Could not find a part of the path 'C:\Users\Eric\AppData\Local\Temp\Temp3_WcfServiceConsole.zip\WcfServiceConsole\WcfServiceConsole\WcfServiceConsole.csproj'.
I can't figure out why it would be doing this?
Is there another way I can zip up the solution correctly so that this doesn't happen?
It is pretty nice that Windows Explorer lets you look into a .zip file as though it is a directory. That's where the buck stops though, there is no .zip archive support built into Visual Studio.
You have to unzip the archive first.
To avoid a mistake like that in the future, switch Explorer to Programmer Mode. Start + Run, explorer.exe. Organize, Folder and Search options, View tab. Untick the "Hide extensions for known file types" checkbox.
You need to unzip the zip before trying to open it. It looks like you're just double-clicking the zip in Windows Explorer, then trying to open the solution file directly from the zip archive. That is, the path:
C:\Users\Eric\AppData\Local\Temp\Temp3_WcfServiceConsole_**.zip**\WcfServiceConsole\WcfServiceConsole\WcfServiceConsole.csproj
appears to be a path within a zip file. Visual Studio can't work with this until you unzip it.

Uninstalling the VS2010 extension without the Extension Manager

Is there any way to uninstall the VS2010 extension correctly without the Extension Manager? I couldn't find any special command line arguments for .vsix file and think that just deleting all the files from Visual Studio's special place is not a right solution.
Yes, actually deleting the folder is exactly what you should do. A "pure" VSIX extension is just a unzip of the files to a folder under %LocalAppData%\Microsoft\VisualStudio\10.0\Extensions.
It's a good idea to check though that it wasn't installed through MSI or some other installer technology by verifying in Windows Add/Remove Programs.

Resources