Skip to content

SDK 2.0.0 not able to load SQL Code Analysis DLLs built with .NET 8.0 #720

@mrlmachado

Description

@mrlmachado
  • SqlPackage or DacFx Version: 170.2.70
  • .NET Framework (Windows-only) or .NET Core: .NET 8.0
  • Environment (local platform and source/target platforms): VS2022 17.14.20, .NET 8.0.4xx, Microsoft.Build.Sql 2.0.0

Steps to Reproduce:

  1. Create a custom SQL Code Analysis library built with target framework .NET 8.0
  2. Create a SQL Project targeting Microsoft.Build.Sql SDK 1.0.0, DacFx 162.5.57
  3. Reference the custom rules dll
  4. It should work fine, load the custom rules, validate the code, and all work fine.
  5. Upgrade SDK version to 2.0.0, upgrade your custom rules dll to use DacFx 170.2.70
  6. Try building again, using either custom rules dll, with DacFx version 162.5.57 or 170.2.70: the following error:
  7. error NU1202: Package YOUR.CUSTOM.RULES.DLL 1.0.0 is not compatible with netstandard2.1 (.NE TStandard,Version=v2.1). Package YOUR.CUSTOM.RULES.DLL 1.0.0 supports: net8.0 (.NETCoreApp,Version=v8.0)

Did this occur in prior versions? If not - which version(s) did it work in?
It works fine in SDK version 1.0.0, using DacFx 162.5.57.

(DacFx/SDK/SQL Code Analysis)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions