MSBuild.Sdk.SqlProj: The current SDK bundles target framework '9.0' which is not supported by MSBuild.Sdk.SqlProj.

This issue is similar to others here for earlier versions of MSBuild.Sdk.SqlProj and supported SDKs.

I have Visual Studio Community installed on a Windows 11 machine.

Microsoft Visual Studio Community 2022
Version 17.12.3
VisualStudio.17.Release/17.12.3+35527.113
Microsoft .NET Framework
Version 4.8.09032

Installed Version: Community

Visual C++ 2022   00482-90000-00000-AA784
Microsoft Visual C++ 2022

ADL Tools Service Provider   1.0
This package contains services used by Data Lake tools

ASA Service Provider   1.0

ASP.NET and Web Tools   17.12.178.10385
ASP.NET and Web Tools

Azure App Service Tools v3.0.0   17.12.178.10385
Azure App Service Tools v3.0.0

Azure Data Lake Tools for Visual Studio   2.6.5000.0
Microsoft Azure Data Lake Tools for Visual Studio

Azure Functions and Web Jobs Tools   17.12.178.10385
Azure Functions and Web Jobs Tools

Azure Stream Analytics Tools for Visual Studio   2.6.5000.0
Microsoft Azure Stream Analytics Tools for Visual Studio

C# Tools   4.12.0-3.24572.7+dfa7fc6bdea31a858a402168384192b633c811fa
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools   1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

dbForge SQL Complete   7.0.249
dbForge SQL Complete for Management Studio and Visual Studio
Copyright (c) Devart. All rights reserved.
Web: http://www.devart.com/dbforge/sql/sqlcomplete 
Support: http://www.devart.com/dbforge/sql/sqlcomplete/support.html 
Ordering: http://www.devart.com/dbforge/sql/sqlcomplete/ordering.html 

Devart Code Compare   5.4.27
Devart Code Compare
Copyright (c) 2012-2024 Devart. All rights reserved.
http://www.devart.com/codecompare/

GitHub Copilot   17.12.38.29086
GitHub Copilot is an AI pair programmer that helps you write code faster and with less work.

Microsoft Azure Hive Query Language Service   2.6.5000.0
Language service for Hive query

Microsoft Azure Stream Analytics Language Service   2.6.5000.0
Language service for Azure Stream Analytics

Microsoft JVM Debugger   1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Node.js Tools   1.5.60927.1 Commit Hash:34ed3f8d94747ae6aeaeadb9ccb1dd51411eba1a
Adds support for developing and debugging Node.js apps in Visual Studio

NuGet Package Manager   6.12.2
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

Razor (ASP.NET Core)   17.12.3.2457601+b5256abf658352440e61aa1372bbc0798e9ceb7d
Provides languages services for ASP.NET Core Razor.

SQL Server Data Tools   17.12.83.3
Microsoft SQL Server Data Tools

Test Adapter for Boost.Test   1.0
Enables Visual Studio's testing tools with unit tests written for Boost.Test.  The use terms and Third Party Notices are available in the extension installation directory.

Test Adapter for Google Test   1.0
Enables Visual Studio's testing tools with unit tests written for Google Test.  The use terms and Third Party Notices are available in the extension installation directory.

ToolWindowHostedEditor   1.0
Hosting json editor into a tool window

TypeScript Tools   17.0.30918.2001
TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools   4.12.0-3.24572.7+dfa7fc6bdea31a858a402168384192b633c811fa
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual F# Tools   17.12.0-beta.24501.1+19610c0b654766eec49d044cb97ca6eaa2a63d16
Microsoft Visual F# Tools

Visual Studio IntelliCode   2.2
AI-assisted development for Visual Studio.

My csproj project file contains this:

<Project Sdk="MSBuild.Sdk.SqlProj/2.7.2">
	<PropertyGroup>
		<TargetFramework>netstandard2.0</TargetFramework>
		<SqlServerVersion>Sql120</SqlServerVersion>

I am getting the following error: The current SDK bundles target framework '9.0' which is not supported by MSBuild.Sdk.SqlProj. Either install a .NET Core SDK that supports 3.1, 5.0 or 6.0, or file an issue at https://github.com/rr-wfm/MSBuild.Sdk.SqlProj/ to add support. If you have preview SDKs installed, you may have to use a global.json file: https://docs.microsoft.com/dotnet/core/tools/global-json

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 21 (4 by maintainers)

Commits related to this issue

Most upvoted comments

That is weird. Sounds like there is a global.json somewhere in the directory tree that is messing things up maybe?

Thank you all!

Sorry for the delay getting back to you. I see you have closed the issue as “not planned”, which makes sense given that you commented earlier that “2.7.2 is no longer supported”. Having said that, I have additional information that you may find interesting.

The machine I am running on is a new development machine and I had installed VS 2022 only. My previous environment was in service for about seven years, and had earlier versions of VS installed over time, in addition to VS 2022. Our database solution build without error in that environment. However, on the new system it fails as I reported.

I had the following .NET SDKs installed:

C:\Windows\System32>dotnet sdk check
.NET SDKs:
Version      Status
------------------------
9.0.101      Up to date.

I installed .NET 8 SDK, and I still got the same error: “The current SDK bundles target framework ‘9.0’ which is not supported by MSBuild.Sdk.SqlProj”

C:\Windows\System32>dotnet sdk check
.NET SDKs:
Version      Status
------------------------
8.0.404      Up to date.
9.0.101      Up to date.

Since I was still getting the error indicating that the current SDK bundles target framework 9.0, I thought I’d try to uninstall .NET 9. (Our projects currently target .NET 8 because that is long term support, whereas 9 will not be.) I ran the VS Installer, and saw that .NET 8 Runtime and .NET 9 Runtime were both checked. I tried to uncheck .NET 9, and when I did, I got a warning that lots of other things would be removed as well. Checking the Workload tab, I saw that workloads we need, such as “ASP.NET and web development” were unchecked. I rechecked it and then returned to the Individual Components tab to find that .NET 9 was also rechecked. My conclusion was that it was not possible for us to uninstall .NET 9.

One of my colleagues has a development system older than my new one, and has installed multiple versions of VS over time. Even though he is building the database project with VS 2022, he did not have the error I did.

Using VS Installer, he updated VS 2022 to the latest version, and now he does have the error. Our conclusion is that the latest version of VS 2022 broke something that allowed our database solution to build.

In your earlier comment, you suggested that I try specifying MSBuild.Sdk.SqlProj/3.0.0. I did that, and the solution built with no problem. On our end, we agree that we should do that, especially because 2.7.0 is no longer supported. However, there is some concern about doing that just yet in our dev cycle.

The error message also suggests using the global.json file, so I reverted to 2.7.2, put the global.json file in place, and VS 2022 built our database solution without error.

So, we will make use of the global.json file for now, and as soon as possible, we will upgrade to 3.0.0.