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:
- 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?
- How can I resolve?