WPF ClickOnce - Publish Location information - wpf

I was wondering where in a VS (2015) project the information under Project > Properties > Publish was kept? On a Web application there was a publish file that contained all the information but I cannot see where this is now kept when doing a ClickOnce WPF application.
I am looking for a means to automate publications to different servers(with different Publish Locations) but cannot see what I would need to update to change where the click once application is published to.

I believe its part of the csproj file. Look for InstallUrl.

Related

WPF publish application files

I am trying to publish a WPF application using the publish section in the project properties. When I attempt to specify application files (i.e. references) for the publish, I see lots of old dlls that were once in the project but were deleted later.
Is there a way to clean up this list so that it matches the references actually used in the project ?
It is not possible without extensions. However you can check this question for more details. There are also some extensions listed you could use.

Microsoft.EnterpriseManagement.CompositionEngine and Microsoft.EnterpriseManagement.Presentation.Core cannot add to Silverlight Project

I am authoring a management pack with custom views using Silverlight / WPF (shared code) and MP authoring console and MP authoring tool in Visual Studio.
I am following this tutorial on custom views.
Widget for SCOM operation and web console - custom
In Section 4.1: It mentions: Add a reference to Microsoft.EnterpriseManagement.CompositionEngine and Microsoft.EnterpriseManagement.Presentation.Core assemblies. These can typically be found in the Console folder of the Operations Manager installation. Attention: the assemblies from the RTM/CU1 installation will not work! You need to download the sample project files and use the included assemblies.
I cannot add references to the Silverlight project. I get an error message:
Is there any way to get around this?
I understand that the .net runtime is different than that of Silverlight. Yet, this tutorial shows a working example, so it there a missing step or a different binary. What am I missing?
In Section 4.1: It mentions: Add a reference to Microsoft.EnterpriseManagement.CompositionEngine and Microsoft.EnterpriseManagement.Presentation.Core assemblies. These can typically be found in the Console folder of the Operations Manager installation. Attention: the assemblies from the RTM/CU1 installation will not work! You need to download the sample project files and use the included assemblies.
The important bit is the bit in bold, you need to download the sample project and copy the references from there. Were you doing this?
http://gallery.technet.microsoft.com/Creating-a-Widget-for-104711ac
If you download this zip and go to the following sub directory
\Creating a Widget for Operations Manager Dashboard - Walkthrough %231.zip\Creating a Widget for Operations Manager Dashboard - Walkthrough #1\Section_4\AlertSummarySilverlight\Bin\Debug
You'll see the two assemblies in this folder. Copying them out of the zip into another folder and add a reference to them. This works for me in Silverlight 5.

AppHarbor WPF ClickOnce

I have an open source WPF application hosted on GitHub: https://github.com/tomhunter-gh/SourceLog
What I was hoping to do was add ClickOnce deployment and host the ClickOnce install on AppHarbor so that users are automatically upgraded when I push new commits to GitHub. What I'm looking for is an auto update feature similar to the GitHub Windows client, and I'm also hoping to find somewhere to host the ClickOnce install bits for free.
I have a number of questions:
How does AppHarbor actually work? As far as I can tell it expects a Visual Studio solution containing a single web application project, which it then builds and "deploys". What specifically does it look for to run, what assumptions is it making? What happens when you have non web projects, or your solution isn't in the root directory for example?
Is there any way to customise the build and deployment process, for example with custom MSBuild scripts?
How would I ensure the WPF project is "published" so that the ClickOnce bits are generated?
Is there any way to get a build number from the AppHarbor build process? E.g. a four part assembly version 1.2.3.4 and write that to the generated binaries/config?
Is there any way for AppHarbor to push the ClickOnce bits back to GitHub after a successful build, so that I could instead host the ClickOnce install on GitHub?
Should I be taking a completely different approach?
It turns out this is entirely possible and the steps are as follows:
AppHarbor
Ensure you are using a Web Worker process.
Add an application in AppHarbor and connect it to your GitHub project.
Solution
Add a web application project to the solution
Copy the v7.0A Windows SDK folder (C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A) to a folder alongside the solution
WPF Project
Set the DefaultTargets attribute of the Project element to Publish.
Set the PublishDir property to $(OutDir)\_PublishedWebsites\{ClickOnceHostWeb}
Set the UpdateUrl property to http://yourapp.apphb.com/.
Set the following additional properties:
<GenerateBootstrapperSdkPath>$(MSBuildProjectDirectory)\..\Lib\Microsoft SDKs\Windows\v7.0A\Bootstrapper</GenerateBootstrapperSdkPath>
<SdkToolsPath>$(MSBuildProjectDirectory)\..\Lib\Microsoft SDKs\Windows\v7.0A\Bin</SdkToolsPath>
Further details are available in my SourceLog blog post, and a full example is demonstrated by the the SourceLog project on GitHub.

Special Folder "Common Application Data Folder" not available in my setup project. Why?

I want to create a Visual Studio 2010 setup project that deploys some files to a folder where my application can use it from. I want it so, that all users have the same files, and that they also could manipulate them without admin rights.
Thus, "Common Application Data Folder"* as described in this MSDN article, seems fine.
However, in my Visual Studio 2010 setup project I did not find the "Common Application Data Folder" available in the "Add special Folder..." drop down menu.
I have a .NET 4.0 WinForms app and see no reason why this does not show up.
The user's common application data folder is available but does not match my intended use.
Thanks for any hints!
Visual Studio setup projects do not have a predefined folder for common Application Data. However, you can install files in it like this:
add a custom folder and select it
in its Properties pane set DefaultLocation to:
[CommonAppDataFolder]
in this folder add the files you want installed in common Application Data
During install CommonAppDataFolder will be automatically resolved by Windows Installer.
A more specific solution might be to set the DefaultLocation property to:
[CommonAppDataFolder][Manufacturer]\[ProductName]
Manufacturer and ProductName will be resolved from the values you assign to the corresponding properties of the setup project.

Localization of a WPF ClickOnce application with LocBaml

I'm trying to use the LocBaml way (this might be my mistake) to localize a WPF application, but this application is deployed with ClickOnce and the publishing process doesn't pick up the localized .resource.dll.
I do add the files to my ClickOnce manifest, and I can see that this part works because when I launch the application, I get an error saying that the application can't find fr\LocalizationTest.resource.dll. (So at least it knows it should be there...)
The normal way to include a file in a ClickOnce application is simply to add it in the Project Properties -> Publish -> Application Files menu, but my localized resources are not in there.
What can I do ?
Turns out adding a dummy Resources.fr.resx in the Properties folder fixed the problem. With that the publishing process picked up the translated .dll and the ClickOnce application worked as expected.

Resources