❔ SQLProj Targets Wrong Framework Despite Explicit net6.0 Specification

Hello, I'm working on a .NET project that involves a SQL project (sqlproj) on VS Code on Linux. In my .sqlproj file, I have explicitly set the target framework to .NET 6.0. However, when I examine the project.assets.json file, I find that it's targeting .NETFramework,Version=v4.6 instead. Here is a snippet of the project.assets.json: { "version": 3, "targets": { ".NETFramework,Version=v4.6": { // ... // (other settings) // ... } }, "projectFileDependencyGroups": { ".NETFramework,Version=v4.6": [ "Microsoft.NETFramework.ReferenceAssemblies >= 1.0.0" ] }, "project": { "restore": { "originalTargetFrameworks": [ "net6.0" ], "frameworks": { "net46": { "targetAlias": "net6.0", // ... } } }, "frameworks": { "net46": { "targetAlias": "net6.0", // ... } } } } Also below is my dotnet info: ┌──(astraeus㉿localhost)-[~/neuroX/ICE/ICE/ICE.Services/DocumentManager-MS/ICE.Services.DocumentManager.DB.SQL] └─$ dotnet --info .NET SDK (reflecting any global.json): Version: 6.0.413 Commit: 10710f7d8e Runtime Environment: OS Name: kali OS Version: 2023.3 OS Platform: Linux RID: linux-x64 Base Path: /usr/share/dotnet/sdk/6.0.413/ Host: Version: 7.0.10 Architecture: x64 Commit: a6dbb800a4 .NET SDKs installed: 6.0.413 [/usr/share/dotnet/sdk] 7.0.400 [/usr/share/dotnet/sdk] .NET runtimes installed: Microsoft.AspNetCore.App 6.0.21 Microsoft.AspNetCore.App 7.0.10 Microsoft.NETCore.App 6.0.21 Microsoft.NETCore.App 7.0.10 Other architectures found: None Environment variables: Not set global.json file: /home/astraeus/neuroX/ICE/ICE/global.json and here's my global.json: { "sdk": { "version": "6.0.413" } } Any ideas on how I could resolve this discrepancy? Could there be a conflict in other configuration files that I am not aware of?
3 Replies
Accord
Accord10mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
walid_4.ab439581062
I raised the issue with Microsoft/DacFx on GitHub, issue#330 and it’s being worked on now, aiming on fixing it in the next release. @walid_4.ab439581062
Accord
Accord8mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.