Deploying .net addin application - installation

I have developed my first .net addin.
Now comes the part to deploy it and im lost.
In the .NET Setup and Deployment project, i have configured the Application folder to
contain all the dlls and the add-in file itself.
Now comes the requirement to automate the Add-in deployment in the VS2008 editor.
Is there a way, where on successful installation,the addin is automatically added in the Addin manager (i.e after folder is configured in the Add-in / Macros security automatically ? )
Pop up the Usage document file which is included as a file in the Application folder on successfull installation.

Related

Copy folder contexts using ClickOnce Publish in VS

I use VS 2019's publish feature to create a ClickOnce installer which sits on a server. When someone installs or updates their version of the exe, I need a folder of files to be copied to a specific folder on their local machine. This seems to be the closest I could find to do what I want, but it seems like its only targeted for Office add-ins. How can I do a post-deployment action or event for clickonce publishing?

How to add and run an additional manifest in a VSTO Add-in

I have a VSTO Add-in in C# for Excel in Visual Studio 2017.
I also have a manifest which references a Web Add-in for Excel.
I'd like to add the manifest to the VS project so that when the user installs the VSTO add-in, the web add-in will be installed as well.
I have found several ways to add a manifest to a VS project:
1. Create the manifest through New File -> Add Manifest Application File
2. Add a Web Add-in to a solution
However, these 2 ways aren't enough to achieve what I'm trying to do.
With the first method, the manifest is added to the project, but nothing reads it so it is never loaded.
Moreover, I thought I could specify it as an additional manifest, but VS doesn't let me embed it:
With the second method, I successfully added a Web add-in project to my solution.
When set as additional start up project, it loads and runs correctly on debug mode.
However, when I build my solution, the web add-in doesn't generate anything, so it isn't embeded in my installer (I'm using Wix 3.11 to generate a .msi installer), and thus, it is never run when I install the add-in.
How can I add and read the manifest in my solution so it will run upon installation?
EDIT:
I have also found this to use AdditionalManifestFile in (I believe) the .csproj of a project, however this doesn't work either.

Create an web app installation package, that includes "everything"?

Would it be possible, with the tools in VS2010, to create an msi-package that includes everything needed, and installed "on demand" for a mvc 3 app?
It should include IIS, SQL-Server Express, .NET 4, and the mvc3 assemblies.
That would be very handy to have to give users a single install-file, regardless if they use xp, vista or 7. The package should autmatically dectect what's missing, and install that.
You can try use a Web Setup Project.
Add a new project to your solution.
In the "Add New Project" dialog, select Other Project Types->Setup and Deployment->Visual Studio Installer.
Then select Web Setup Project.
In the created setup project, add Project Output... (Content Files) to the Web Application Folder (in File System Editor).
The web setup project includes by default check for IIS and .NET framework. It is possible to add checks for other dependencies.
When building the setup project, it is created the msi, along with a setup.exe that includes some pre-install validation.

Why Visual Studio 2010 publish website with source code?

I'm using Visual Studio 2010 with the new website publish dialog. I have a Web Application website. When published, in theory it should compile all the code into an single assembly. However, in both Debug and Release, after publishing the directory always contains source code of page and user controls (even with the untransformed web.config files Web.Debug.config and Web.Release.Config). This is very confusing.
But with package/publish web project configuration and Generate Deploy package context menu item, the Package\PackageTmp directory is clean.
Why doesn't Visual Studio use this Package to publish the website?
Where is the precompile option?
Web.config xml transform seems not work, why does Visual Studio bring this feature to confuse me?
The correct answer is to look in the Package/Publish Web settings (in the web application project properties) and look for the "Items to deploy".
For a web application you'd want "Items to deploy" to have "Only files needed to run this application" which would NOT copy the source code files, since they've been compiled into the DLL in the bin folder.
Note that this setting varies for your current Build type (Debug/Release/etc), so plan accordingly...
Ciao!
You need to understand the differences between Web Application Projects versus Web Site Projects.
To deploy a Web application project, you copy the assembly that is
created by compiling the project to an IIS server. In contrast, to
deploy a Web site project, you typically copy the project source files
to an IIS server.
For Web application projects, you typically build the project in
Visual Studio or by using the ASP.NET batch compiler on a computer
that is not the production IIS server. All code-behind class files and
standalone class files in the project are compiled into a single
assembly, which is then put in the Web application project's Bin
folder. (The .aspx and .ascx files are compiled dynamically in a
manner similar to what is done for Web site projects.)
For Web site projects, you do not have to manually compile the
project. Web site projects are typically compiled dynamically by
ASP.NET (on both the development computer and the production IIS
server). You can choose between batch compilation mode, which
typically produces one assembly per folder, and fixed compilation
mode, which typically produces one assembly for each page or user
control.
In visual studio 2013/2015, select an option "Precompile during publishing"

How to run an ASP.NET Application on Another System?

I have developed an ASP.NET web application in visual studio 2008. I want to run the same application on another system, but Visual Studio is not installed on that system. Is there a way I can run without visual studio?
I heard about deploying, but I don't know much about it.
You can publish your site from Visual Studio to a server that's running IIS, more info here:
How to: Publish Web Application Projects
You can use the built-in deployment features of Visual Studio (right click on the web project, select publish and follow the prompts) or you can simply copy all the dlls plus your content files from the web project to the IIS folder you want to deploy to (known as xcopy deployment). You could also deploy via a setup project, which will create an MSI package, but that's a bit more work. Here's a couple of links that might help, but you can do a search for the options described above and you will find plenty of resources:
Deploying ASP.NET Applications - Part 1
Deploying ASP.NET Applications - Part 2

Resources