re:
!> Ok pay attention! I've I explained earlier, I've already set my
!> web.config file, manually, with the appropriate text:
!> <compilation debug="true" strict="true" />
No. *You* pay attention. I've already explained it's a *bug*.
It's been fixed in VS 2005 SP1.
re:
!> It's not having any effect.
This isn't an ASP.NET bug. It's a VS 2005 bug.
Nothing you do, as far as ASP.NET configuration goes,
will affect the way VS 2005 compiles source files.
What you *can* do, and works, is install VS 2005 SP1.
*Then*, when you change Tools/Options/Projects and Solutions/VB Defaults to
option strict on, and you change the web.config to strict="true", and you add to a .vb file :
Dim NiceBug As Boolean = "Hello world"
....you will see that the VS 2005 IDE flags it as an error,
and suggests you change the line to : Dim NiceBug As Boolean = CBool("Hello world")
Never mind that the suggested change is bonkers, though.
At least it flags the error as an error which will not compile correctly.
Juan T. Llibre, asp.net MVP
asp.net faq :
http://asp.net.do/faq/
foros de asp.net, en español :
http://asp.net.do/foros/
======================================
re:
!> Have you tried Tools, Options, Projects and Solutions, VB Defaults?
!> No idea if this will modify existing projects, though, as I never go anywhere near VB.NET...
It doesn't even change the setting for *new* projects, Mark.
re:
!> where is it changing the setting, and can I not set it myself manually?
There's no way to change the setting at design time, for new projects,
because the change is needed in the project *template*.
Devenv.exe creates a new project based on the existing templates,
and the default for that is option "strict= false".
Changing the option, in the template's web.config, is the only solution.
Btw, the directory location in my earlier post is either incorrect or was changed by SP1.
Instead of :
drive:\VStudioInstallDir\Common7\IDE\ProjectTemplates\VisualBasic\Web\1033\WebApplicationProject.zip
The correct path is :
Drive:\VStudioInstallDir\Common7\IDE\ProjectTemplates\Web\VisualBasic\1033\WebApplication.zip
Extract web.config from that zip file, change <compilation debug="false" strict="false"
explicit="true" />
to <compilation debug="false" strict="true" explicit="true" />
and zip it up again, updating WebApplication.zip
That will automatically create/compile projects with that strict="true" configured.
Ok pay attention! I've I explained earlier, I've already set my
web.config file, manually, with the appropriate text:
<compilation debug="true" strict="true" />
It's not having any effect. Therefore fiddling in zip files is going
to have the same effect next time I create a new project - no effect
whatsoever. The only thing which makes a difference is setting the
option at the top of each page. I appreciate that this isn't a
problem in c#, but this doesn't help me as I'm not developing in c#.