WPF program fails to start when installed in target machine (CefSharp related) - c#

I'm using CefSharp in my WPF application. Executing it from the Debug folder, and copying the entire folder to target machine works flawlessly.
I made a setup project and selected to copy Primary output, but after installing the app crashes upon start.
After copying individual files from debug to installation folder I discovered that these files are the one missing which make the app crash:
cef.pak
cef_100_percent.pak
cef_200_percent.pak
cef_extensions.pak
I guess these are related to CefSharp but I don't understand why they aren't installed.
Which is the proper way to fix this issue?

Found the list of requirement for CefSharp in Setup Project, I just need to add them manually.
https://github.com/cefsharp/CefSharp/wiki/Output-files-description-table-(Redistribution)

Related

Cannot run application installed using Setup Project in Visual Studio 17

I have a Setup Project for my winforms application. After installing the application using the generated .msi i navigate to the installation folder and try to run the .exe file and nothing happens. I don't get an error or anything.
Steps i've tried to solve my problem.
Making sure the target platform x86 matches in the main project, setup project and every other project in the solution that the application has a dependency on.
In the setup project, made sure that i have a project output in the application folder that references the primary output from the main project. And that the dlls i use also are listed there.
Ran the application as administrator.
Activated Click Once security settings in the main project.
Ran sfc /scannow without finding any issues.
Restarted my computer.
When installing the program using the generated .msi on another computer i have the same issue.
When running the program from visual studion it works perfectly fine.
It is likely that your application is crashing because of some missing dependency.
Possible reasons:
A missing assembly (say, for eg, is all your third party dependencies present in the application folder after the installation ?)
Difference between .Net framework versions between your machine and the installed machine (say, for eg. 4.7 vs 4.7.2)
One useful tool that has helped us in the past is to use the Windows Event Viewer. If the program is indeed crashing, it is likely to have details about the reason for crash.
You can then use it as a starting point for further investigation.

MSI installer with c# WPF VS 2015

I have created a simple wpf application in c# with only one window, MainWindow.xaml. There is no database, not even textboxes, not a single line of code added by myself.
file structure wpf project
I also created an MSI setup project:
setup project
Building of either project works without problem. However, after installation, when I try to run the programme crashes without any error message. All that I see is that the circle-turned cursor is spinning and the windows explorer window can no longer be closed.
Operating system is Windows 10. Anyone has had a similar experience? Looks like a bug in the MSI installer.
Check all the .dll's are included in the installer. Often not all of them are and you need to manually include them. You can compare what's in the install (C:\Program Files...) directory compared to what's in the project bin directory. Often times items like "PresentationFramework.Aero.dll" aren't included and you get a missing .dll error.
If this is the case, you can copy over some of the .dll's until it works. Then add those to the installer.

Could not find file 'obj\x86\Debug\projectname.exe'

I have developed a windows application using C# VS 2010. It was working perfectly fine untill I added another project for making a setup.exe to be distributed. But now when I try to run my project it gives error "Could not find file 'obj\x86\Debug\projectname.exe'." and asks if I would like to continue and run the last successful build? If I choose yes it runs a previouse version of application and don't show latest functions and interface changes which I made. Now setup project has been removed and there is single project in solution but still getting same error. I checked debug folder and there is no file named as projectname.exe.
NOTE : Projectname is name of my project
Well Avast antivirus was a problem. I don't know how but I turned off avast and build my application and it worked just fine. ... not a big proble .. sighhhhhhhh

"Application requires that assembly *** be installed" error while trying to install my ClickOnce app

Here's an error I get when I try to install my application from the publish location:
I have my application (and a DLL used by it) linked to version 1.61.4111... of QWhale.Common which is a 3rd party DLL. I have been used this version since about 4 updates ago and never had this problem. I have no idea which part of my application or DLL could be trying to link to the older version. The only thing I did different on this version is that I moved my application's project folders to a new location in my computer.
Where should I start trying to find where this problem is coming from? Did you ever have this problem before?
As Yahia commented, this can be a licensing issue but if you've been using this assembly for a while and if you've been compiling it with your application, there is a chance that a setting associated with the file could have changed with your projects settings.
Assuming you are using Visual Studio, I recommend opening your Projects properties window and navigating to the Publish tab and opening the Application Files Dialog.
From there, find the referenced, 3rd party assemblies make try setting the Publish Status to Include and the DownloadGroup to (Required).
Save your changes and republish your application.

Problem installing a ClickOnce application

I downloaded setup.exe, and then begin to install and it immediately crashes.
On win7 it worked fine. On XP it doesn't work.
Error text:
Unable to install or run the
application. The application requires
that assemble stdole Version
7.0.3300.0 be installed in the Global Assembly Cache (GAC) first.
You'll need to include stdole.dll as a required file in your Publish settings in Visual Studio. Once you publish your app again, it should then include that file in your app when it's installed.
More info can be found here.
This happened to a few people that i had to install a click once application i developed. Basically something happened in their installation of .NET and the needed .DLL's were not moved to the GAC. It's very simple to fix, basically You need to copy stdole.dll from C:\Program Files\Microsoft.NET\Primary Interop Assemblies\ to C:\Windows\Assembly ... that should fix your issue. Including them in the application isn't the best idea, this will fix it for ALL click once applications rather then just that one you are currently building.
P.S. Dragging the files to the location will work, you might get an error if you try to copy it.

Categories

Resources