C
C#4mo ago
Seth

I am having trouble with some quirks in Visual Studios SSDT (SQL Server Data Tool)

Does it seriously not recognize server objects and fail to compile if it can't get a reference for it? Has anybody ever dealt with this before in SSDT? I am really hoping I am just missing something because I love the idea of using SSDT for the ability of version control with my SQL DBs.
3 Replies
jcotton42
jcotton424mo ago
What are you using to talk to the DB in your app? EF? ADO? I personally would use an in-app migration tool, or sql scripts. Does the SSDT stuff even work with modern .net?
Seth
SethOP4mo ago
with SSDT I am creating a local copy of my databases schema into a visual studio project but some of my stored procedures reference linked servers and users that are at the server level. I actually resolved this by just deleting the users folder it imports as well as adding a dummy reference to my local schemas sys.servers table for the linked servers. I also added an IgnoreUnresolvedReferences tag to my .csproj file and this all seemed to make it work swimmingly
wasabi
wasabi4mo ago
You can add a reference to the schemas as a dacpac, which also works. And then it has an option to supress errors for just taht one reference. SSDT works fine. And is better in some situations than other tools. Problem is MS refuses to make the project type buildable on the .NET distrbution of MSBuild, so you need to use the VS distributed version and can't build cross platform.
Want results from more Discord servers?
Add your server