GAC和Bin dll之间的冲突
我正在自定义 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我尝试停止 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.
您可以将引用的“复制本地”属性设置为 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.
显然,清理项目不会自动删除 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