I am getting "myApp stopped working" after installig my WPF(+telerik) application - wpf

I created a WPF application using telerik control suite (WPF telerik controls and ORM access control) and SQL Express R2 2008 in VS 2012.
Then I created its setup files (using install shield LE and also Advanced Installer) which works on my win7 system, properly () .but when I install the setup file on any other win7 system, it doesn’t work( I am getting this error: “MyAPP has stopped working”).
I installed .NET framework and SQL Express R2 2008(the service’s status is running) and I also copied the mdf and ldf files related to the database in right path that specified in app.xaml.
When I install my setup files, it just copy my project’s debug folder (contains the telerik control dll files, the dll file related to my ORM access control project, built exe file and etc.). I think that’s enough. Isn’t it?
Edit:
The project's Solution's Explorer:
\bin\Debug
I have no idea what to do.
I would really really appreciate any hint or comment.
Regards,
Hiva

I know this is a very general answer although without knowing the details of your project it's the best I can do. I remember when I was creating an app using telerik controls, when I went to publish it I was getting errors in the with the assembly which was a result of including the obj / Debug / Release folders in my project. I tried everything that people listed to get rid of the errors but the only thing that helped was creating a new project, copying in the code and NEVER including(Never right clicking and hitting include in project) those folders in my project.
Is it working when you debug it?
Could you please let me know what steps you are taking to publish the app ?

Related

Published application requires visual studio to run

I have developed a WPF application and I need to try it on other computers.
1- I change my project properties to build in release mode and rebuilt project. However, /bin/release folder is empty and it still generates /bin/debug folder.
2- I selected publish and install it on other computers. Funny thing is, the program is not running if that computer does not have Visual C# (.Net Framework, Sql server etc. does not cause a problem)
3- I added a installer and add project output(release) to this application. It says /bin/release/abc.exe couldn't be find.. Changed it to project output(debug) and it builds fine. However, this setup is not even working on my computer..
So my question is simple... How can I publish WPF application in release mode and how can I run them on other computers without installing Visual C#. Thank you in advance
Check properties of your project, and set output folder for Release configuration.
You need .NET 4 framework installed on PC, to run (simple) WPF application.
Should work, when you set your output folder, see 1.

How can I determine an application's software prerequisites?

I'm developing a small WinForms program for home use - I have no intentions to releasing it anywhere.
Running it on my development machine, where I have Visual Studio and .NET and whatever else installed, works but deploying it on my PC, where I might not have all those frameworks, doesn't. I'm using some library written in C++ so I'm assuming I'm going to need some version of Visual C++ Redistributable, but I'm not sure which? And I'm not sure if that would be all. So, how can I determine an application's software prerequisites?
I used Dependency Walker and I got a message IEHIMS.DLL - Error opening file. The system cannot find the file specified (2), but that's all I could make out; there is so much information I'm having trouble make sense of it all. Besides, according to a quick google, IESHIMS.DLL has something to do with Internet Explorer, so it shouldn't really matter.
Thanks in advance to anyone taking to the time to consider my question.
Kind regards
For framework you can set the prerequisites for your application by going to project properties -> Publish -> Prerequisites. So now, if the required framework is not installed on the deployment machine, the setup will prompt for an install.
Now, for other dlls you are using, copy those dlls to your bin folder of the project and add the files while creating setup. This will solve the problem.

Including winforms installer in UppercuT code_drop

Does anyone know how to specifically include a winforms setup project to be included in the code_drop folder generated when running UppercuTs zip.bat? With the default settings my web applications and WCF services are included, as are the dll's for the solutions core, but not my winforms application/installer
I was just playing around with UppercuT last night, and I ran into the same question.
One tip I found for putting console apps and windows services into the code_drop is to use this Nuget package in your console/windows service projects:
http://nuget.org/packages/publishedapplications
See this for more info:
http://devlicio.us/blogs/rob_reynolds/archive/2011/03/22/published-applications-aka-publishedapplications.aspx
Using this will cause your console/windows service projects to be "published" similary to how a web app is published in the code_drop. However, this isn't what you're asking for, just wanted to point it out if its useful. This also doesn't work for installers.
If your installers are using the default Visual Studio setup projects (.vdproj projects), I haven't tried that, so I can't help there. I do know that MSBuild refuses to build those types of projects (not sure why...), so you might be better off using WiX or another installer technology. You can do an automated build on a vdproj if you run the build by calling devenv.exe directly from the command line, but you can't build those with MSBuild. I did try adding a WiX setup project to my sln, and UppercuT will build the Wix setup project and drop the .msi in the "build_output" folder, but it doesn't copy it over to the code_drop. My thought would be to add a custom post build step to just copy that file over from build_output to code_drop. I haven't had a chance to figure out the logic in the build scripts to see how it chooses which files to copy from build_output to code_drop. If I figure anything out, I'll update this answer.

clickonce file missing

Using Clickonce with VS 2010 and .NET framework Client profile 3.5, I have several file folders with application level XML and/or textfiles that are needed at runtime.
The file folders sits in the same project where they are to be used.
These files are marked as "Copy always" at compile.
Build Action is "Content".
On my development machine the files are actually copied into the ./Bin/Release/myFileFolder/xxxxx and all is fine.
On user's computer, install runs fine but some files are reported missing at runtime when the program need them.
Do I miss something? Is any file specific option deep hidden in the option list?
Help please! and .NET framework 3.5
If the files are in referenced projects then they are not included in the click once publish by Visual Studio. You can verify this by checking the application files dialog in the publish page of the project properties.
Assuming this is the case to get these files included you can either add them as links in the main project itself or edit the project file to include extra files in the manifest. See ClickOnce Content Files for information on how to do this.
I can confirm that this can still be an issue in Visual Studio 2019.
I have been working on DevExpress dashboards that consume XML files at runtime to produce their dashboard layouts, and whenever I would publish my project, I would get a bizarre error about the XML file not being found when clearly it was published to the same output directory as the rest of the project.
Just to be clear, the XML file existed in my Visual Studio project and was set to Build Action = Content and Copy Always To Output Directory.
What I had to do was what was suggested in this answer:
Go to Project Settings.
Open the Application Files list.
Change the Publish Status of the XML file - which Visual Studio automatically set to Data File (Auto) - to Include.
Voila. FileNotFound error magically disappeared after publishing the project.
A workaround is to make your application create the xml/txt files if they dont exist.

WPF application crash after ClickOnce publish

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

Resources