I am trying to install and run my first WPF application and am having a few issues. I have built a setup project and everything appears to be installing correctly, all my third party dll's are copied over, directories are created, etc... When I try to run the app, it just bombs immediately with the following error:
Faulting application name: app.exe, version: 1.0.0.0, time stamp: 0x4f8343f3
Faulting module name: KERNELBASE.dll, version: 6.1.7600.16850, time stamp: 0x4e211485
Exception code: 0xe0434352
Fault offset: 0x0000b9bc
Faulting process id: 0xdec
Faulting application start time: 0x01cd168e7b8a64fc
Faulting application path: C:\Program Files (x86)\Some Dir\Some APP\app.exe
Faulting module path: C:\Windows\syswow64\KERNELBASE.dll
Report Id: bad81009-8281-11e1-93ec-f4501845bd18
How do I go about debugging this?? I have wrapped the InitializeComponent() in a try/catch but I'm getting nothing?
All that being said, if I copy the contents of the debug directory to the program files directory on the same pc in which I am trying to install the app and then run the exe, everything works just fine?? What do I need to do differently in my setup project??
I had the exact same problem, hopefully you have fixed it by now and so I am writing this for others redirected here.
I was installing the project via an MSI executable, but the problem is, one of the file inside my project (not the installer project) was marked as "Copy Always" under its "Copy to output directory" in its properties. This project was a dependency for my MSI project but the "Copy to output" files are not being copied in the MSI file, you have to manually each one of those file inside the MSI project also. Hopefully this post made sense!
Edit: This is probably why copying files from your debug folder works, you are including the file that has previously not been copied by the MSI itself.
Ran into the same problem, but in my case I had an exception triggered in the constructor of pages referenced from the main window. Bad coding, but mentioning it here because it's not always obvious that WPF pages will be constructed before the main window is rendered.
Related
we have a wpf application which is written with .net core 3.1 .
so for forcing wpf to run as admin we added appmanifest file and changed :
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
to
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
and below line added to project.csproj file :
<ApplicationManifest>app.manifest</ApplicationManifest>
after doing all of before step and publishing application we got an error in windows eventviewer :
Faulting application name: WpfVideoCourseApp.Presentation.exe, version: 1.0.0.0, time stamp: 0x60776cd9
Faulting module name: KERNELBASE.dll, version: 10.0.19041.1151, time stamp: 0x891df6d3
Exception code: 0xe0434352
Fault offset: 0x0000000000034ed9
Faulting process id: 0x2ac8
Faulting application start time: 0x01d7a5852476cbd1
Faulting application path: E:\VideoCourseApp\WpfVideoCourseApp.Presentation.exe
Faulting module path: C:\Windows\System32\KERNELBASE.dll
Report Id: d9b3e20f-55dc-4dd2-b0ad-40e940dedaa6
Faulting package full name:
Faulting package-relative application ID:
but afterall i should say that : app runs without any problem when using debug files(problem is all about published version of application)
Update :
in publish when i run app , app try to write something in windows document folder and access will denied(but thats not happening when running debug code)
actualy i added manifest file for having permission to reading and writing my files in some special path's(like document folder) but it just work in debug
I am afraid you can't run a ClickOnce deployed application with administrative privileges.
As a workaround, you may consider to implement your app to start a new process as an admininstrator or choose another deployment strategy.
Hi All I am new to using CefSharp in my application. I need some help resolving an issue I am facing. I have a 32 bit winforms application and installed version 81 of cefsharp dll's. My server is a 64 bit machine. I redirect from my form to a website (ADP). Sometimes it works and sometimes it crashes with an error like below. I am not able to find what is going on and any help is really . The dll's and my application are in a folder on a server (server1). User login into a terminal server(server2) and access the application from a shortcut on the desktop. Below is the error.
Windows cannot access the file for one of the following reasons: there is a problem with the network connection, the disk that the file is stored on, or the storage drivers installed on this computer; or the disk is missing. Windows closed the program CefSharp.BrowserSubprocess because of this error.
Program: CefSharp.BrowserSubprocess
Faulting application name: CefSharp.BrowserSubprocess.exe, version: 81.3.100.0, time stamp: 0x5ec8803e
Faulting module name: libcef.dll, version: 0.0.0.0, time stamp: 0x5eac9798
Exception code: 0xc0000006
Fault offset: 0x005ae118
Faulting process id: 0x4a34
Faulting application start time: 0x01d674c9b69143f4
Faulting application path: \serverpath\CefSharp.BrowserSubprocess.exe
I have created a WPF application in VS 2017 that installs with ClickOnce. After deploying the solution to a network location, I am able to install on my 64-bit Windows 10 computer by visiting the .application link.
However, the application does not run on my machine after it is installed. When I attempt to use the .appref-ms shortcut from the Start menu, nothing happens. I have added code to launch a debugger when the application starts, but it doesn't get hit. I see nothing getting logged in the clickonce log when running the application from here. I have set the logging to Verbose in the registry.
If I attempt to run the application from the %userprofile%\AppData\Local\Apps\2.0\ install location, it runs fine and launches the debugger. However, I can't use this location because it will then use the config file from this location rather than the config stored in %userprofile%\AppData\Local\, which allows new versions to continue using the same configuration. It's also inconvenient for users.
If I go back to the .application link on the server, I am able to install new versions when they are deployed, but it still does not launch the application or log any issues with running the application.
The .appref-ms looks like this, and Launcher.manifest does exist in the install location, along with the file listed in the manifest:
file://192.168.10.11/Projects/Launcher.application#Launcher.application, Culture=neutral, PublicKeyToken=0000000000000000, processorArchitecture=msil
How do I track down the problem with my ClickOnce shortcut?
Edit: Someone mentioned looking in the Event Viewer, and I found a SecurityException, which only occurs when running from the shortcut. Debugger.Launch() is the first line in the MainWindow Constructor on the partial class, but it is not getting hit. Here is the exception from Event Viewer:
Application: applaunch.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Security.SecurityException
at System.Security.CodeAccessSecurityEngine.Check(System.Object, System.Threading.StackCrawlMark ByRef, Boolean)
at System.Security.CodeAccessPermission.Demand()
at MS.Internal.SecurityHelper.DemandUnmanagedCode()
at System.Windows.Window..ctor()
at Launcher.MainWindow..ctor()
This helps in my case (had the same problem):
Project -> Properties
Security: Change from partial trust to full trust
Changes marked yellow:
I have a WPF application, when double click from it is location it runs - no problems.
When I trying to start the app from command prompt I get an error.
I need to run the app from command prompt (also using startup register)
Files that help describe the problem:
C:\Users\xxx\AppData\Local\Temp\WERC6F9.tmp.WERInternalMetadata.xml
C:\Users\xxx\AppData\Local\Temp\WERE6F8.tmp.appcompat.txt
C:\Users\xxx\AppData\Local\Temp\WERE718.tmp.mdmp
What could be the problem
I hope this can help you
This could be because of Path. When you Double click app the required files for the application will there at the current folder hence the application is able to find and load the files required. But if your executing it from different path other than app path, lets say
Your application is present in the location D:\Data\Example.exe.
And your executing the app from different location Say C:\Program files, now the app will start running from C:\Program files and it'll start searching required files at C:\Program files and some temp locations once it don't find there it'll throws exception
You can do like this
Write a Batch file.first change the current directory to application directory in this case say D:\Data or you can add your application path to path environment variable and use it
Then Invoke the exe
Save the this file and you call this file from where you want
I had the same issue.
I found out that it was due to me using Debug not Release while building my application. The Microsoft .dll-s in the redistributable is for release.
We have a VB.Net Winforms (x86) application that uses the freely redistributable version of Crystal Reports. Although the application works fine on my test machine, when installing on a client's machine and trying to print a report from the application, the error: The system cannot find the file specified. File name: 'CrystalDecisions.CrystalReports.Engine ... is displayed.
The inno-setup includes the CR redistributable "CRRedist2008_x86.msi" which was installed by the client during the installation. (We also tried running the "CRRedist2008_x64.msi" but received an "unsupported processor type" error).
I have read about Merge Modules that are prerequisites for .NET 1/2 (VS 2002/2005), but cannot find any useful information related to .NET 3.5 and am wondering if these files are still required and how to package and deploy them if they are in fact needed.
Any guidance on how to resolve this installation issue is much appreciated.
Edit
The Inno-Setup contains the following command that checks to see if CR is installed and if not the MSI is launched from the final setup form:
[Run]
Filename: "{app}\CRRedist2008_x86.msi"; Description: "Crystal Reports"; Flags: nowait postinstall skipifsilent; Check: EnsureCrystalReports105Installed();
The problem is that you are not actually executing the MSI file. You can see this by running your installer with /LOG and reviewing the resulting log file.
This is because MSI files cannot be directly executed -- they're data files, not programs.
To resolve this, you need to run msiexec instead, passing the MSI file as a parameter; eg.
[Run]
Filename: {sys}\msiexec.exe; Parameters: "/i ""{app}\CRRedist2008_x86.msi"""; ...
You should review the command line parameters accepted by msiexec and properties accepted by the MSI file to see if you want to do something different, eg. running the install silently instead of interactively.
Also, running it as postinstall is fine if this component is optional for your application and it can gracefully handle it not being installed. If this is not the case then you should treat it as a prerequisite instead and always install it via PrepareToInstall.