gpt4 book ai didi

asp.net-mvc-3 - 用我的版本替换 System.Web.WebPages dll 时出错

转载 作者:行者123 更新时间:2023-12-01 19:15:58 26 4
gpt4 key购买 nike

我必须对 ASP.NET MVC System.Web.Webpages dll 进行一些更改。但是当我替换 dll 时,它会抛出此错误。

The type 'System.Web.WebPages.WebPageBase' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

最佳答案

我也遇到了同样的问题

我最终按照建议解决了这个问题here .

并将以下内容添加到我的 web.config

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<!-- … -->
<system.web>
<!-- … -->
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
<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.WebPages, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
</assemblies>
</compilation>
<!-- … -->
</system.web>
<!-- … -->
</configuration>

关于asp.net-mvc-3 - 用我的版本替换 System.Web.WebPages dll 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10544656/

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