• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 705
  • Last Modified:

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

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?
0
rgn2121
Asked:
rgn2121
  • 2
  • 2
1 Solution
 
vb_jonasCommented:
Hi!

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
0
 
vb_jonasCommented:
Project Properties - Then in the Compile sectino you will find Option strict et.c
0
 
icrCommented:
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.
0
 
rgn2121Author Commented:
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.
0
 
rgn2121Author Commented:
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.
0

Featured Post

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now