1

I have converted a Visual Studio 2012 database project to Visual Studio 2015. When the project is build on TFS Build server the following error happens

C:\Builds\\Sources\ (136): The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.

In my understanding, the Build Server tries to find SSDT for Visual Studio 2012 (v11.0). However, it cannot find it because there is only VS 2015 installed on my Build Server machine. The VS2012 SSDT is not installed.

My questions are 1. Is my interpretation of the error correct? 2. Why VS2012 data base project was not automatically converted to use VS2015 SSDT? Is it a normal conversion behaviour or I did something wrong?

Please, help if you have an answer.

1
  • Any chance the sln/sqlproj file still says to open w/ VS 11? Do you have the SSDT bits for VS 2015 installed? If I recall correctly, they're not installed by default. Commented Apr 18, 2016 at 11:31

1 Answer 1

2

The issue here is that your build template is not setting "VisualStudioVersion=14.0" to indicate that VS 2015 should be used. You can resolve by editing your build configuration - add "/p:VisualStudioVersion=14.0" to the MSBuildArguments section of the Process tab. Note that most newer build templates for TFS 2015 should do this automatically.

The reason this affects sql projects is that they find the DLLs to build them under the VS install directory. This parameter controls which version of Visual Studio is available and can be used.

For background reading the [whitepaper on TFS Build, Test & Deploy][1] is a good start, as is the shorter presentation based on this material.

Disclosure: I work on the SSDT team and wrote the presentation linked above.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you, Kevin. The added MSBuildArgument parameter has resolved the issue. We decided to upgrade our TFS 2012 to TFS 2015 to get rid of other build issues.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.