Clickonce and app.config - installation

I am installing a WPF Application using the ClickOnce deployment. There are certain settings in the app.config that need to be changed after the Application is installed. Although the app.config exists in the deployment folder as assemblyname.exe.config.deploy , after installing the application I can't seem to find it on the client machine so that I can change the settings.
Where do I look for it, any pointers?
Many Thanks.

The application configuration is located in here (replace <username> by the username, XP users look in "Document and Settings"):
C:\Users\<username>\AppData\Local\Apps\2.0
It's located in one of those semi-cryptic subfolders, but I'm sure you'll get it :)

You should use SlowCheetah (a VS extension). With this you can create a transformation for your app.config file based on your build configuration (i.e debug/release). Then when you publish with ClickOnce your app.config file (or any other XML file for that matter) will be transformed into the ClickOnce package which gets published. You can find a sample at https://github.com/sayedihashimi/slow-cheetah/tree/master/SlowCheetah.Samples/Wpf.Transform.

as per How to get folder path for ClickOnce application, you can get the folder of a running task by right-clicking it in the Task Manager (or for earlier versions of windows in Process Explorer from www.SysInternals.com)

Related

APP INSTALLER FILE not generated when publishing .Net Maui Application using MSIX

Trying to publish .Net Maui Application using MSIX, but the 'APP INSTALLER FILE' (.appinstaller) and all of it's content isn't generated. I am using the Visual studio method (including SideLoading) of publishing where you right click on the project and press Publish.
Using Windows 10. My App's TargetPlatformMinVersion:
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
Here are the steps I followed:
Right clicked on the project and select publish then the following images are from the wizard.
The result:
In the last slide The Bundle is set to No and the required Operating System in blank, I dont know if this is the issue, but if it is how do I fix this.
Then I press Copy And Close, but no installer file and MSIX bundle files have been generated in C:\Dev\Installer. It is empty, but there should be a bundle and an installer file which I can use to push updated to the app that users have installed.
Generated Settings in my project:
<GenerateAppInstallerFile>True</GenerateAppInstallerFile>
<AppxPackageSigningEnabled>True</AppxPackageSigningEnabled>
<PackageCertificateKeyFile>..._TemporaryKey.pfx</PackageCertificateKeyFile>
<AppxPackageSigningTimestampDigestAlgorithm>SHA256</AppxPackageSigningTimestampDigestAlgorithm>
<AppxAutoIncrementPackageRevision>True</AppxAutoIncrementPackageRevision>
<AppxSymbolPackageEnabled>False</AppxSymbolPackageEnabled>
<GenerateTestArtifacts>True</GenerateTestArtifacts>
<AppInstallerUri>C:\Dev\Installer</AppInstallerUri>
<HoursBetweenUpdateChecks>0</HoursBetweenUpdateChecks>
I'm having the exact same issue. I followed the publish wizard and both the .appinstaller file and index.html file are not generated, while the folder containing the MSIX file and all the other content is being generated as expected.
I am starting to think this is a bug from Visual Studio, so I'm hoping a new release will fix this.
For now, I managed to make it work by creating my own .appinstaller file and put it into the installer location. I know this is not a definitive solution as it requires me to manually update the .appinstaller file every time a new version is deployed. At least I am able to get client apps to update automatically though.
Here's an example of the file:
<?xml version="1.0" encoding="utf-8"?>
<AppInstaller
xmlns="http://schemas.microsoft.com/appx/appinstaller/2017/2"
Version="1.0.0.0"
Uri="uri where this file is stored (including the file name), i.e. the installer location" >
<MainPackage
Name="Application GUID found in project's properties"
Publisher="This has to match exactly what is the subject in your second screenshot, e.g. CN=John Doe"
Version="Your package version"
ProcessorArchitecture="x64"
Uri="The location of the generated MSIX file of the latest version" />
<UpdateSettings>
<OnLaunch
HoursBetweenUpdateChecks="0" />
<AutomaticBackgroundTask />
</UpdateSettings>
</AppInstaller>
Once I am ready to deploy a new version, I follow the same publish wizard to generate the folder containing the MSIX file and then I need to manually update the code above with the correct version and MSIX URI.
NOTE: I tested this on the .NET MAUI Blazor default application as I only wanted to figure out how to deploy and push updates, more complex applications might need additional information in the app installer file.

VS2019-Generated Published App Package contains file locations on my computer

I am new to Xamarin and am trying to publish my application as a side loading package. I use VS2019 to publish the UWP application. The problem I have is that the AppInstaller file that Publish generates contains explicit references to folders on my computer. This, of course, works on my computer, but does not on anyone elses' computer. Here is an example from the AppInstaller file:
Uri="file:///c:/SpectrumApp/SpectrumApp.UWP.appinstaller"
I can write a powershell script to modify the App Installer file to contain the correct file path for a given system, but that seems like a workaround to some basic thing that I am doing wrong with the Publish capability built into VS2019.

How to make .NET Setup Project install program to something other than Microsoft

How do I make .NET Setup Project install program to something other than Microsoft? I've tried modifying the Assembly Information, but that didn't do it. Is there a settings file of some kind that will force the setup project to install to a folder that I specify?
Select the deployment project in VS. Choose View → Editor → File System → Application Folder. Choose Properties. The DefaultLocation property is where the app gets installed by default.
Desktop apps should be installed to the user's Program Files folder, there is a Windows Installer property value [ProgramFilesFolder] for this.

How to publish console app into executable

When I publish my console app I get three files:
Application Files (Folder)
ClickOnce Application
setup
There has to be a way that gives me just a .exe that has everything the app needs to run within in.
I'm using Visual Studio 2010, and don't see any obvious options that would allow me to do this.
Note: Using the setup file appears to just make a shortcut to the ClickOnce Application that I already have.
Look in the bin directory of the application, it should have published an executable for you.

Sharepoint 2010 deployment problem

I have a VS2010 solution with two projects, MyProject.Silverlight and MyProject.Sharepoint. I want to automatically deploy the .xap silverlight ouput into the VirtualDirectories\80\wpresources folder.
The sharepoint project has a single module which references the silverlight output xap file using "project output references". The sharepoint project is configured with the "WebApplication" assembly deployment target.
If I set the .xap deployment type to anything other than ClassResource, the file ends up where I would expect it to be. However, if I choose ClassResource (which is the correct one, right?), I cannot see it being deployd anywhere.
This seems to only be the case when I use the "project output references" option. If I manually add the xap file as an existing item and choose deployment type ClassResource, it ends up in the correct folder.
Any clues?
If you want the XAP to be deployed at VirtualDirectories\80\wpresources, why would you choose ClassResources ?
The resources get embedded within the assembly which probably you are not looking for.
http://msdn.microsoft.com/en-us/library/aa543289.aspx

Resources