Option Strict和aspnet 2.0 [英] Option Strict and aspnet 2.0

查看:87
本文介绍了Option Strict和aspnet 2.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我完全预料到缺少一种方法可以在全局范围内设置Option Strict,以便在SP1中修复

。我似乎无法弄清楚它是否已被修复。它仍然是

似乎我们必须在每个单独的

代码模块的顶部添加声明。我在这里错过了什么吗?


-

-C。 Moya
www.cmoya.com

I fully expected the lack of a way to set Option Strict globally to be fixed
in SP1. I can''t seem to figure out if it has been fixed or not. It still
seems we have to add the declaration at the top of each and every single
code module. Am I missing something here?

--
-C. Moya
www.cmoya.com

推荐答案

设置选项严格


1.打开VB Web项目,单击工具,然后单击选项。 />
2.确保显示所有设置选择框。

3.转到项目和解决方案,然后向下滚动到VB默认值。


你会看到默认项目设置和Option Strict下拉菜单,

,点击开启和关闭选择。


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/ < br $> b $ b ===================================

"℃。莫亚" < cm*@nospam.com在消息新闻中写道:eD ************** @ TK2MSFTNGP04.phx.gbl ...
To set Option Strict

1. With your VB Web project open, click "Tools", then "Options".
2. Make sure the "Show all settings" box is selected.
3. Go to "Projects and Solutions", and scroll down to "VB defaults".

You''ll see the "Default Project Settings" and the "Option Strict" dropdown,
with "On" and "Off" choices.


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/
===================================
"C. Moya" <cm*@nospam.comwrote in message news:eD**************@TK2MSFTNGP04.phx.gbl...

>我完全期望缺少一种方法来全局设置Option Strict以在SP1中修复。我似乎无法弄清楚它是否已被修复。我们似乎还必须在每个代码模块的顶部添加声明。我在这里错过了什么吗?


-

-C。 Moya
www.cmoya.com






在提供之前你有没有尝试过这个答案?我的设置已经设置为

。然后我在我的web项目中创建了一个新类(认为它只是应用于添加的新文件的
)并且能够添加

Dim i As Integer =" ;有些文字

没问题。


这很糟糕。


-

-C。 Moya
www.cmoya.com

" Juan T. Llibre < no *********** @ nowhere.comwrote in message

news:%2 **************** @ TK2MSFTNGP06 .phx.gbl ...
Did you try this answer before offering it? My settings are already set to
this. I then created a new class in my web project (thinking it''s only
applied to new files added) and was able to add
Dim i As Integer = "some text"
with no problem.

That''s bad.

--
-C. Moya
www.cmoya.com
"Juan T. Llibre" <no***********@nowhere.comwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...

设置Option Strict


1.打开VB Web项目,单击 ;工具,然后选项。

2.确保显示所有设置选择框。

3.转到项目和解决方案,然后向下滚动到VB默认值。


你会看到默认项目设置以及Option Strict

下拉列表,

,其中开启和关闭选择。


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/ < br $> b $ b ===================================

"℃。莫亚" < cm*@nospam.com写信息

news:eD ************** @ TK2MSFTNGP04.phx.gbl ...
To set Option Strict

1. With your VB Web project open, click "Tools", then "Options".
2. Make sure the "Show all settings" box is selected.
3. Go to "Projects and Solutions", and scroll down to "VB defaults".

You''ll see the "Default Project Settings" and the "Option Strict"
dropdown,
with "On" and "Off" choices.


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/
===================================
"C. Moya" <cm*@nospam.comwrote in message
news:eD**************@TK2MSFTNGP04.phx.gbl...

>>我完全期望缺乏一种方法来全局设置Option Strict以在SP1中修复。我似乎无法弄清楚它是否已被修复。我们似乎还必须在每个代码模块的顶部添加声明。我在这里错过了什么吗?

-
-C。 Moya
www.cmoya.com







我有一段时间没用过VB.Net,我现在只使用C#,但我好像是

记住,如果你想在全局设置选项严格,你需要在开始页面打开visual studio,没有项目加载并更改

选项严格设置然后。从那时起所有新项目将默认为

选项严格。


值得一试,但正如我所说,我没有用过VB一段时间


C. Moya写道:
I havent used VB.Net in a while, I only use C# nowadays, but I seem to
remember that if you want to set option strict globally you need to
open visual studio to the start page, with no project loaded and change
the option strict setting then. all new projects from then on will be
option strict by default.

worth a try, but as I said, I haven''t used VB for a while

C. Moya wrote:

我完全期望缺乏一种方法将全局选项Strict设置为在SP1中修复了
。我似乎无法弄清楚它是否已被修复。它仍然是

似乎我们必须在每个单独的

代码模块的顶部添加声明。我在这里错过了什么吗?


-

-C。 Moya
www.cmoya.com


这篇关于Option Strict和aspnet 2.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆