Reputation: 14178
I have a visual studio project (VS2012) that just contains some configuration files. When I build I get the following warning:
CSC : warning CS2008: No source files specified [C:\Project\Config\Config.csproj]
Is there any way to disable this warning?
Upvotes: 6
Views: 2323
Reputation: 27913
I experienced the same problem with VS2017 (<nowarn>
attribute didn't work). Adding an empty VersionInfo.cs
prevented the build warning.
Upvotes: 4
Reputation: 2119
Go to the project's property page in your Solution Explorer. On the build tab, you can disable the warning using its warning number.
This describes the options available there: http://msdn.microsoft.com/en-us/library/vstudio/kb4wyys2(v=vs.100).aspx
If you ever have actual code that triggers warnings, it can be disabled like so: http://msdn.microsoft.com/en-us/library/vstudio/441722ys(v=vs.120).aspx
Upvotes: -1