microsoft / DacFx

DacFx, SqlPackage, and other SQL development libraries enable declarative database development and database portability across SQL versions and environments. Share feedback here on dacpacs, bacpacs, and SQL projects.
https://aka.ms/sqlpackage-ref
MIT License
343 stars 20 forks source link

Microsoft.SqlServer.DacFx nuget package as unsigned assemblies #39

Closed smithago closed 2 years ago

smithago commented 3 years ago

*Steps to Reproduce:

I am building a custom MS build task in c# using .net standard 2.0.

I am referencing Microsoft.SqlServer.DacFx 150.5164.1 package and use Microsoft.SqlServer.TransactSql.ScriptDom.dll to do some sql script parsing.

However MSBuild cannot run my custom task because the strong name validation fails on

`Microsoft.SqlServer.TransactSql.ScriptDom.dll'. It is marked as delay signed. Why is this dll not signed in the package?

I plan to build my custom MS build task into a package, that I need to reference in a .net 5.0 project to run the target in the msbuild.

How do we get the Microsoft.SqlServer.TransactSql.ScriptDom.dll that is signed and .net standard 2.0 compatible?

(DacFx/SqlPackage/SSMS/Azure Data Studio)

smithago commented 3 years ago

Ping. Will anybody look at this?

zijchen commented 2 years ago

Hi @smithago could you give this a try? Let me know if you have trouble accessing it: https://mssqltools.visualstudio.com/_apis/resources/Containers/3613638/drop?itemPath=drop%2FMicrosoft.SqlServer.DacFx.150.5282.3.nupkg

C:\Windows\System32>sn -vf "C:\Users\zijchen\Downloads\Microsoft.SqlServer.DacFx.150.5282.3\lib\netstandard2.0\Microsoft.SqlServer.TransactSql.ScriptDom.dll"

Microsoft (R) .NET Framework Strong Name Utility  Version 4.0.30319.0
Copyright (c) Microsoft Corporation.  All rights reserved.

Assembly 'C:\Users\zijchen\Downloads\Microsoft.SqlServer.DacFx.150.5282.3\lib\netstandard2.0\Microsoft.SqlServer.TransactSql.ScriptDom.dll' is valid
zijchen commented 2 years ago

All DLLs are signed as of our latest Preview release Microsoft.SqlServer.DacFx.160.5332.1-preview and will be for future releases as well.