Re: Option Strict Off/On

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



OK, I've got it with regards to setting Option Strict in code for each file.
In fact, I just took the time today to make sure all the code is correct to
all Option Strict ON, which is best anyways.

But, what my question was though, if I set the Option Strict to OFF in the
Project's My Project tab/screen for a specific project, why would it keep
getting set back to ON, when it was changed for the project to be OFF? I
thought these were project specific settings.

I'm concerned that Visual Studio is changing settings I have already made
without notifying me. If I set Option Strict to OFF in my project, it seems
it should stay that way unless I change it. Or, is the Option Strict / Option
Compare and Option Explicit always changed back to default values regardless
of what I set them to?

This is what my question is, "Why does the Option Strict keep getting set to
ON, when I have specifically set it to OFF for my project?". I'm not having
problems with it now since I have fixed my code, I just want to know why it
keeps getting set back to ON everytime.

Thanks,
Greg

"Patrice" wrote:

Which kind of application ? It could be also part of the web.config file if
ASP.NET...

As others suggested my personal preference would be also to let this anyway
be On by default and to set this Off in each source file that really needs
this...

This way you are taking good habits for new code and you can fix the old
code on a file by file basis...

--
Patrice

"Greg" <AccessVBAnet@xxxxxxxxxxxxxxxxx> a écrit dans le message de news:
29295DEB-9483-420C-AFDE-C3B1DBE2985D@xxxxxxxxxxxxxxxx
We have an application in our office that has the Option Strict option set
to
off right now. I do understand it should be set to ON, but right now, I'm
just going to continue with it this way since I do not have the time to
fix
everything to set it to ON.

Anyway, my question is if its set to OFF why is it it keeps getting set
back
to ON, everytime we move the package from one machine to another. It's the
Option Strict option specific to the project?

So, how can I get the Option Strict option for this project to stay at
OFF?

Thanks.



.



Relevant Pages

  • Re: web.config vs. My Project
    ... have to edit web.config directly. ... Option Strict, etc. settings. ... config files, but not web.config. ...
    (microsoft.public.dotnet.general)
  • Re: web.config vs. My Project
    ... "Scott M." wrote: ... option strict on in one, and it is NOT reflected in the other. ... Option Strict, etc. settings. ... config files, but not web.config. ...
    (microsoft.public.dotnet.general)
  • Re: web.config vs. My Project
    ... option strict on in one, and it is NOT reflected in the other. ... Option Strict, etc. settings. ... config files, but not web.config. ... I don't think you can have a conflict because for things that are in ...
    (microsoft.public.dotnet.general)
  • Re: web.config vs. My Project
    ... Have you tried changing Option Stict in the designer withOUT web.config open ... option strict on in one, and it is NOT reflected in the other. ... Option Strict, etc. settings. ...
    (microsoft.public.dotnet.general)
  • Re: Option Strict and aspnet 2.0
    ... as Windows Forms projects respect the Option Strict ... To change the default value of Option Strict, ... but there's a viable workaround, ... Make sure the "Show all settings" box is selected. ...
    (microsoft.public.dotnet.framework.aspnet)