Skip to content

CLI: initialises project with out of support version of .NET #32804

@sliedig

Description

@sliedig

Describe the bug

When initialising C# project it creates a project with target version of net6. This version is now out of support (See https://dotnet.microsoft.com/en-us/download/dotnet).

By default, this should create a project with the target version of net8 (LTS).

Regression Issue

  • Select this option if this issue appears to be a regression.

Last Known Working CDK Version

No response

Expected Behavior

Initialise project with .NET 8 as the default

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net8.0</TargetFramework>
    ...
  </PropertyGroup>

Current Behavior

Project is Initialised with .NET 6 target framework

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net6.0</TargetFramework>
    ....
  </PropertyGroup>

Reproduction Steps

cdk init app --language csharp

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.174.0 (build 9604329)

Framework Version

No response

Node.js Version

20.18.1

OS

Darwin arm64 24.2.0

Language

.NET

Language Version

.NET 8.0.404

Other information

No response

Metadata

Metadata

Assignees

Labels

@aws-cdk/coreRelated to core CDK functionalitybugThis issue is a bug.cliIssues related to the CDK CLIeffort/smallSmall work item – less than a day of effortp1package/toolsRelated to AWS CDK Tools or CLI

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions