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
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 20, 2011 08:09 AM|LINK
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
<compilationdefaultLanguage="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 22, 2011 08:57 AM|LINK
Hi,
This is same with following thread:
http://forums.asp.net/t/1745261.aspx
http://forums.asp.net/t/1749070.aspx
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.
Please reply if you've met any issue with how to find these settings.
I'm looking forward for your reply.
</div>If you have any feedback about my replies, please contact msdnmg@microsoft.com
Microsoft One Code Framework