-5

I created a wpf app that works fine, I build my app on release. but when I publish the app it crashes, why?

Here published files:

enter image description here

When I click the app:

enter image description here

Any ideas?

Here view problems details output:

Problem signature: Problem Event Name: CLR20r3 Problem Signature 01: PreparationToolApp.exe Problem Signature 02: 1.0.0.0 Problem Signature 03: 5b6c0cb3 Problem Signature 04: mscorlib Problem Signature 05: 4.7.3130.0 Problem Signature 06: 5b175e25 Problem Signature 07: 1679 Problem Signature 08: fc Problem Signature 09: System.Windows.Markup.XamlParse OS Version: 6.3.9600.2.0.0.272.7 Locale ID: 1033 Additional Information 1: 5861 Additional Information 2: 5861822e1919d7c014bbb064c64908b2 Additional Information 3: 9044 Additional Information 4: 904415419f02c4ad4d39c4867383d25a

Read our privacy statement online: http://go.microsoft.com/fwlink/?linkid=280262

If the online privacy statement is not available, please read our privacy statement offline: C:\Windows\system32\en-US\erofflps.txt

exe
  • 181
  • 1
  • 1
  • 10
  • View the problem details and debug it – Sayse Aug 09 '18 at 09:53
  • Click the [View problem details] and post the output. There are literally unlimited things that could be wrong you need to show the error as we can't guess – Milney Aug 09 '18 at 09:53
  • This can have thousands of resons, consider adding a logger or starting the application with a debugger (or just click _Debug the program_). – Meikel Aug 09 '18 at 09:54
  • The thing is the the app works fine if I run it from `...\bin\release\myapp.exe` only the published version doesn't work – exe Aug 09 '18 at 09:58
  • if you try to make a [mcve] you will probably encounter additional information relevant to your problem. – Cleptus Aug 09 '18 at 10:14
  • Related [microsoft forms](https://social.msdn.microsoft.com/Forums/vstudio/en-US/729ee339-a9ba-47a8-b161-089743de9fce/installation-and-run-issues-with-deployed-wpf-app?forum=wpf) and possible duplicate [in stackoverflow](https://stackoverflow.com/questions/9746064/error-in-running-wpf-application) – Cleptus Aug 09 '18 at 10:29
  • Possible duplicate of [How can I get useful WPF .NET error information from a user's machine?](https://stackoverflow.com/questions/2376028/how-can-i-get-useful-wpf-net-error-information-from-a-users-machine) – Cleptus Aug 09 '18 at 10:40
  • @bradbury9 firs link is broken – exe Aug 09 '18 at 10:48
  • Hi @exe, did you manage to solve this? – variable Dec 21 '18 at 05:44

1 Answers1

1

If this app works fine in debug mode You should begin from checking differences between debug and release configurations. For example: You can use such directive:

#if DEBUG

#else

#endif

to obtain different paths, constants and other values only for debug mode. After switching to release mode You might bring into front improper values, which were not tested in debug mode.

matias4454
  • 11
  • 2
  • there is no info in the question that leads to Release working fine, only that Publish does not. With the lack of info the OP provides this answer could or could not solve the problem. I would have put it as an answer. – Cleptus Aug 09 '18 at 10:16
  • Then this question does not address the problem. @exe You should consider adding extra info on the question of the structure of the project. The error message refers to "problem signature" and you provide no info whatsoever about the program being signed, or if the certificate used to sign it validates OK. – Cleptus Aug 09 '18 at 10:24
  • @bradbury9 that's wpf app with some class library's. that's the structure, that's irrelevant – exe Aug 09 '18 at 10:27
  • I would bet on missing dependencies on the deployed/published version (according MS forum linked in question comments), but with no info whatsoever on the external dlls and if they are present on the deployment enviroment its hard to tell. – Cleptus Aug 09 '18 at 10:33
  • @bradbury9 I think That's the issue – exe Aug 09 '18 at 10:40
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/177716/discussion-between-bradbury9-and-exe). – Cleptus Aug 09 '18 at 10:42