gpt4 book ai didi

.net - CS0012 : The type 'System.Web.Routing.RouteValueDictionary' is defined in an assembly that is not referenced

转载 作者:行者123 更新时间:2023-12-01 18:06:12 31 4
gpt4 key购买 nike

我在使用新的“ASP.NET MVC 2 空 Web 应用程序”项目时遇到此错误:

CS0012: The type 'System.Web.Routing.RouteValueDictionary' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

最佳答案

更新 web.config 文件:

<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
</assemblies>
</compilation>
...
</system.web>
...
</configuration>

关于.net - CS0012 : The type 'System.Web.Routing.RouteValueDictionary' is defined in an assembly that is not referenced,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2828393/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com