I work on a website that uses various class libraries that are occasionally updated. One of the libraries is a sqlproj file and I believe it was made with VS2010. It is a dependency for other libraries and I'm not able to build/rebuild my solution because I keep getting this error, thus the DLLs will not generate. When I first open the project in VS2013, I get a migration report that opens in my browser. But the migration states that it's successful. When I try building the project, I get the error:
Error 1 02019: Invalid target type for /target: must specify 'exe', 'winexe', 'library', 'module', 'appcontainerexe' or 'winmdobj' CSC
I've tried to follow some of the recommendations on this question with essentially the same issue, but have been unsuccessful. Project fails to load due to missing SqlServer.targets file after upgrading to Visual Studio 2013 It seems like there are some unresolved streams in that question as well.
Any help would be great. Happy to provide more details and/or edit the question to make it more generalized. Thanks in advance.
While none of the answers in Project fails to load due to missing SqlServer.targets file after upgrading to Visual Studio 2013 worked for me, and nobody else had ideas here on Stack Overflow, it turns out this was a bug related to backwards compatibility in Visual Studio 2013 and SSDTs (SQL Server Developer Tools). A comment in this forum solved my issue:
https://connect.microsoft.com/SQLServer/feedbackdetail/view/979839
Posted by bsclifton on 11/15/2014 at 7:18 AM
Had this issue too with the Community 2013 edition; Going to Tools->Extensions and Updates and updating "Microsoft SQL Server Update for database tooling" resolved the issue :)