简体   繁体   中英

How do I turn off Edit and Continue (for Veracode) through msbuild

I know the question does not make complete sense, as I'm not building inside of Visual Studio. I'm trying to submit my binary for a static analysis by Veracode , and I build using msbuild :

msbuild coop.sln /p:Configuration=Debug /p:Platform=x64 /p:LinkIncremental=false

I can turn this off in my Visual Studio environment by going to Tools > Options > Debugging > Edit and Continue, and then unchecking the 'Enabled Edit and Continue.' However, this doesn't seem to affect the solution file.

I get a warning from Veracode about having used Edit & Continue when I upload the resulting binary. I feel like there must be an option to disable that configuration through msbuild .

A couple of related posts that do not completely address this:

Any ideas for how to disable Edit and Continue through msbuild ?

There are two ways to do this. The easiest is to build your project in Release configuration. The default Release properties are setup to build with normal debug information (ie not an edit-and-continue).

Another solution, if you have to have a Debug binaries without edit-and-continue, you will have to modify all your projects. Add the following snippet into all your projects, somewhere close to the end of the .vcxproj file, after Microsoft.Cpp.props is imported:

<ItemDefinitionGroup>
  <ClCompile>
    <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
  </ClCompile>
</ItemDefinitionGroup>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM