We help IT Professionals succeed at work.

Cannot turn option strict OFF...any guesses would be appreciated.

rgn2121 asked
Medium Priority
Last Modified: 2008-01-29
Okay...not sure there will be a solution to this other than something weird happened with the files for this app, but here goes.

After installing .Net 2005, I went and changed different things to set the environment up like I like, one of which is to turn option strict ON.  I was recently working on an app and everything seemed fine.  Well, I stopped for a little to work on a different app and I copied some of the code over from the previous app because I was doing a lot of similar things...just different variable names and such.  

Anyway, some of the code that worked fine in the first app, gave me option strict errors in my new app.  I checked to make sure that option strict was on and it was and still is.  So, I wanted to try turning it off and then back on, but I can't.  I can go to Tools>options and change it to off, but the errors remain.  I also tried going into Application.Designer and tried to change it there, but that doesn't work either.

Maybe when a new app is started, if option strict is ON, then it is on for the life of the app?  I can get around it, but I am having to do things that I didn't have to do in the previous app, just to get what is essentially the same code to work.

Any thoughts?
Watch Question


The Tools Options is the defaults for new projects. Right click your project and select properties to change settings for your current project. Or add a line at the top of your code files:
Option Strict Off
Project Properties - Then in the Compile sectino you will find Option strict et.c

As vb_jonas said, sounds like you've changed it for the project you were working on, but you want to change the default. Tools->Options->Projects and Solutions->VB Defaults is where you want to look.


Okay...I will look at it when I get back to work...I will let you know what I find.

Thanks for the quick responses.


First off thanks for the help.  I think I know what happened.  I didn't realize that the tools>Options only changed it for new projects and since I started the other project before going to option strict ON, the project was still set to off.  So, when I started the new project, it took my settings of option strict ON.

Thanks for the help guys...Learn something new everday.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.