I've been banging my head against the wall on-and-off for months on this. I can't find the correct magic list of parameters that will let me build a sqlproj within my C# solution.

I have a solution file called "ROME.sln" that contains multiple .NET 4.7.2 C# projects and multiple database projects. I want to compile them in a headless fashion. The C# stuff is hunky-dory, but the SSDT is a constant pain-point.

Every guide online seems to say "get the nuget package" and "set some vars". That leaves a big number of questions:

1) Get the nuget package to where? A shared location? It looks like that's the case, because there's no way to set a Nuget package as areference in SSDT.

2) Having done that, it's not looking there for the .Targets file. If I set /p:SSDTPath in MSBuild, it doesn't use the value... UNLESS I override the path in <Import Project=""> and in that case it mixes in the /p:SSDTPath value.

3) Even when I do get it to find the danged targets file, it fails because it can't find Master and MSDB... which I've already replaced with local references instead of using the built-in references.

I'm not doing anything crazy. I'm building an SSDT project in VS2017 headless. Why is this so impossible?

  • Are you attempting to accomplish this in one step? Are you building the project files or the solution? – Wesley Rolnick Nov 7 at 18:03
  • Building the solution, so 1 step. Compile everything into its artifact. – Pxtl Nov 7 at 20:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.