VS2013 Database Project fails to build

Visual Studio-2013Database Project

Visual Studio-2013 Problem Overview


I created a new SQL Server Database Project in VS2013 (Update 3) and attempted to build but it fails. The only build output I receive follows:

------ Build started: Project: Database1, Configuration: Debug Any CPU ------
	Creating a model to represent the project...
Done building project "Database1.sqlproj" -- FAILED.

Build FAILED.
========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========

If I build the project via MSBuild.exe with detail verbosity I see the following inner failure:

Task "SqlBuildTask"
  Creating a model to represent the project...
Done executing task "SqlBuildTask" -- FAILED.

After searching the web I have tried the following to resolve this to no avail:

-Restart VS

-Restart machine

-Repair VS Update 3 and reboot

-Repair VS2013 and reboot

What am I missing?

Visual Studio-2013 Solutions


Solution 1 - Visual Studio-2013

After contacting a friend at Microsoft, he suggested repairing the Data Tools install at

https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt

And that resolved it.

Thanks Chuck!

Solution 2 - Visual Studio-2013

I had a similar issue and as mentioned in the accepted answer repairing is the solution. But unfortunately the link did not gave me an exe that says repair/UnInstall. I went ahead and run exe still issue persists.

I resolved it by updating the sql data tools using Extensions and Updates. Following are the steps.

  1. Open visual studio.
  2. Go to tools menu and click on Extensions and Updates.
  3. Under the updates you will find an update for database proj.
  4. By clicking it, it will download an exe.
  5. When you run the exe it will ask for Repair/UnInstall.
  6. Click repair and proceed.

Solution 3 - Visual Studio-2013

Also check that you are using the correct version of MSBuild. There are usually multiple MSbuild exe's on your machine. The 14.0 version should be working with the Visual Studio 2015.

Solution 4 - Visual Studio-2013

I had this issue as well, but the problem was with the value in the project property "DSP". I had edited the proj file to build a dacpac for SQL 2012 and then edited it again for SQL 2014, and was getting this error for both.

The original project that was targeting SQL 2008 worked fine still, so it wasnt an installation issue.

In my editing had misspelled the values for the DSP element.

  <DSP>Microsoft.Data.Tools.Schema.Sql.Sq110DatabaseSchemaProvider</DSP>

And it should have been (where sql is spelled with the L)

  <DSP>Microsoft.Data.Tools.Schema.Sql.Sql110DatabaseSchemaProvider</DSP>

Fixing that spelling resolved the error.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionchief7View Question on Stackoverflow
Solution 1 - Visual Studio-2013chief7View Answer on Stackoverflow
Solution 2 - Visual Studio-2013MadyView Answer on Stackoverflow
Solution 3 - Visual Studio-2013TylerView Answer on Stackoverflow
Solution 4 - Visual Studio-2013StingyJackView Answer on Stackoverflow