Error when opening Word document that was created by VSTO Template - deployment

I have created a new Visual Studio Word 2010 Template project, now I want to deploy it using a Windows Installer setup.
I followed this tutorial using Visual Studio 2012 with InstallShield 2013LE.
After installing the setup and opening the Word Template, it seems to work fine. However, after saving the template as *.dotx-document and opening it again the Installing Office customization dialog appears.
The message says There was an error during installation: Downloading file file:///[Path to the dotx file]/WordTemplate.vsto did not succeed.
To check whether I've made an error creating the setup and registry entries, I also tried Advanced Installer 10.9 Office Add-In setup, that creates the required entries automatically. It also fails with the same error message.
There is nothing special about the VSTO Addin. I started a new project for testing purposes, that adds a ribbon and a header to the Word Template file.
Finally I tried the built in Click-Once installer, with success, newly created documents can be opened without any exception. But it comes with some limitations. I would like to add some files and let the user choose the installation path, what doesn't seem possible.
So what am I missing to deploy my VSTO AddIn?

I believe that such a problem is coming from proxy server issues. The proxy server on the client machine is blocking the download of your vsto file that is considered as an executable file.Unfortunately the only solution I see was stipulated in an old post proposing to zip your installer and to send it to users ( which is not optimal, I must agree).
You must also run a command to clear the app cache any time you deploy (from your windows console):
rundll32 dfshim CleanOnlineAppCache
Hope that helps !

Related

Maui Blazor Hybrid - Cannot double click on the exe in the bin folder

I recently installed the preview version of visual studio and created a new .net maui blazor hybrid app.
When debugging the app, a window shows up and everything works just as expected.
However when i go to the bin folder and run the exe that is located there the window does not come up.
In the windows event logs i can see the following:
Exception Info: System.DllNotFoundException: Unable to load DLL 'Microsoft.ui.xaml.dll' or one of its dependencies
And indeed that dll is missing from the bin folder.
What does visual studio do to make this work? How can i just run the exe?
Right now we only support so-called “packaged” apps. Those you need to publish to an MSIX and install in order to run.
We’re working on adding the unpackaged scenario as well, you can track that here: https://github.com/dotnet/maui/issues/3166
While searching for the above issue I noticed a couple of others ones though. According to this and this it might already be possible right now, you might want to try!

Installshield msi unable to register flash.ocx

I am creating an msi installer using an Installshield setup project. The application is currently working correctly and is in use as a Click-Once application, but there is now a business requirement to create installation package (i.e. an msi installer).
Installer "works fine on my machine", but on a user setup it throws:
Error 1904. Module [path]\flash.ocx failed to register.
HRESULT -2147220473
I have confirmed that flash.ocx is being copied to the program directory.
The file appears to be a dependency of Crystal Reports, which is embedded in the application.
Edit
flash.ocx, I've found out, is specifically a dependent of CrystalDesisions.Windows.Forms. It is used in the CrystalReportViewer control.
I googled for just that string and this was the 2nd response. Have you tried this?

How to deploy an Office VSTO add-in using Visual Studio 2017

I've created an Outlook add-in, debugged and works fine. I want to be able to package it up for distribution. This is for a very limited audience 5-10 people. What are the steps to doing so?
I tried Build | Publish which appears to work (using options of local filename and CDROM install location), but creates a massive 1.5MB setup.exe file and when it is executed, takes forever (it appears trying to contact some remote server and times out and pops an error, although the add-in appears to be registered).
Looking online, I found references to creating a SetupProject or using InstallShield Limited addition, but none of those appear to apply to Visual Studio 2017.
I'd be happy if I could just provide my DLL and a .reg file -- this is for a small set of 5-10 power users.
What is the simplest way to deploy this add-in?
The easiest way is Build | Publish. Just disable any online activities if you don't want it. You can do that in Project -> Settings -> Publish. Check your "Updates" settings for example.
You can download a Visual Studio project type from here:
https://marketplace.visualstudio.com/items?itemName=VisualStudioProductTeam.MicrosoftVisualStudio2017InstallerProjects
This will allow you to deploy the package, but it's somewhat buggy in my opinion. Also, the link above does not have any documentation. You have to go to another page for that and the answer is buried in the comments:
https://msdn.microsoft.com/en-us/library/ybshs20f(v=vs.90).aspx
The ClickOnce has worked more consistently for us, however. Just right-click and select Publish on the Project.
It is a long ways off from the old InstallShield LE process, which allowed you to customize the entire process including images, click-through licensing, etc.
But the InstallShield LE had it's own set of issues, and seems to have been all but abandoned.
It may be worth looking at other 3rd-party tools like WiX (http://wixtoolset.org/) to get things installed correctly, or even manually writing your own installer to get things put where they need to be.

Office.JS "This add-in is no longer available" error

Suddenly I started getting an error while loading an add-in:
Error : "This add-in is no longer available: addin inserted during development are only available during debugging from visual studio. Please open your project in visual studio and re-run your application or deploy your add-in into a valid catalog and reinsert."
When I used to run the project the addin used to load automatically. Now I am getting above error.I haven't made any changes to code and word.
Note: I have installed Fiddler today but after that add-in was working. I have reset my add-in but no use.
I was not able to resolve this error. As a workaround I have created new project copied only home.html,home.js and other JS and CSS files and it works.
I also had this error recently in O365 Excel on Windows 10 but not in O365 Excel Web. In the end I solved it this way:
I ran npm run validate
This gave me a list of validation errors for the manifest.xml
I fixed the validation errors (In my case some String ids were too long)
I (re)started dev server npm stop npm start
So it seems like O365 Excel Web can cope with invalid manifest.xml to some extend whereas the app has a strikt validation of the file. I wish Office would output a meaningful error message in stead of a missleading "This add-in is no longer available". This did cost me roughly 6 hours to find out...
I had this error not for studio code but with excel but it is kind of linked
I put the staging manifest that does not contain localhost url (this was the error return during validation)
and I replace then one by one with dev config even at the end I put back localhost and it works so there is a kind of cache somewhere but I did empty the cache.
between each step I click on the drop down of Excel insert/my add in arrow and the app name under developer add in

Is it possible to load an instance of a VSTO addin from a network drive?

I've got a VSTO 3.0 Word Addin. Around here, they do all work off network drives (for backup reasons, etc etc).
Anyway, when I'm in the IDE, I can run my project, it automatically starts Word, i can debug, break, etc, just fine.
HOWEVER... If I compile the project, then run Word OUTSIDE of the ide, the Addin registry entry is, of course, still pointing to the NETWORK copy of the VSTO dll, not a local machine (C Drive) copy, and the addin always fails to load.
I can copy the DLL down to the local machine, update the registry to point to the C: location, and then run word and it loads fine.
But I was wondering if there's any way to config VSTO to be able to load an addin from a network share directly.
I've tried setting the "TRUSTED LOCATIONS" in Word 2010 to point to my network location, but it didn't help.
The only oddity in doing so is that the error message I get back from Word when I have VSTO_SUPPRESSDISPLAYALERTS=0, contains a path of file://j:/path/path/path, ie a mapped drive letter.
BUT, when I try to add the j:\path location to my "trusted locations" in word, it always converts it to a full pathspec, ie \domain\dfs\path\path.
I'm wondering if that mismatch is what's screwing it up, but I can't find anyway around it.
Well, as far as I can tell, it's just not possible to load addins on a network drive without running them in the IDE. If someone comes along and knows otherwise, I'd love to know, but I'll go ahead and mark this question closed for now.
Essentially, what I've done is create a little REG script that reregisters the add in to point to the local drive, then, when I need to run as a release (ie NOT in the VS IDE), I compile, copy the dll down locally, and run the regscript. Not great, but not too bad either.
See the registry key to enable VSTO 4 loading of network add-ins here: Installing VSTO 4.0 Causes VSTO 3.0 Addin to quit working