<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Visual Studio 2005</title><link>http://forums.asp.net/138.aspx</link><description>General discussions of Visual Studio 2005.  &lt;a href="http://aspadvice.com/SignUp/list.aspx?l=162&amp;c=30" target="_blank"&gt;Email List&lt;/a&gt;</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Bug using Option Strict ON in ASP.net 2.0 app</title><link>http://forums.asp.net/thread/1110506.aspx</link><pubDate>Fri, 11 Nov 2005 22:13:12 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1110506</guid><dc:creator>d88b</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1110506.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=138&amp;PostID=1110506</wfw:commentRss><description>&lt;P&gt;This is the answer I got from Microsoft...&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT face=Arial color=navy size=2&gt;&lt;SPAN&gt;Sorry about the inconvenience.&amp;nbsp; There unfortunately isn’t a GUI way to enable option strict, but you can enable it by copying and pasting this statement into your application’s web.config file (it should go immediately underneath the root &amp;lt;configuration&amp;gt; element:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face=Arial color=navy size=2&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT face=Arial color=navy size=2&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;system.codedom&amp;gt;&lt;BR&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face=Arial color=navy size=2&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;compilers&amp;gt;&lt;BR&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face=Arial color=navy size=2&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;compiler compilerOptions ="/optionexplicit+ /optionstrict+" language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /&amp;gt;&lt;BR&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face=Arial color=navy size=2&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/compilers&amp;gt;&lt;BR&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face=Arial color=navy size=2&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;/system.codedom&amp;gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face=Arial color=navy size=2&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT face=Arial color=navy size=2&gt;&lt;SPAN&gt;This will then enable option strict for both code-behind and your app_code directory.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face=Arial color=navy size=2&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT face=Arial color=navy size=2&gt;&lt;SPAN&gt;Hope this helps,&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT face=Arial color=navy size=2&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT face=Arial color=navy size=2&gt;&lt;SPAN&gt;Scott&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;</description></item><item><title>Bug using Option Strict ON in ASP.net 2.0 app</title><link>http://forums.asp.net/thread/1106710.aspx</link><pubDate>Wed, 09 Nov 2005 00:10:14 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1106710</guid><dc:creator>d88b</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1106710.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=138&amp;PostID=1106710</wfw:commentRss><description>I set OPTION STRICT ON as a default in&amp;nbsp;VS2005 and also added it to the WEB.config file.&lt;BR&gt;&lt;BR&gt;I noticed today in an ASP.net app I'm working on that the code wasn't throwing an error&amp;nbsp;during implicit&amp;nbsp;type conversions. Hmmm, that's strange...so after investigating every possiblility and multiple testing, I discovered that there's a bug in Visual Studio 2005. 
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Work around: This sucks but..you need to set option explicit at the top of every code page.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;I notified the Microsoft regional director and after testing he concurred with my conclusion.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Note: This only affects ASP.net apps not Windows apps.&lt;BR&gt;&lt;BR&gt;(Unless of course I'm completely retarted and missed something obvious )&lt;/DIV&gt;</description></item></channel></rss>