Copy folder contexts using ClickOnce Publish in VS - visual-studio

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?

Related

Separating the clickOnce setup.exe

I am trying to deploy the setup.exe that click once creates to users through sccm due to business practices. The issue I am running into is that when I move the setup.exe out of the folder that contains the .VSTO, then the computer the setup.exe is being run on cannot find the VSTO. Is there anyway when publishing to have that setup.exe file look back at the file server that contains the VSTO?
A bootstrapper (setup.exe) just check for prerequisites before running a real installer app for installing the software. Running setup.exe separately doesn't make any sense.
There are two main ways of deploying Office applications:
Deploy an Office solution by using Windows Installer. It is used for centralized deployments like SCCM.
Deploy an Office solution by using ClickOnce.
You may find various custom installers that may embed everything into a single setup.exe file. For example, you may take a look at InstallShield or Advanced Installer .

UWP publish output always in test folder

Why is it that even though I have the build setting in Visual Studio set to Release everything I create within a side-loaded UWP distribution is placed within a folder with _test on the end? Is it because MS assumes a side-loaded app is always a test app?
I place my appxbundle files within AppCenter and I'm using AppCenter to distrubute our internal production apps to our internal employess using AppCenter.
Here is the main reason I'm even asking. I have tried to publish an appxbundle to the AppCenter for my employees to download and install. Problem is, these target laptops don't have the Microsoft Store installed (don't ask) so the appxbundle won't auto-install. So, when I try to install via a powershell script I can clearly see that the dependency for Microsoft.NET.Native.Runtime.2.0 isn't being met and the install fails. When I extract the appxbundle for my app I see no dependencies are included. But, if I explore the root folder that my app is published to, I can find the Microsoft.NET.Native.Runtime.2.0 is there, it's just not making it into the appxbundle file. In order to install this app on these laptops I have to enable developer mode, I have to zip up the entire published folder, send this zip file to the user, have them extract it, then have them run the powershell script within the root folder. This powershell script installs my appxbundle, cert, and includes all dependencies.
I read HERE the following:
App Center always generates an app bundle. However, Debug builds are
not meant to be used for sideloading. ...and the provided .appxbundle
files in the Test folder do not contain required dependencies.
Since my dependencies are not included within the appxbundle and based on what Microsoft said, it appears my app is being generated as a Debug build even though I'm selecting Release within my IDE before publishing.
Sadly it's hard-coded in the msbuild file "Microsoft.AppxPackage.Targets"
Location for VS2019 C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VisualStudio\v16.0\AppxPackage\Microsoft.AppxPackage.Targets
Or as MSFT UWP Engineer Nico Zhu said in the comments: "it is by design"
See also: Customizing Visual Studio MSIX packaging project output

Manually Configure Microsoft Entity Framework and SQLite Provider

How can I manually add the SQLite Entity Framework 4.0 provider without using the installer setup so that the Visual Studio New EDMX wizard will be able to use it to create a new data model?
I'm not sure which provider you are using, but I am asuming you are using the System.Data.SQLite provider available from http://system.data.sqlite.org/
In order to use the Design Time support in Visual Studio, you must download the installer and install everything. This will setup the Design Time support and also install the System.Data.SQLite and System.Data.SQLite.Linq assemblies into your development machine's Global Assembly Cache.
For your application to access the SQLite database, you will need to add a reference to those two assemblies to your project.
To do this, right click on the project and select "Add Reference". If you ran the installer, the two assemblies will be in the list. If you can't find them, download the assembly files from the website, put them anywhere on your drive and reference them by selecting the file.
To distribute your application, you simply need to send along the assembly files. The easiest way to do this is to put the two dll files in the installation folder.
You can do this by right clicking on the reference in the visual studio Solution Explorer, and selecting Properties. Here, set Copy Local to True. Now when your application compiles, a copy of the SQlite assemblies will be put in your target directory.
If you are deploying the files manually, simply copy along the assembly files and keep them in the same folder as your executable. If you are using One-Click Deployment or any other kind of Deployment, make sure the assemblies are deployed together with your application.
Note that, as far as I know, the assembly version used by the Design Time support must be the same version as the one deployed by your application. So if you update the one, make sure you update the other as well.

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.

VS 2008 Express - clickOnce question

I have the VS Express 2008 where there is only ClickOnce deployment option. I need my app to be simple ran by clicking on the exe file without any installation.
I have found out that after deleting both manifests and icon /which is always in the output directory even though its embedd with "Do not copy" option/ it works well. Is it ok or is there any cleaner way how to do that? I mean, if the app is not being installed but only ran, do I still need external manifest files? I tried to embedd them but these still persist external (tried "Embed manifest with default setting" option or add my own and selected from list).
EDIT: In the Express, there is only ClickOnce.
Thanks
If you want to run it from the exe, ClickOnce isn't quite right. ClickOnce executes as a .application, and you should be able to just click the radio button (on the "Publish" tab) for "The application is available online only", which avoids any local ClickOnce install.
Otherwise, just build as Release and take the /bin/Release output; this is your standalone exe app. To get the right trust, a .NET exe can be executed from:
local drives
mapped network drives (f: etc) with the right .NET service pack
anywhere if "caspol" has been used to set a policy
I believe in Visual Studio Express, ClickOnce deployment is your only choice.

Resources