<startup> 元素

更新:2007 年 11 月

包含 <requiredRuntime> 元素。

<configuration> 元素
  <startup> 元素

<startup> 
</startup>

属性和元素

以下几节描述了属性、子元素和父元素。

属性

无。

子元素

元素

说明

<requiredRuntime>

指定应用程序仅支持公共语言运行库 1.0 版。用运行库 1.1 版生成的应用程序应使用 <supportedRuntime> 元素。

<supportedRuntime>

指定此应用程序支持的公共语言运行库版本。

父元素

元素

说明

configuration

公共语言运行库和 .NET Framework 应用程序所使用的每个配置文件中的根元素。

备注

<supportedRuntime> 元素应由使用运行库 1.1 版或更高版本生成的所有应用程序使用。仅为支持运行库 1.0 版而生成的应用程序必须使用 <requiredRuntime> 元素。

Microsoft Internet Explorer 中承载的应用程序的启动代码忽略 <startup> 元素及其子元素。

示例

下面的示例说明如何在配置文件中指定运行库版本。

<!-- When used with version 1.0 of the .Net runtime -->
<configuration>
   <startup>
      <requiredRuntime version="v1.0.3705" safemode="true"/>
   </startup>
</configuration>
<!-- When used with version 1.1 (or later) of the .Net runtime -->
<configuration>
   <startup>
      <supportedRuntime version="v1.1.4322"/>
      <supportedRuntime version="v1.0.3705"/>
   </startup>
</configuration>

请参见

概念

指定要使用的运行库版本

参考

启动设置架构

其他资源

.NET Framework 的配置文件架构