2013-04-23 55 views
0

我想生成一个网站的文档,但是,我没有一个项目,换句话说,我只是去在Visual Studio中,我打开一个网站,我不能从这个XML文档生成Web项目的风格:SandCastle生成文档。从网站

enter image description here

而且,我在that文档看我需要把这个:

<system.codedom> 
    <compilers> 
     <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" 
     compilerOptions="/docpath:C:\Publish\Docs" 
     type="EWSoftware.CodeDom.VBCodeProviderWithDocs, 
       EWSoftware.CodeDom, Version=1.1.0.0, Culture=neutral, 
       PublicKeyToken=d633d7d5b41cbb65"> 
     <providerOption name="CompilerVersion" value="v2.0"/> 
     </compiler> 
    </compilers> 
    </system.codedom> 

好了,但是当我把这个在我的web.config,而当我尝试要编译,编译器会返回很多错误,如下所示:

error BC30451: 'DDtoCC' is not declared. It may be inaccessible due to its protection level. 
0error BC30451: 'HojetoCC' is not declared. It may be inaccessible due to its protection level. 
error BC30451: 'CCtoDD' is not declared. It may be inaccessible due to its protection level. 
error BC30002: Type 'SqlConnection' is not defined. 
error BC30002: Type 'SqlCommand' is not defined. 
error BC30002: Type 'SqlConnection' is not defined. 
error BC30002: Type 'SqlCommand' is not defined. 
error BC30002: Type 'SqlConnection' is not defined. 
error BC30002: Type 'SqlCommand' is not defined. 
error BC30002: Type 'SqlDataReader' is not defined. 
error BC30002: Type 'SqlConnection' is not defined. 
error BC30002: Type 'SqlCommand' is not defined. 
error BC30002: Type 'SqlConnection' is not defined. 
error BC30002: Type 'SqlCommand' is not defined. 
error BC30002: Type 'SqlDataReader' is not defined. 
error BC30002: Type 'SqlConnection' is not defined. 
error BC30002: Type 'SqlCommand' is not defined. 
error BC30002: Type 'SqlConnection' is not defined. 
error BC30002: Type 'SqlCommand' is not defined. 
error BC30002: Type 'SqlDataReader' is not defined. 
error BC30002: Type 'SqlConnection' is not defined. 
error BC30002: Type 'SqlCommand' is not defined. 
error BC30002: Type 'SqlConnection' is not defined. 
error BC30002: Type 'SqlCommand' is not defined. 
error BC30002: Type 'SqlDataReader' is not defined. 
error BC30002: Type 'SqlConnection' is not defined. 
error BC30002: Type 'SqlCommand' is not defined. 
error BC30002: Type 'SqlCommand' is not defined. 
error BC30002: Type 'SqlConnection' is not defined. 
error BC30002: Type 'SqlDataReader' is not defined. 
error BC30002: Type 'SqlConnection' is not defined. 
error BC30002: Type 'SqlCommand' is not defined. 
error BC30002: Type 'SqlDataReader' is not defined. 
error BC30451: 'DataDiff' is not declared. It may be inaccessible due to its protection level. 
error BC30451: 'AddDiastoCC' is not declared. It may be inaccessible due to its protection level. 
error BC30451: 'AddDiastoCC' is not declared. It may be inaccessible due to its protection level. 
error BC30451: 'QueryDB' is not declared. It may be inaccessible due to its protection level. 
error BC30451: 'AddDiastoCC' is not declared. It may be inaccessible due to its protection level. 
error BC30451: 'QueryDB' is not declared. It may be inaccessible due to its protection level. 
error BC30451: 'Truncate' is not declared. It may be inaccessible due to its protection level. 
error BC30002: Type 'SqlConnection' is not defined. 
error BC30002: Type 'SqlDataReader' is not defined. 
error BC30002: Type 'SqlCommand' is not defined. 
error BC30451: 'QueryDB' is not declared. It may be inaccessible due to its protection level. 
error BC30002: Type 'SqlConnection' is not defined. 
error BC30002: Type 'SqlCommand' is not defined. 
error BC30451: 'HojetoCC' is not declared. It may be inaccessible due to its protection level. 

,当我删除此,代码被编译normaly; X

而且,我试图创建一个Web项目白衣这个代码,但是,我得到了同样的错误.. 我如何可以生成此WebStet项目的文档?

回答

0

由于VisualBasic编译器中存在一个错误(根据Sandcastle文档),您需要手动添加所有导入。即使是重要的进口产品,如SystemMicrosoft.VisualBasic。这里是我的web.config的例子:

<system.codedom> 
<compilers> 
    <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" 
     compilerOptions="/docpath:C:\Sandcastle\XML /imports:System,System.Resources,System.Web,Microsoft.VisualBasic,..." 
     type="EWSoftware.CodeDom.VBCodeProviderWithDocs, EWSoftware.CodeDom, 
     Version=1.1.0.0, Culture=neutral, PublicKeyToken=d633d7d5b41cbb65"> 
    <providerOption name="CompilerVersion" value="v4.0"/> 
    </compiler> 
</compilers> 
</system.codedom> 

当你把你的一切需要进口,那么这些错误不会影响到发布过程。尽管在发布项目时仍然会出现一些编译错误。我对每个循环中的所有数据类型的隐式赋值都有问题。

我不得不改变我的循环,以
For Each i as Integer = 0 In List(Of Object)
之后,这一切都非常完美。

相关问题