Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
1 task
sliedig opened this issue Jan 9, 2025 · 2 comments · Fixed by #32894
Closed
1 task

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

sliedig opened this issue Jan 9, 2025 · 2 comments · Fixed by #32894
Assignees
Labels
@aws-cdk/core Related to core CDK functionality bug This issue is a bug. cli Issues related to the CDK CLI effort/small Small work item – less than a day of effort p1 package/tools Related to AWS CDK Tools or CLI

Comments

@sliedig
Copy link

sliedig commented Jan 9, 2025

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

@sliedig sliedig added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jan 9, 2025
@github-actions github-actions bot added the package/tools Related to AWS CDK Tools or CLI label Jan 9, 2025
@sliedig sliedig changed the title CLI: initilises project with out of support version of .NET CLI: initialises project with out of support version of .NET Jan 9, 2025
@khushail khushail added investigating This issue is being investigated and/or work is in progress to resolve the issue. p2 and removed needs-triage This issue or PR still needs to be triaged. labels Jan 9, 2025
@khushail khushail self-assigned this Jan 9, 2025
@khushail
Copy link
Contributor

khushail commented Jan 9, 2025

Thanks for bringing this to our notice @sliedig. I can confirm the issue , project initialisation begins with Target framework of .NET 6 which is out of support now -

Screenshot 2025-01-09 at 12 54 47 PM

@khushail khushail added effort/small Small work item – less than a day of effort cli Issues related to the CDK CLI @aws-cdk/core Related to core CDK functionality and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Jan 9, 2025
@khushail khushail removed their assignment Jan 9, 2025
@khushail khushail added p1 and removed p2 labels Jan 9, 2025
@iankhou iankhou self-assigned this Jan 10, 2025
@mergify mergify bot closed this as completed in #32894 Jan 14, 2025
mergify bot pushed a commit that referenced this issue Jan 14, 2025
### Issue #32804 

Closes #32804 

### Reason for this change

New projects in C# and F# are initialized using .NET6.0, which was designated EOL 12 NOV 2024.

### Description of changes

Upgraded .NET from 6.0 (EOL) -> 8.0 (LTS) for new projects in C# and F#.

### Describe any new or updated permissions being added

No permissions changes.

### Description of how you validated changes

Changed unit tests to check for .NET8.0 instead of .NET6.0, and ran them successfully.

<img width="768" alt="Screenshot 2025-01-13 at 12 53 25" src="https://github.com/user-attachments/assets/2992bd18-382a-43fc-826f-59c41214a8cb" />

### Checklist
- [X] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Copy link

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
@aws-cdk/core Related to core CDK functionality bug This issue is a bug. cli Issues related to the CDK CLI effort/small Small work item – less than a day of effort p1 package/tools Related to AWS CDK Tools or CLI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants