Я пытался создать проект, но в web.config он продолжает давать мне ошибку, что он не распознает атрибут TargetFramework.Атрибут TargetFramework ASP.NET не распознается
EDIT: добавлен web.config. Я видел один вопрос с той же проблемой, и они сказали там, что она должна быть той же версии, что и версия ASP.NET. Но я не вижу, как это сделать.
P.S. Я не могу перейти на другую версию Visual Studio (я использую эту программу), так как она не позволит мне запускать файлы в локальной сети. Но это другая проблема.
Некоторое время сейчас. Угадайте, что это сложная проблема.
<?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