I developed Excel addin. I want to deploy addin it through ClickOnce. Addin publish to a Shared folder. Addin is developed successfully and appears in Excel. but when I change something in Adin and publish an updated version when you start Excel the following error:
The customization cannot be installed because another version is
currently installed and cannot be upgraded from this location. To
install this version of the customization, first use Add or Remove
Programs to uninstall this program: PricelistExcelAddIn. Then install
the new customization from the following location:
file:///C:/Users/sribin/Documents/Visual Studio
2008/Projects/PricelistExcelAddIn/PricelistExcelAddIn/bin/Debug/PricelistExcelAddIn.vsto
Details:
Name:
From: file:///C:/Users/sribin/Documents/Visual Studio
2008/Projects/PricelistExcelAddIn/PricelistExcelAddIn/bin/Debug/PricelistExcelAddIn.vsto
***** Exception Text *******
Microsoft.VisualStudio.Tools.Applications.Deployment.AddInAlreadyInstalledException:
The customization cannot be installed because another version is
currently installed and cannot be upgraded from this location. To
install this version of the customization, first use Add or Remove
Programs to uninstall this program: PricelistExcelAddIn. Then install
the new customization from the following location:
file:///C:/Users/sribin/Documents/Visual Studio
2008/Projects/PricelistExcelAddIn/PricelistExcelAddIn/bin/Debug/PricelistExcelAddIn.vsto
в
Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.VerifySolutionCodebaseIsUnchanged(Uri
uri, String subscriptionId, Boolean previouslyInstalled) в
Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()
How can I fix this problem?
The installation URL of a ClickOnce deployment is a major piece of the identity. You can't install a C/O app from two different locations, and you can't install it from a location that doesn't match the installation URL in the deployment. Having said that, what is your installation URL for your VSTO addin? Surely it's not "c:/users/sribin/documents/visual studio 2008/projects..."
Create a file share somewhere, even if it's on your own machine for testing, and use that as your installation URL, and put the files there.
Related
I hope you all are well!
Visual Studio 2017 -
WIN-FORM -
C#
I added a Setup Project to my app.
I also selected as prerequisites SQL Server 2019 Express LocalDB:
The installer installs the app just fine but does not install the prerequisites SQL Server 2019 Express LocalDB. There are no popup error messages displayed or any in the Event Viewer.
If I download SqlLocalDB, I install it just fine and my app works. But I would like to have it install during the setup installation if it is needed (auto detect).
I tried on various computers and it also doesn't install SqlLocalDB.
I cannot find anything on the Internet that would explain why setup is not installing the prerequisites.
Any suggestion is appreciated.
Regards,
Setup projects are no more supported starting from VS 2019. So if it's a new project - you might want to try WiX toolset project. There you can add checking of prerequisites to be installed on the MSI level, or you can create your Bootstrapper bundle, which will contain installation for both SQL Server and your own app
The issue was that I was using the .MSI instead of the .EXE file to install the app. Using the .EXE did in indeed prompt the user to installSqlLocalDB.
Solution here:
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
So I've created an offline installed of VS 2017 Community on my laptop using this command:
vs_community.exe --layout "D:\Downloads\VS Community 2017" --lang en-US --add Microsoft.VisualStudio.Component.CoreEditor Component.WebSocket Microsoft.VisualStudio.Workload.ManagedDesktop Microsoft.VisualStudio.Workload.NetCrossPlat Microsoft.VisualStudio.Workload.NetCoreTools Microsoft.VisualStudio.Workload.Node Microsoft.VisualStudio.Component.TypeScript.2.0
When I transfer the setup files onto my corporate PC (which is behind a firewall) and run the "vs_community.exe" setup file, all I get is this error. There's no way to bypass the corporate firewall or to make exceptions. How do I install VS 2017 offline? Am I missing something here?
Edit: I have installed VS 2017 on my laptop keeping the internet connection active. Then when I disconnect the internet on my laptop and try installing again, the installer launches! So perhaps there are some dependencies missing on my corporate PC that are now installed on my laptop?
Edit: The above command installs .NET, .NET core, Xamarin, Node.js, TypeScript and C++ for Mobile. The total downloaded size is 13.2 GB.
It worked!! All I had to do was install the certificates into the root CA! Something I missed noticing in the VS 2017 docs:
How to install from the offline installation folder
Install the certificates (They are in the "certificates" folder, which is in your Layout folder. )
Simply right-click each one and choose Install PFX.
Specify Local machine (not current user)
You can use an empty password
Run the installation file. For example, run:
c:\vs2017offline\vs_enterprise.exe
--- Microsoft Docs
Edit: Remember to install the certs using the Admin account on the PC, or it won't work...
Please try to follow this steps:
Right click on exe file.
Select "Properties".
Click on the "Digital Signatures" tab. Now you can see "signature list".
Select signature
Click on "Details" button.
Click on "View certificate" button
Click on "Install certificate" and follows installation wizard
All certificates within "signature list" should be installed. I use Windows 10.
Was doing this for VS Community 2017 and it would install everything and it does the core installation without any trouble. However, if i select to install the universal or .Net development portions it will install it almost completely, but it will fail on two files. It will say that it cannot download the files from the internet. The files exist in the installation directory and I even went and downloaded the files and placed them into the appropriate directories and it still thinks that it needs to download those two files preventing me from completing the installation process. If I just continue it will install everything else except those two files. I've tried this with a few different layout downloads in different forms (ISO, directory, etc) and same issue (so it isn't a bad download or anything, and I'm sure I did that all correctly). The two files are:
https://download.visualstudio.microsoft.com/download/pr/10983757/f8c877406947fdc71ed2dd9127d2f9fa/microsoft.codeanalysis.visualstudio.interactivecomponents.resources.vsix
https://download.visualstudio.microsoft.com/download/pr/11347028/25bedee219940beceecab91dac231235/microsoft.visualstudio.testtools.testplatform.legacy.core.resources.vsix
If I plug myself online and do a repair it will go grab those two files without having to grab everything else, but it kind of defeats the purpose. Don't expect a solution, but wanted to mention it because all the other problems are related to installing the certs and I can't find anything online about it failing on just a few files.
In my case it was related to CNG key isolation windows service, it was disabled, the solution mentioned in below link:
Visual Studio 2017 - Can't install
How i solved mine.
I downloaded the setup helper from Microsoft website (i downloaded the enterprise installer, because that's the offline installer version i have )
I ran the program, and it wanted to download the complete setup, so i cancelled it
I ran my offline installer (vs_Enterprise.exe)
Then it fixed the issue.
I disconnected the internet, and continued with the offline installation
I have the same issue after uninstalling SSDT for Visual studio 2017, Can't remove and reinstall or update visual studio 2017.
I just restart my machine and it's OK.
my be you have also to log in as an administrator ( it depends on your machine configuration and what you can do with you current account)
Edited to avoid misunderstand
Running the downloaded Visual Studio layout as administrator worked for me.
Maybe the VS_Version.exe try to normally download the files because it can't access to files in the layout (sometimes named backup), like me, in my job we have a lot of restrictions and when I ran the VS_version.exe tried to download and get the message error, but when I ran again the .exe as Administrator the installer started normaly, getting the files from the backup folder
I got my app successfully published, ran the setup.exe just fine, but it lloks like the app was installed in an odd place, buried way down deep:
C:\Users\sndevfarmsvc\AppData\Local\Apps\2.0\HQ0721DB.Z4Q\8TDK6PMR.A39
Is this normal? In the publish section of the project in VS 2010 there is a place for installation folder, but that requires a URL....what if I want it always to install to c:\program files\ on whatever machine it is run on?
thanks,
Phil J.
Yes that's normal for a ClickOnce application.
The installation folder is the location where there application is installed from.
If you want to install into a different location you'll have to use a different installation program.
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