6

I'm playing with a SQL Server database project with Visual Studio 2013 on Windows 2012 R2. Below is my code and you can download the whole project source code from my shared dropbox link at https://www.dropbox.com/s/aalnlwvxutr4g0f/UDF.zip?dl=1

using System;
using System.Data;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using Microsoft.SqlServer.Server;

public partial class UserDefinedFunctions
{
    [Microsoft.SqlServer.Server.SqlFunction]
    public static SqlString Greetings(SqlString name)
    {
        // Put your code here
        return new SqlString("Hello " + (string)name);
    }
}

When I try to build the solution, I got the following message.

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

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

Essentially it tells me the build failed but I can't find any specific errors. Also there is nothing listed under the Error List pane. Please point me the right direction?

2
  • 4
    Have you looked at this related question: stackoverflow.com/questions/25774471/… Commented Mar 19, 2015 at 9:13
  • 2
    Works on my system with all the latest versions installed. Commented Mar 19, 2015 at 12:34

1 Answer 1

10
+500

You need to install the last version of SQL Server Data Tools here is the link

http://msdn.microsoft.com/en-US/data/hh297027

http://go.microsoft.com/fwlink/?linkid=393521&clcid=0x409

after install restart computer and try to build again.

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

1 Comment

Thank you a million Imran! I've upgraded my SSDT from 12.0.41012.0 to 12.0.50226.0 and it fixed my problem.

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.