Registry keys for building addin using visual studio installer - c#

I was able to create msi installed for my c# outlook addin using visual studio installer - an extension.
This is the link I used - https://msdn.microsoft.com/en-us/library/cc766795.aspx.
I successfully created addin using the above link but its not showing up in outlook because the above link didnt talk about registry keys.
So, I added registry keys based on the link - https://msdn.microsoft.com/en-us/library/cc442767.aspx
I changed "installdir" to "targetdir" because visual studio installed had set the property as targetdir where installdir property is if we build using installshield.
So, even thats pointing to correct install dir and addin is loading in outlook. But it is giving error because, at first, I tried with
file:///[TARGETDIR]abc.vsto|vstolocal where abc is my product name.
But abc.vsto is not there ( I selected "primary output" while adding project output to application folder), so outlook complaining that.
Then I tried with file:///[targetdir]abc.dll which gave me error:
Exception reading manifest from file:///path/to/setup/abc.dll:
manifest may not be valid or the file could not be opened

Make sure that you did all the steps described in the Deploying an Office Solution by Using Windows Installer article in MSDN. In general, you may also find the Deploying an Office Solution section helpful.

Related

install VSTO adds-in with reference to another project

I have a project(A) is a normal winform and another project(B) is a vsto addsin for word
project screenshot
my VSTO adds-in references parts of project B
when i make an installation and try to install it the installation gives me an error.
error message
things i have tried is made a installation for project A and installed it first then tried to install Project B but it gives the same error.
you can use advanced installer
i had the same exact problem but was able to fix it with that
https://www.advancedinstaller.com/
this will bundle all your projects.
You have to add files from the project A manually to the add-in installer. For your reference, a similar issue is described on the Error deploying ClickOnce application - Reference in the manifest does not match the identity of the downloaded assembly thread.
For VSTO based add-in, make sure that you did all the steps described in the Deploy an Office solution by using ClickOnce article.

How to create silent installer for Office AddIn

I have a problem to create a silent installer for Outlook Add-In developed using VSTO in C#. The installer is a outlookaddin.vsto generated by clickOnce. This add-in will be published by SCCM in several computers and I need a that the installation be silently but when the package reaches to the final device appear the screen of "Microsoft Office Customization Installer" asking confirmation for install it.
I need create a script with some kind of "autoclick" for clicking automatically on "Install" and "Close" buttons or create a different installer of vsto.
I tried the following methods:
Create script .bat with the following structure:
START C:\Windows\ccmcache\3m\Files\setup.exe setup /S /V"/qn"
Whit this method only the installer is executed as if click on it.
Create a .exe and .msi with "Visual Studio Installer Project". With this
tool only the installation files were copied in "C:\Programs files" but the
add-in is not loaded in outlook.
I made a class in the project for create a custom installer following this
guide of Microdoft:
https://learn.microsoft.com/en-us/visualstudio/deployment/walkthrough-creating-a-custom-installer-for-a-clickonce-application?view=vs-2015
This method not work, when run throws this error: "Could not download
manifest. Error: Value does not fall within the expected range".
I downloaded Advanced Installer 15.9 and created a msi installer. This was the better option until now but when open outlook the first time after install it, appear again the screen of installation, in this case if I clicking on Don't install the add-in follow in outlook but disabled and if I want to enable it, appear the installation screen again.
I add the image of the installation screen.
VSTO installer
You may try this approach:
on a test machine install your current MSI setup, open Outlook and click on [Install] button; this operation will create some registry entries to security inclusion list under the following registry key:
HKEY_CURRENT_USER\Software\Microsoft\VSTO\Security\Inclusion
HKEY_CURRENT_USER\Software\Microsoft\VSTO\SolutionMetadata
export the above registry key and import into "Registry" page of your Advanced Installer setup project; rebuild MSI; install MSI

Visual studio doesn't support specific csproj file

I am getting this error when I try to open the solution file of my project. The solution is 2012 file (checked using notepad).
If I click on Ok, The solution opens up except for one csproject which does not load.
I get a migration report in UpgradeLog.htm file, with the following error for the project which failed to load. Could not figure out much from it.
Error:
The application which this project type is based on was not found.
Please try this link for further information:
http://go.microsoft.com/fwlink/?prd=12395&pver=11&sbp=ProjectTypeDeprecated&plcid=0x409&clcid=0x409&ar=MSDN&sar=ProjectCompatibility&o1=82b43b9b-a64c-4715-b499-d71e9ca2bd60
Does the upgrade report mean that it is a project from previous version of Visual studio? It does not open in Visual Studio 2010 either.
The error doesn't say that Visual Studio doesn't support .csproj files at all, it says it doesn't support a specific project type in that particular project file. This means this either isn't your project as you claim, or you are trying to build it on a different machine from the one used to create the project.
Visual Studio uses various elements in a .csproj file to determine its project type. See How do you tell the Visual Studio project type from an existing Visual Studio project and What is the significance of ProjectTypeGuids tag in the visual studio project file. It does this so it knows how to compile your project, what properties tabs to show, what context menu options should be available and so on.
Certain project types can cause this error. Usually they require some kind of SDK to be installed on the machine used to open or build the project.
You should search the web for the GUID mentioned in the error message you show (the value after o1=). You can also open the project file in a text editor and find the <ProjectTypeGuids> elements, which contains comma-separated project type GUIDs.
Then search the web for those GUIDs to find out which SDK or tool you need to install in order to be able to open or build the project.
If you paste the specific GUID from your error message in your favorite web search engine, you'll find Problem solved: Visual Studio / There is a missing project subtype. Subtype: '{82b43b9b-a64c-4715-b499-d71e9ca2bd60}' is unsupported by this installation., where it is mentioned you'll need to install the Visual Studio 2013 SDK. This means that in this case, your project is a Visual Studio 2013 extension.
This is what documentation is for. You should at least put a ReadMe.txt file in your project directory, explaining what the prerequisites for building a project are, especially when it won't open or build with Visual Studio out of the box.
I had this issue when I used Update 5 for VS 2013.
For me I had to click ok and read the next few steps, that popped up. I was initially clicking cancel.
On mine the project was missing Web Tools, so had to reinstall those and once done it was working.
Hope that helps someone.
This issue also appears when trying to import an ASP.Net project into Visual Studio 2015 Express for Desktop, and can be solved by simply downloading and installing Express 2015 for Web - or by using Visual Studio Community/Standard.
I am currently using VS 2017 v 15.7.4. This error came out of no where without any updates on my part. Usually when I have errors like this I just delete the .vs folder in my solution and that clears the problem. In this case that is what I did and the problem was fixed.
Close VS
Delete .vs folder
Load VS
Note: This was for a Xamarin based solution.
I solved this problem by downloading and installing (Microsoft Visual Studio Installer Projects). Close the project then install. After the installation, open your project then reload .csproj file
I had the same issue with VS 2017.
Eventually i solved it by just enable the SSIS in the following way:
1. In VS 2017 - Click on Extensions and Updates in the Tools menu.
Locate the Microsoft Integration Services Projects.
if you can't find it then you will have to install it first.
Click on the Enable button.
Close VS and start it again and SSIS projects are now available.
enter image description here
This (the error that states "Visual studio doesn't support specific csproj file") also occurs when the .vs folder is removed; however, closing and reopening Visual Studio will resolve the error.

Distributing Outlook Add-In from Visual Studio 2012

I've written an Outlook add-in for our office that I'd like to make available to others for testing.
My Googling has indicated that I should make an InstallShield project in the solution and use that, however my Visual Studio install only opens an InstallShield download page for which there is a dead link.
Following this failure, I attempted to manually add the add-in to Outlook by utilizing the files in the bin directory, but it tells me that it is an invalid add-in.
I'm at a bit of a loss here on how to proceed in making this add-in available for distribution.
You could use click-once, right click the outlook project in solution explorer and select publish and follow the wizard. The only problem would be that you will need to sign the click-once app because office addins are particular about security.
This question has further details.

Office 2010 Add-in deployment

I'm searching the way in order to properly deploy a Visio 2010 Add-in.
I tried to publish it via ClickOnce, and it does the job. But I would like to have just one file, in Setup.exe style.
So I oped for a Setup Project, unfortunately with no success. The files are copied, I see it under the Programs list, but the add in is not registered.
Perhaps you know how to check if Visio 2010 is installed during the installation process, if not abort it, and then register the add in?
Any other solution?
After a long research I found this guide that explains everything, step by step and has an working example! Well done Microsoft!
http://msdn.microsoft.com/en-us/library/ff937654.aspx
Thanks
In order to deploy the addin you have to
Create entry in registry form
installer in
HKCU\Software\Microsoft\Office... (manifest, loadBehavior, friendlyname, culuture etc)
Attach to the installed files .VSTO
and .manifest file
Add VSTO runtime and proper .NET version to the pre-requisites

Categories