Reputation: 13467
Related to : -checked (C# Compiler Options)
I have a web site project and I want to add -checked
option in build operation. But the problem is I can't find Check for arithmetic overflow/underflow
in build tab and there is no Advance
button for advance options in build tab:
How I can set -checked
option for web site?
Thanks
Upvotes: 0
Views: 453
Reputation: 1978
Web Site projects are special in a way that they don't have project files. For this reason there is a lack of customization available.
You may want to convert your project to a Web Application — this will allow you to tune your build process as you wish. See this article for conversion process details.
Or you could try to play with Directory.Build.props
, adding <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
property inside.
This file allows you to customize your build for all projects at once, but I'm not pretty sure that it will be accounted by Web Site compilation process.
Upvotes: 1