GAC和Bin dll之间的冲突

发布于 2024-07-13 10:44:32 字数 710 浏览 4 评论 0原文

我正在自定义 SharePoint 应用程序,并且在 Visual Studio 项目中引用 GAC 中也存在的 dll。 该项目构建得很好,但是当我点击该页面时,出现以下错误:

在处理 . c:\ WINDOWS \ Microsoft.NET \ Framework \ v2.0.50727 \ Temporary ASP.NET Files \ root \ bef9a111 \ 5466e63c \ App_Web_welcomelinks.aspx_-1775745042.a7euki4f.0.cs(128):错误CS0433:类型'Microsoft。 SharePoint.Publishing.PublishingLayoutPage'同时存在于'c:\ WINDOWS \ assembly \ GAC_MSIL \ Microsoft.SharePoint.Publishing \ 12.0.0.0__71e9bce111e9429c \ Microsoft.SharePoint.Publishing.dll'和'c:\ WINDOWS \ Microsoft.NET \ Framework中\v2.0.50727\Temporary ASP.NET Files\root\bef9a111\5466e63c\ assembly\dl3\4f0b8d4e\c81e2802_6788c901\PPM.DLL'

关于如何解决此冲突的任何想法? 由于某些依赖项,我无法从 GAC 中卸载 dll,并且如果没有引用,我无法构建我的项目。

I'm customizing a SharePoint application, and I am referencing in my Visual Studio project a dll that also exists in the GAC. The project builds just fine, but when I hit the page I get the following error:

An error occurred during the processing of . c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\bef9a111\5466e63c\App_Web_welcomelinks.aspx_-1775745042.a7euki4f.0.cs(128): error CS0433: The type 'Microsoft.SharePoint.Publishing.PublishingLayoutPage' exists in both 'c:\WINDOWS\assembly\GAC_MSIL\Microsoft.SharePoint.Publishing\12.0.0.0__71e9bce111e9429c\Microsoft.SharePoint.Publishing.dll' and 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\bef9a111\5466e63c\assembly\dl3\4f0b8d4e\c81e2802_6788c901\PPM.DLL'

Any ideas on how to resolve this conflict? I can't uninstall the dll from the GAC due to some dependencies, and I can't build my project without the reference.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

痴情换悲伤 2024-07-20 10:44:33

我尝试停止 IIS,然后删除“C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files”文件夹中的所有内容,然后再次启动 IIS。

I'd try stopping IIS, then deleting everything in your 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files' folder then start IIS again.

许一世地老天荒 2024-07-20 10:44:33

您可以将引用的“复制本地”属性设置为 false,以便 VS Studio 不会输出 dll 的副本。 这样,CLR 就只会出现在 GAC 版本上。

You can set the reference's Copy Local property to false so that the VS Studio doesn't output a copy of the dll. That way the CLR will only hit the GAC version.

土豪我们做朋友吧 2024-07-20 10:44:33

显然,清理项目不会自动删除 Bin 文件夹中的文件。 我疯狂地试图弄清楚它。所以,如果上面的解决方案仍然不起作用,请尝试删除项目 bin 文件夹中的所有内容

Apparently cLeaning the project does not automatically delete the files in Bin folder. I went crazy trying to figure it.So if the solution above still doesn't work try to delete everthing inside your project bin folder

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文