简体   繁体   中英

How do I deploy a Visual Studio addin with an installer like MSI?

So I made an addin, and now I would like to pack it into an installer so it's easy to deploy and share it with others.

Sadly the MSDN documentation about Addins is very poor, at least if you are using Visual Studio 2013. I tried everything I could find there but most of the things that were neccessary for following the MSDN instructions were missing in my SDK and could not be found online as well. Other topics like here on Stackoverflow don't seem to answer the question in the way I want my solution to be, which would be forming an Installer.

So can anyone help me out?

Here is a MSDN link on how to register an addin.

http://msdn.microsoft.com/en-us/library/19dax6cz(v=vs.120).aspx

It is easy to create an MSI from this. There are also several tools that have support for deploying an addin

the answer to your question that was deleted, because there are no pn's and you seem to be a beginner and need the advice:

I would guess it throws a IOException or FileNotFoundException and you need to add the proper handling for this.

The error will most likely be thrown when you first try to do something with the non-existing file, which would be the point where you create a stream to the file, which will fail because there is no file so the stream cannot be created to serve it's purpose (think of it as going to the ice cream shop asking for ice cream and the ice cream man giving you an empty cup because he has no ice cream, that would make no sense and in this case a filestream without a file would make no sense either)

you should read about exception handling in c#

Chances are you are swallowing the exceptions with an empty catch block instead of using something like Console.WriteLine("Attempted divide by zero.") to print out the error.

Swallowing exceptions is a bad practice because it leads to hard to debug code as in your case.

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