Skip to content

.NET Project fails to start when using windows10 TFM, UseCommonOutputDirectory=true, and GenerateRuntimeConfigDevFile=true #36474

Open
@JHJonasHuber

Description

@JHJonasHuber

Description

Running dotnet applications will fail with
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.
For specific configurations.

Reproduction Steps

  1. Create a new ConsoleApplication (.NET) and select .NET6 as target framework.
  2. Set the Output type to WinExe
  3. Set the TargetOS to Windows
  4. Set the TargetOS version Version to 10.0.22000.0
  5. Set UseCommonOutputDirectory to true
  6. Set GenerateRuntimeConfigDevFile to true
  7. Set OutputPath to any path.
  8. Delete all "obj" and build(debug/release) folders under your Project folder <- This is important
  9. Clean & rebuild the Project
  10. Try to start the ConsoleApplication (With the debugger, so you get the error message)
    (Example .csproj file)
  <PropertyGroup>
    <OutputType>WinExe</OutputType>
    <TargetFramework>net6.0-windows10.0.22000.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
    <UseCommonOutputDirectory>true</UseCommonOutputDirectory>
    <GenerateRuntimeConfigDevFile>true</GenerateRuntimeConfigDevFile>
    <OutputPath>$(SolutionDir)Build\$(Configuration)\</OutputPath>
  </PropertyGroup>

Expected behavior

Application starts

Actual behavior

Process terminates with error message: 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.

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions