Set option Strict / Infer / Explicit / Compare on Web sites - not working RRS feed

  • Question

  • User1323951843 posted

    I have a VS2010 Solution with two projects, a Web site and Assembly. For the assembly, I can right click on the solution and set these option under the Compilation tab. There appears to be no equivalent for the Web sites

    I have found conflicting advice on the Internet, however the option that parses is to set these options in the Web.config file e.g


    However, there are two problems:

    1) You cannot set the Infer or Compare options

    2) Even though I have set the compilation line as above, the Web code is not being compiled with "option strict on". If I subsequently add the line "option strict on" into the code, the APSX file shows the errors.

    I want to GLOBALLY force strict on for the compilation of all code.

    Advice appreciated.


    Tuesday, December 20, 2011 4:09 AM


  • User470413944 posted


    This is same with following thread:



    You can try to use compilerOptions of compiler settings to add advanced options:

    <compiler language="vb" compilerOptions="optioncompare:text" />

    You can try to edit web.config in .net framework folder to globally set strict on.

    Please reply if you've met any issue with how to find these settings.

    I'm looking forward for your reply.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, December 22, 2011 4:57 AM