0

I'm trying to upgrade a .NET Framework 4.8 WinForms project to .NET 6.0.

Using the .NET Upgrade Assistant extension, I run through its process & it completes without any errors. I clean the solution, delete the bin & obj folders, rebuild, & run. It immediately terminates:

The target process exited without raising a CoreCLR started event. Ensure that the target process is configured to use .NET Core. This may be expected if the target process did not run on .NET Core.

If I view the Windows Event Viewer, I find the following event (full paths removed):

Description: A .NET application failed.
Application: SampleApp.exe
Path: D:\(...)\bin\Release\net6.0-windows\SampleApp.exe
Message: The application to execute does not exist: 'D:\(...)\bin\Release\net6.0-windows\SampleApp.dll'.

Note that SampleApp.exe is there - but for some reason it's now looking for SampleApp.dll, which never existed or was needed prior to the upgrade. I verified the project settings, & it shows "Output Type" as "Windows Application". Questions:

  1. Is it expected that .NET 6.0 would require SampleApp.dll in addition to SampleApp.exe, or is this indicative of i.e. some incorrect behavior performed by the upgrader?
  2. How can I resolve?
J23
  • 3,061
  • 6
  • 41
  • 52
  • See this for explanation why there is a DLL: https://stackoverflow.com/questions/61112250/why-when-compiling-net-core-console-application-we-end-up-with-both-dll-and-exe – Rand Random Jun 03 '23 at 21:52
  • Did you check https://stackoverflow.com/questions/55757793/the-target-process-exited-without-raising-coreclr-started-event-error-with-net ? – Rand Random Jun 03 '23 at 21:58
  • @RandRandom Great, thanks - #1 explains that the .dll is indeed expected. #2 - yes, I did read through that whole thread previously. None of the solutions seem to apply (i.e. it's not that I'm missing the runtime - based on the event log; I'm not missing the workloads mention in other solution; I did clean and rebuild; I'm on VS 2022 not 2019; I deleted all the bins; etc). It appears that just no RadarController.dll is generated at all. – J23 Jun 03 '23 at 22:20
  • Prior to the conversion to .NET 6, did your project use any NuGet packages? – Tu deschizi eu inchid Jun 04 '23 at 15:13

0 Answers0