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.
Related
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.
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.
I have a clickonce application that has a console application foo.exe which simply launches a windows forms application bar.exe. I deployed it using visual studio to a network share. Life happened and I no longer have the project that I used to publish the original clickonce application. I need to replace the bar.exe windows froms application.
What is a good way to accomplish this?
Use MageUI. Make sure you back up your full deployment before doing anything. Then replace the bar.exe file
Open the application manifest (the one without the .application extension), save, and re-sign. Then open the deployment manifest (the one with the .application extension), save, and re-sign.
You could use the command line version of Mage as well, but for a one-off scenario, the UI version will be easier.
I'm developing an WPF application that has an reference of a C# Class Library.
That C# Class Library has a few XML files that i'm copying to output as embed resources.
When i debug the WPF application, those XML are copied to debug folder of WPF and the app runs properly.
But when i publish the application i get errors because the application isn't finding the resources.
I must admit i'm just now introducing to WPF, so i haven't understand yet the process of publishing and installing the application.
Those XML files should be published by VS in "Aplication Files" folder of the published folder? If yes, what i'm i doing wrong?
By the way, i'm accessing those files in my code (of C# Class Library) from AppDomain.CurrentDomain.BaseDirectory
Thanks
Are you using click once for publishing? you can define what dependencies you need and for each one where place must have.
I have a problem with ClickOnce publishing of a WPF application.
If the application is built (debug or release), it is running correctly.
Application published by ClickOnce crashes.
I tried to change Target Platform. Sometimes this change helps to solve problems, but not every time (1 of 20 cases).
I have Visual Studio 2008 and the project has been upgraded from Visual Studio 2005.
Any ideas?
Thank you in advance!
On the machine where the application is installed, drill down in the user profile to the ClickOnce cache, and look for the cached application files. The folder will have the exe and all of the assemblies, etc., in it. Our winform app creates two folders, xxxx_tion is the one the application runs from.
Find the exe file and double-click on it to run it. This essentially runs the application without the ClickOnce-ness of it all. If it crashes, then it is not a ClickOnce problem per se, it is a problem with your application.
I would check and make sure you are deploying all of the files you need, you don't have references to multiple versions of the same dll, you don't have circular references, etc.
Good luck,
RobinDotNet
There is a long discussion on http://social.msdn.microsoft.com/forums/en-US/wpf/thread/3e6909ef-2ab1-4b77-8bc2-796c065a6219/
Solution that worked for me (send by pindurav on page above):
I rebuild whole solution
close visual studio
open visual studio, open project and directly publish without building.
= no app.xaml exception