VSTO Outlook: HOWTO add a manifest file app.manifest - outlook

I have an VSTO Outlook Add-in which uses some WPF components. I have some problems on WPF components to be rendered correctly. For example, some objects are shown more bigger, etc. I have found a possible solution described here when you mix winform and wpf components. May I guess VSTO Outlook addin in fact are winforms? So I need to specify some configuration in an app.manifest file and I do not know how to create the manifest file. I don't know if the process to create it is the same as a normal winforms app or in case of an Outlook VSTO Add-in is different.
In the link I provided above it is explained to add some setting in the assemblyinfo.cs file, ok there is no problem with it, i have done it, but now I do not know how to add some settings to the app.manifest file. I have seen in the \bin\release folder I have an myAddin.dll.manifest but this file is created automatically when you build the Add-in so i guess i cannot touch it because if so it will be overwritten again when I do a new build/rebuild of my add-in. Also the content within myAddin.dll.manifest, from where is taken?
Please could you indicate me the steps i must follow?
UPDATE:
This link says application manifest file is created automatically, as I was guessing.
Application manifests are created automatically as part of the build
process.
So is there any way to create a post-build action to add a custom setting to application manifest?
One possibility would be to modify the manifest MyAddin.dll.manifest after build process suceed but i would like to automate it. Also i am wondering if there is the possibility to create an additional manifest file and Visual Studio merge it with the default one during the building process.

VSTO add-ins are not standalone applications like Windows Forms. The manifest file is created per-application, not add-in. So, the best what you could do is to create a manifest file for the host application which is Outlook in your case. The manifest file should be named in the following way:
Outlook.exe.manifest
and should be placed to the same folder with Outlook.exe application.
So, if you need to make changes with a manifest file they will be applied to the whole host application (Outlook) and have impact on all add-ins, not only yours.

The manifest works on the application level (exe), but VSTO addins are dlls hosted by outlook.exe, and you cannot add or update its manifest.

Related

Outlook VSTO add-in setup error after installation

I created an addin with VSTO and a setup project with visual studio installer.
Im totally new on creating setups... and im getting something weird here (most likely a rookie problem).
I have what follows...
When i install, files get deployed into the folder, like below... and i suppose its the way it should be.
But when i try the addin, i get the following error, like if the manifest is pointing to a different path:
Then for the sake of testing i copied the manifest into the folder he seeks, like so:
And them, the add-in loads correctly...
Though I need some guidance with 2 scenarios:
where or how can i fix this pointing to that folder?
Is there a way to perform a delete on a specific registry key when program is uninstalled?
Please i have this important job to finish at my work and im burning nails...
Many thanks in advance for your time taken to read and help.
Before installing the add-in make sure it is unregistered (if you debugged the project previously there). Also make sure that your installer added Registry entries for VSTO Add-ins on the target machine that correspond to the actual location.
In general, make sure that you did all the steps describe in the following articles (depends on what installer you chose for deploying the add-in):
Deploy an Office solution by using Windows Installer
Deploying a VSTO Solution Using Windows Installer
Started a new project and copied all the code from the previous one... started working.
I cannot understand what witchery Visual Studio does some times.

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.

VSTO installer and Deployment Manifest file

I am trying to make an installer for a PowerPoint Addin using Visual Studio Installer.
The installer installs each required files but does not execute the VSTO Deployment Manifest, and then my add-in is not included in PowerPoint.
I went to Custom Actions menu and wants to add the action of executing VSTO Deployment Manifest file but I have the following error: not a valid file type for a custom action (it seems to expect .exe .dll .vbs or .js files).
I have searched similar questions and found it but even if the error message is the same, I think the problem is different.
Do you know how to solve it and execute the VSTO Deployment Manifest file?

Outlook Add-ins manifest and Installer folder VSTO

I'm developing an outlook addins vsto using visual studio 2010,
When I publish my project I found a new install folder inside "Application Files\MyAddin_version\Installer\MyAddin.exe.deply"
This is a new file with the deploy, before I was able to deploy without this file.
My question, what setting in my build generate this file?
The problem every time I build my project now I found in the manifest file the new entry:
I'm pretty sure the entry was not found in the old builds, I didn't change the code, but I was trying to change the build and publish, switching between local publish and UNC and http.
(Need to remove this new entry, don't need it every time i build, it causes problem.)
Many Thanks
Sorry it was a bug in my solution, some files were marked as content in the build actions.

Deploy VS2010 Extension (VSIX) and register new file extension on windows

I've created a VS2010 extension to manage a new type of project. I've created the VSIX file with the project and item templates inside, and everything works fine, i'm able to create a new project, syntax highlight, compile it, etc.
What i want to do now is to associate my files (.stadyn) to the VS2010, like a .cs file. I mean, give it an icon and open the VS2010 on a double-click.
Does anybody know how to deploy the extension and add those keys to windows registry?
Thanks in advance.
You have to possibilities.
Create an installer for your extension which is doing all the stuff.
Add the file associations when the extensions first starts.
I would prefer option one, since then you can also uninstall your extension and unregister the file associations and may be do other cleanup stuff. Also you could do other stuff during the install.
Edit:
Deployment is documented in the MSDN:
http://msdn.microsoft.com/en-us/library/ff363239.aspx

Resources