Mafu Josh
Mafu Josh

Reputation: 2672

Ignore errors in sql files in VS 2012

I have ".sql" files in my VB.NET projects in Visual Studio 2012.

They are configured as:

Build Action = None
Copy to output Directory = Copy Always

When the file is open in the text editor in Visual Studio, I get compile errors. When the file is closed, I don't get compile errors.

I don't want it to find errors in these files, because I don't want to prevent the project from successfully building. These are basically just text files for me.

Any ideas on how to disable this?

(An example of an error would be SQL80001: Incorrect syntax near '<', which makes sense because it IS invalid SQL, but is how I want it.)

Upvotes: 2

Views: 1608

Answers (1)

MattC
MattC

Reputation: 134

The phantom errors, while annoying, will not prevent the project from successfully building. They will just cloud up the error list and make finding the real issues more difficult. I know this does not address your core problem but it should at least get your project building!

Upvotes: 1

Related Questions