我一直在嘗試做一個項目,但是在web.config中,它一直給我錯誤,認爲它不能識別屬性TargetFramework。ASP.NET TargetFramework屬性不被識別
編輯:添加了web.config。我看到了一個問題,他們說那個問題應該與ASP.NET版本相同。但我真的不知道該怎麼做。
P.S.我不能更改爲不同版本的Visual Studio(我使用該程序),因爲它不會允許我在本地Web上運行文件。但這是一個不同的問題。
已經有一段時間了。猜猜這是一個棘手的問題。
<?xml version="1.0"?>
<!--
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
<appSettings/>
<connectionStrings/>
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true" targetFramework="4.0">
<assemblies>
</assemblies>
</compilation>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/> </system.web>
<system.codedom>
</system.codedom>
<!--
The system.webServer section is required for running ASP.NET AJAX under Internet
Information Services 7.0. It is not necessary for previous version of IIS.
-->
<system.webServer>
</system.webServer>
</configuration>
你可以發佈你的配置文件有這一行的部分? –
錯誤的asp.net版本 - 您可能使用了一些不屬於您運行的asp.net版本的屬性。 – Aristos