开发者

how to exclude .sql from a build in VS2010?

I decided to include some SQL Scripts into VS2010 for ease of editing / access. However, I'm getting a bunch of errors now such as "SQL80001: Incorrect syntax near '8'. Expecting '(', or SELECT."

I don't expect VS to understand the file. It isn't SQL Server compliant, it's a file that is for another database vendor that have a few minor SQL syntax variations away from the norm (data types, etc).

开发者_Python百科In any case, I thought that Build Action: None (a property on the file) would ensure that the compiler didn't touch the file.

Looks like VS has an exception to the rule for files with .sql. Is there a way to turn this feature off?


Maybe use a different file extension? As far as editing goes, VS will assume it is T-SQL (for SQL Server) and base the syntax highlighting on that, which will be wrong if the file is not T-SQL.


You have to use Build Action: Content option for SQL files

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜