ProjectTool & visual studio: Treat Specific Warnings As Errors
-
Is there a way to specify the Visual Studio option below in projectdefinition.txt? Thanks!
Configuration Properties-> C/C++->Advanced->Treat Specific Warnings As Errors
-
Hey @BruceC,
Thank you for reaching out to us. No, that is not possible, at least not in a directly intended way. What you can do, is go into
/frameworks/settings/MSVCBase.props
and change your error and warning handling there. But you would have to apply that to every project tool / Extended SDK you use.The content of the file is used to generate the projects:
<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ImportGroup Label="PropertySheets"> <Import Project="Base.props" /> </ImportGroup> <PropertyGroup Label="UserMacros" /> <PropertyGroup /> <ItemDefinitionGroup> <ClCompile> <WarningLevel>EnableAllWarnings</WarningLevel> <DisableSpecificWarnings>4003;4061;4062;4100;4127;4131;4191;4200;4244;4265;4266;4296;4307; 4324;4350;4351;4355;4365;4371;4458;4463;4464;4987;4503;4514;4519;4530;4548;4571;4574;4577; 4592;4611;4623;4625;4626;4628;4640;4647;4668;4710;4711;4714;4738;4768;4774;4820;4826;4868; 4883;4917;4928;4946;5026;5027;5039;5045;5204;5220;5262;5256%(DisableSpecificWarnings) </DisableSpecificWarnings> <TreatSpecificWarningsAsErrors>4456;4715;4834;4996</TreatSpecificWarningsAsErrors> </ClCompile> </ItemDefinitionGroup> <ItemGroup /> </Project>
Cheers,
Ferdinand -
Thanks for the reply, @ferdinand