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.
Paul I
Member
6 Points
9 Posts
Set option Strict / Infer / Explicit / Compare on Web sites - not working
Dec 01, 2011 08:42 AM|LINK
Set option Strict / Infer / Explicit / Compare on Web sites - not working
I have found conflicting advice on the Internet, however the most recent advice for .NET 4 is to use to set these options in the Web.config file e.g
<compilation defaultLanguage="vb" debug="true"targetFramework="4.0" strict="true" explicit="true" />
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.
Paul
XiaoCheng Fa...
All-Star
17743 Points
1414 Posts
Re: Set option Strict / Infer / Explicit / Compare on Web sites - not working
Dec 07, 2011 07:51 AM|LINK
Hi,
You can try to use compilerOptions of compiler settings to add advanced options:
<div id="imcontent"><compiler language="vb" compilerOptions="optioncompare:text" /></div>You can try to edit web.config in .net framework folder to globally set strict on.
I'm looking forward for your reply.
If you have any feedback about my replies, please contact msdnmg@microsoft.com
Microsoft One Code Framework