-
Notifications
You must be signed in to change notification settings - Fork 22
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
SQL projects target .NET framework even when configured for net9.0 only #562
Comments
Why would you reference another C# project?? |
As it happens I'm trying to load an NUnit engine extension so the SQL project (using tSQLt) will be interpreted as a unit test project. I don't know whether that's possible the way I'm trying to do it, but regardless it seems strange that there's anything to do with .NET framework here. In #330 the .NET framework was appearing for no reason, but I believe it was fixed. Has there been a regression? |
It sounds like an unsupported scenario. |
It's definitely reasonable that it's unsupported, but as far as I can see the SQL project is insisting on targeting .NET framework despite configuration to the contrary. There are other implications of this. For example, when putting the dependencies the other way round (importing the SQL project into a C# project, which I imagine is supported) there's a warning about having resolved the dependency using the .NET framework. Also even with no C# projects involved at all, the |
Interestingly, MsBuld.Sdk.Sqlproj targets netstandard2.1 |
It's odd right? I can't see where |
Steps to Reproduce:
dotnet new sqlproj -n TestSqlProject
(1.0.0-rc1)dotnet new classlib -n TestLib
(net9.0)TestSqlProject.sqlproj
:a. Add
<TargetFramework>net9.0</TargetFramework>
b. Add an item group with
<ProjectReference Include="../TestLib/TestLib.csproj" />
dotnet build
in TestSqlProjI would expect this to build, as a net9.0 project is referencing another net9.0 project. Instead I get this:
If
TestLib
is changed to targetnetstandard1.0
(and some incompatible directives removed) then they both build fine. This suggests that it is generally valid for a SQL project to reference a C# library. But no matter what I do I can't get the SQL project to stop targeting .NET framework. Am I missing something obvious?The text was updated successfully, but these errors were encountered: