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

With .NET 7 SDK 7.0.100-alpha.1.22071.3 & SDK 6.0.102, template conflict when creating a new console/classlib without specifying framework #4296

Closed
WenJunJi01 opened this issue Jan 24, 2022 · 4 comments

Comments

@WenJunJi01
Copy link
Member

Environment: .NET 7 SDK 7.0.100-alpha.1.22071.3 and SDK 6.0.102

Repro steps:

  1. Install .NET 7 SDK 7.0.100-alpha.1.22071.3 and SDK 6.0.102 on a clean Windows OS.
  2. Create a new console or classlib project without specifying framework.

Expected Result:
The project should be created successfully without errors.

Actual Result:
Template conflict when creating a new console/classlib without specifying framework.
image

C:\Users\v-wenjj>dotnet new classlib -o mylib1
Unable to resolve the template, the following installed templates are conflicting:
Identity                             Template Name  Short Name  Language  Precedence  Author     Package
-----------------------------------  -------------  ----------  --------  ----------  ---------  -------
Microsoft.Common.Library.CSharp.6.0  Class Library  classlib    C#        8000        Microsoft
Microsoft.Common.Library.CSharp.7.0  Class Library  classlib    C#        8000        Microsoft

Uninstall the templates or the packages to keep only one template from the list.

C:\Users\v-wenjj>dotnet new console -o myconsole1
Unable to resolve the template, the following installed templates are conflicting:
Identity                             Template Name  Short Name  Language  Precedence  Author     Package
-----------------------------------  -------------  ----------  --------  ----------  ---------  -------
Microsoft.Common.Console.CSharp.6.0  Console App    console     C#        8000        Microsoft
Microsoft.Common.Console.CSharp.7.0  Console App    console     C#        8000        Microsoft

Uninstall the templates or the packages to keep only one template from the list.

Note:
Creating a new console/classlib project with the specified framework can succeed.
image

Dotnet info:
.NET SDK (reflecting any global.json):
Version: 7.0.100-alpha.1.22071.3
Commit: b7180e5baf

Runtime Environment:
OS Name: Windows
OS Version: 10.0.22000
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\7.0.100-alpha.1.22071.3\

Host (useful for support):
Version: 7.0.0-alpha.1.22066.4
Commit: ae2f60c950

.NET SDKs installed:
6.0.102 [C:\Program Files\dotnet\sdk]
7.0.100-alpha.1.22071.3 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.0-alpha.1.22067.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.0-alpha.1.22066.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.0-alpha.1.22065.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET runtimes or SDKs:
https://aka.ms/dotnet-download

@marcpopMSFT marcpopMSFT transferred this issue from dotnet/sdk Jan 24, 2022
@marcpopMSFT
Copy link
Member

@vlada-shubina , let me know if there is anything the SDK team should do here to make this work.

@vlada-shubina
Copy link
Member

PR is already ready: #4295

@vlada-shubina
Copy link
Member

closed in #4295

@WenJunJi01
Copy link
Member Author

With both .NET 6 SDK and .NET 7 SDK installed, unable to create .netstandard classlib even if framework is specified
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants