ASP.NET TargetFramework属性为';我认不出

ASP.NET TargetFramework属性为';我认不出,asp.net,Asp.net,我一直在尝试创建一个项目,但在web.config中,它不断给我一个错误,即它无法识别属性TargetFramework 编辑:添加了web.config。我看到一个问题与同样的问题,他们说,这应该是相同的版本作为ASP.NET的版本。但我真的不知道该怎么做 另外,我不能更改到其他版本的Visual Studio(我使用该程序),因为它不允许我在本地web上运行文件。但这是另一个问题 已经有一段时间了。我想这是个棘手的问题 <?xml version="1.0"?> <!--

我一直在尝试创建一个项目,但在web.config中,它不断给我一个错误,即它无法识别属性TargetFramework

编辑:添加了web.config。我看到一个问题与同样的问题,他们说,这应该是相同的版本作为ASP.NET的版本。但我真的不知道该怎么做

另外,我不能更改到其他版本的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>

当web.config中的属性为targetFramework=“4.0”但应用程序池设置为运行ASP.NET 2.0时,基本上会发生这种情况。ASP.NET 2.0完全无法识别targetFramework属性-这意味着即使在配置文件中将其更改为2.0,它也无法工作

如果您的应用程序编码为4.0,则需要将AppPool设置为4.0
在IIS>中,右键单击网站>属性>ASP.NET>版本>“应为4.0.21006”而不是2.0

这基本上是在web.config中具有targetFramework=“4.0”属性,但应用程序池设置为运行ASP.NET 2.0时发生的。ASP.NET 2.0完全无法识别targetFramework属性-这意味着即使在配置文件中将其更改为2.0,它也无法工作

如果您的应用程序编码为4.0,则需要将AppPool设置为4.0
在IIS>中,右键单击网站>属性>ASP.NET>版本>“应为4.0.21006”而不是2.0

这基本上是在web.config中具有targetFramework=“4.0”属性,但应用程序池设置为运行ASP.NET 2.0时发生的。ASP.NET 2.0完全无法识别targetFramework属性-这意味着即使在配置文件中将其更改为2.0,它也无法工作

如果您的应用程序编码为4.0,则需要将AppPool设置为4.0
在IIS>中,右键单击网站>属性>ASP.NET>版本>“应为4.0.21006”而不是2.0

这基本上是在web.config中具有targetFramework=“4.0”属性,但应用程序池设置为运行ASP.NET 2.0时发生的。ASP.NET 2.0完全无法识别targetFramework属性-这意味着即使在配置文件中将其更改为2.0,它也无法工作

如果您的应用程序编码为4.0,则需要将AppPool设置为4.0
在IIS>中,右键单击网站>属性>ASP.NET>版本>“应读4.0.21006”而不是2.0

我在尝试使用Visual Studio增强时遇到此错误。Visual Studio Fortify插件似乎希望使用aspnet_编译器而不是msbuild。它传递的正是这个信息


当我使用命令行工具使用msbuild强化编译时,它起到了作用。可能您的Visual Studio没有使用msbuild?如果尚未将其转换为web应用程序,则可能需要尝试将其转换为web应用程序。我认为VisualStudio将默认使用MSBuild。不确定这是否是您的问题,但我确实收到了完全相同的错误消息。祝你好运。

我在尝试与Visual Studio一起使用Fortify时遇到此错误。Visual Studio Fortify插件似乎希望使用aspnet_编译器而不是msbuild。它传递的正是这个信息


当我使用命令行工具使用msbuild强化编译时,它起到了作用。可能您的Visual Studio没有使用msbuild?如果尚未将其转换为web应用程序,则可能需要尝试将其转换为web应用程序。我认为VisualStudio将默认使用MSBuild。不确定这是否是您的问题,但我确实收到了完全相同的错误消息。祝你好运。

我在尝试与Visual Studio一起使用Fortify时遇到此错误。Visual Studio Fortify插件似乎希望使用aspnet_编译器而不是msbuild。它传递的正是这个信息


当我使用命令行工具使用msbuild强化编译时,它起到了作用。可能您的Visual Studio没有使用msbuild?如果尚未将其转换为web应用程序,则可能需要尝试将其转换为web应用程序。我认为VisualStudio将默认使用MSBuild。不确定这是否是您的问题,但我确实收到了完全相同的错误消息。祝你好运。

我在尝试与Visual Studio一起使用Fortify时遇到此错误。Visual Studio Fortify插件似乎希望使用aspnet_编译器而不是msbuild。它传递的正是这个信息


当我使用命令行工具使用msbuild强化编译时,它起到了作用。可能您的Visual Studio没有使用msbuild?如果尚未将其转换为web应用程序,则可能需要尝试将其转换为web应用程序。我认为VisualStudio将默认使用MSBuild。不确定这是否是您的问题,但我确实收到了完全相同的错误消息。祝你好运。

你能发布配置文件中有这一行的部分吗?错误的asp.net版本-你可能使用了一些不适用于你运行的asp.net版本的属性。你能发布配置文件中有这一行的部分吗?错误的asp.net版本-你可能使用了一些不适用于你运行的asp.net版本的属性运行。您可以发布配置文件中有此行的部分吗?错误的asp.net版本-您可能使用了不适用于您运行的asp.net版本的某些属性。您可以发布配置文件中有此行的部分吗?错误的asp.net版本-您可能使用了不适用于您运行的asp.net版本的某些属性。