指定 Visual Studio 使用哪个版本的 aspnet_compiler?

发布于 2024-08-03 11:17:25 字数 579 浏览 3 评论 0原文

是否可以告诉 Visual Studio 2010 使用旧版本的 aspnet_compiler 来构建和调试 Web 应用程序项目?我有一个针对 .Net 3.5 的 Web 应用程序,它抱怨并提到了有关使用 2.0 版 aspnet_compiler 命令的一些内容。我知道这个神奇版本的 aspnet_compiler 位于磁盘上的哪个位置,但我无法弄清楚如何告诉 IDE 它在哪里。

错误全文在这里:

此版本的 aspnet_compiler 命令用于编译面向 .NET Framework 4.0 或更高版本的 Web 应用程序。此 Web 应用程序的 Web.config 文件中的元素不包含所需的“targetFrameworkMoniker”属性(例如“”)。若要为早期版本的 .NET Framework 编译此 Web 应用程序,请使用 2.0 版的 aspnet_compiler 命令,或使用当前版本的 Visual Studio。要针对 .NET Framework 4.0 或更高版本编译此 Web 应用程序,请更新 Web.config 文件中的元素以包含“targetFrameworkMoniker”属性和正确的版本号。

Is it possible to tell Visual Studio 2010 to use an older version of aspnet_compiler to build and debug a web application project? I have a web app targeted for .Net 3.5 that complains and mentions something about using version 2.0 of the aspnet_compiler command. I know where on the disk this magical version of aspnet_compiler is located, but I can not for the life of me figure out how to tell the IDE where it is.

full text of the error here:

This version of the aspnet_compiler command is used to compile Web applications that target version 4.0 or later of the .NET Framework. The element in the Web.config file for this Web application does not contain the required 'targetFrameworkMoniker' attribute (for example, ''). To compile this Web application for earlier versions of the .NET Framework, use version 2.0 of the aspnet_compiler command, or use the current version of Visual Studio. To compile this Web application for version 4.0 or later of the .NET Framework, update the element in the Web.config file to include the 'targetFrameworkMoniker' attribute and the correct version number.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

鹊巢 2024-08-10 11:17:25

ASP.NET 4.0 和 Visual Studio 2010 Web 开发 Beta 2 概述

摘要:您可以创建一个应用程序
针对特定版本的
.NET框架。在 ASP.NET 4 中,一个新的
编译元素中的属性
Web.config 文件的一部分可让您定位
.NET Framework 4 及更高版本。如果你
明确针对 .NET Framework
4、如果包含可选的
Web.config 文件中的元素,例如
作为 system.codedom 的条目,
这些元素必须正确
.NET Framework 4。(如果您没有
明确针对 .NET Framework
4、目标框架推断
由于缺少条目
Web.config 文件。)

下面的例子展示了使用
中的 targetFramework 属性
Web.config 的编译元素
文件。

 <compilation targetFramework="4.0"/>

ASP.NET 4.0 and Visual Studio 2010 Web Development Beta 2 Overview

SUMMARY: You can create an application
that targets a specific version of the
.NET Framework. In ASP.NET 4, a new
attribute in the compilation element
of the Web.config file lets you target
the .NET Framework 4 and later. If you
explicitly target the .NET Framework
4, and if you include optional
elements in the Web.config file such
as the entries for system.codedom,
these elements must be correct for the
.NET Framework 4. (If you do not
explicitly target the .NET Framework
4, the target framework is inferred
from the lack of an entry in the
Web.config file.)

The following example shows the use of
the targetFramework attribute in the
compilation element of the Web.config
file.

 <compilation targetFramework="4.0"/>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文