MSBuild.Sdk.SqlProj
MSBuild.Sdk.SqlProj copied to clipboard
Converting a .sqlproj to .csproj
I have a .sqlproj project that has properties like AnsiPadding, DefaultCollation, AutoShrink and so on. I have tried porting these properties over to the .csproj project but some of these don't translate 1-to-1 from .sqlproj to .csproj. An example is AnsiWarnings. In .sqlproj it is declared as:
<AnsiWarnings>False<AnsiWarnings>
But AnsiWarnings is not a valid property according to the list here: https://docs.microsoft.com/en-us/dotnet/api/microsoft.sqlserver.dac.model.tsqlmodeloptions?view=sql-dacfx-150
But the list does include a property named AnsiWarningsOn. So when I generate a dacpac for a .sqlproj using Visual Studio it does generate a dacpac with AnsiWarningsOn declared as expected. So Visual Studio probably has some kind of internal mapping or a tool that maps .sqlproj properties with the appropriate properties from the TSqlModelOptions class. In this case, it takes the AnsiWarnings property from the .sqlproj file and converts it AnsiWarningsOn for the dacpac.
My question: Is there a utility that can map .sqlproj properties to the appropriate properties in the TSqlModelOptions class OR At least a mapping available that can guide one how to find the corresponding TSqlModelOptions property for a .sqlproj property?
@AlphaMalik Thanks for the question. We currently don't have a tool that can perform the migration, nor do we have a mapping table. To be honest, I wasn't even aware that .sqlproj
uses different names. I'm guessing that most of them are fairly obvious though, so it shouldn't be too hard to add a mapping table to the docs. If someone is willing to compile such a table that would be much appreciated.
Closing due to inactivity and no upvotes