Disable Warning Visual Studio CS2008

I have a visual studio project (VS2012) that contains only some configuration files. When I create, I get the following warning:

CSC: warning CS2008: source files not specified [C: \ Project \ Config \ Config.csproj]

Is there any way to disable this warning?

+4
source share
2 answers

I had the same problem with VS2017 (the <nowarn> attribute did not work). Adding an empty VersionInfo.cs prevented a build warning.

+3
source

Go to the project properties page in Solution Explorer. On the Build tab, you can disable the alert using its alert number.

The options available there are described here: http://msdn.microsoft.com/en-us/library/vstudio/kb4wyys2(v=vs.100).aspx

If you have real code that causes warnings, you can disable it as follows: http://msdn.microsoft.com/en-us/library/vstudio/441722ys(v=vs.120).aspx

-2
source

All Articles