Questions tagged [sqlproj]

Database development project extension created by Visual Studio, a Windows software development IDE; stores the schema of the database and can include SQL source code; used for creating databases for SQL Server, Microsoft's relational database management system (RDBMS) software.

Database development project extension created by Visual Studio, a Windows software development IDE; stores the schema of the database and can include SQL source code; used for creating databases for SQL Server, Microsoft's relational database management system (RDBMS) software.

Older .DBPROJ files can be migrated to the newer SQLPROJ format in Visual Studio 2012.

Information from: http://www.fileinfo.com/extension/sqlproj

101 questions
2
votes
1 answer

Cake, VS2017, .NET Core 2.0 and building SQL project

I'm trying to build a .NET Core 2.0 solution which has got a blank empty SQL Server project but getting this error: MyDb.sqlproj(57,3): error MSB4019: The imported project "C:\Program…
Ambuj
  • 445
  • 1
  • 4
  • 16
2
votes
0 answers

Visual Studio database project how to perform an alter table on a referenced dacpac

I'm sure this should be simple but I cant work it out. Project setup Visual Studio database project with references to master, msdb and another dacpac. It is the additional dacpac that is of interest. For various reasons I will not go into here, I…
JSW
  • 116
  • 2
  • 9
2
votes
3 answers

Publish to SQL Azure fails with 'Cannot drop the external data source' message

I've got an SQL Project (.sqlproj) in my solution with target platform 'Microsoft Azure SQL Database V12'. Recently I've added an external data source and several external tables targeting this data source. ExternalCSVLists.sql file: CREATE EXTERNAL…
Artur Udod
  • 4,465
  • 1
  • 29
  • 58
2
votes
1 answer

Visual Studio Db project with custom static code analyzer

I've troubles with adding some sample code analyzer into a db project. I followed this guide: https://msdn.microsoft.com/en-us/library/dn632175(v=vs.103).aspx , but custom analyzer hadn't added. What I was missing? P.S. I'm using VS 2015…
snipervld
  • 69
  • 1
  • 10
2
votes
2 answers

Create Not Null FK onto new table in Database project

I have a table that has rows in it. I am using a SQL Database Project to manage the DB, and I want to upgrade the schema by adding a new NOT NULL column to this table, that comes with a FK constraint on to a new table (also included in the new…
Simon Green
  • 1,131
  • 1
  • 10
  • 28
2
votes
2 answers

Deploying SQL Server dacpac with newest version of SSDT SqlPackage.exe drops column defaults

We use Visual Studio database projects and SSDT to version and deploy our SQL Server schema. We compile the project to a dacpac file and then use SqlPackage.exe to publish that dacpac against a SQL Server (2008 R2) instance as necessary. We recently…
2
votes
2 answers

Manage SSDT project file properly with version control (*.sqlproj)

We have constant problem with project XML file (*.sqlproj). If the files are added/renoved/changed location then it automatically adds/removes records in some unexpected places. After that we have big troubles by merging it when somebody changes…
2
votes
1 answer

Can you remove a file from the Build Item group in a sql server project?

My team has gone years (before I joined) of not adopting sql server database projects. Primarily because there are items that have circular references therefor can't build. I realize the recommended approach is to factor out or fix the circular…
Maslow
  • 18,464
  • 20
  • 106
  • 193
1
vote
1 answer

Visual Studio C# SQLProj - Throwing errors

I have a Visual Studio SQLProj that throws errors automatically when synching with the database. Not sure why this is happening when the DB is not throwing any errors at all. For instance I have a username that called [datawriter] When clicking on…
Acrometis
  • 19
  • 6
1
vote
1 answer

Visual Studio 2022 - Publish database project locally, get message saying the Site.dacpac file is missing, and rebuild always skips

I am at a new role, and am trying to get started with the Visual Studio solution I will be working on - I am having an issue with the sqlproj within the solution - which is required to get my local instance up and running! The issue is the publish…
JimFR
  • 89
  • 11
1
vote
0 answers

Multiple CLR schemas in Visual Studio SSDT project

I'm trying to have a single sqlproj project in Visual Studio 2022, representing my SQL Server database. When creating a CLR stored proc or function in C#, the SqlFunction or SqlProcedure attribute has a Name property, but not a schema. It seems the…
Joe Enos
  • 39,478
  • 11
  • 80
  • 136
1
vote
0 answers

CLI tools to publish a .sqlproj to database instance

I have a .sqlproj (Microsoft SQL Project) folder (Git repository) which I'd like to Publish to a live database instance using command line tools. My colleague currently does this manually using Visual Studio: Right-click on Solution then select…
turbonerd
  • 1,234
  • 4
  • 27
  • 63
1
vote
1 answer

SSDT Changing Scoped Credentials for different environments

I am looking to use continuous integration to deploy my SSDT project to a UAT and production environments and use external tables which point to azure data lake. The following statements need to be changed depending on the environment:- CREATE…
1
vote
1 answer

Visual Studio doesn't recognise a project on the Mac

When I open a .NET project in Visual Studio on the Mac I see the following error: This contains a .sqlproj file and a folder containing a SQL file. How do I resolve this? Is it a case that my Mac doesn't recognise a SQL project?
runnerpaul
  • 5,942
  • 8
  • 49
  • 118
1
vote
0 answers

CLR is attempting to load an assembly from the wrong location for .sqlproj

I recently moved from VS 2017 to VS 2019. Since upgrading I've been unable to open any .sqlproj projects in VS as they all refuse to load with the error - Could not load file or assembly 'Microsoft.SqlServer.Management.SqlParser,…