Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does a simple .Net Core 3.0 WPF app not start on a deployment computer

Tags:

c#

.net-core

wpf

Created very simple WPF .Net Core app with VS2019Prof V16.3.1.

  • Created new project - WPF App (.Net Core)
  • Nothing else was done, just only built the project (Debug and Release) - successfully run it on 'dev' computer Win10 V1809 (Build 17763.740)
  • Copied debug and release folder to 'client' computer Win10 V1809 (Build 17763.740)
  • Installed .Net Core 3.0 Desktop Runtime on 'client' computer
  • rebooted client computer
  • tried to run debug and release version

Just no reaction when starting the app. ... tried to observe anything with SysInternals ProcessExplorer, it starts and immediately stop. No crash message, ... nothing...


What else could I do to narrow down the reason why it doesn't start?

Compile result

like image 980
MarkusEgle Avatar asked Oct 01 '19 08:10

MarkusEgle


People also ask

Can I use WPF with .NET core?

No. A WPF application targeting . NET Framework cannot reference a . NET Core project.


Video Answer


1 Answers

Found and tested two solutions:

  • Install .NET Core SDK instead of .NET Core Desktop Runtime
    See https://dotnet.microsoft.com/download/dotnet-core/3.0

  • Deploy as self-contained app

Select Publish
Publish project

Create Profile
Create Profile

Adjust Profile
Adjust Profile

Finally Publish
Finally Publish

like image 92
MarkusEgle Avatar answered Oct 21 '22 06:10

MarkusEgle