Conflict between GAC and Bin dll

I am setting up 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 get to the page, I get the following error:

An error occurred during processing. 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: Type "Microsoft. SharePoint .Publishing.PublishingLayoutPage exists as in 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 cannot remove the DLL from the GAC due to some dependencies, and I cannot build my project without a link.

+3
source share
3 answers

I would try to stop IIS and then delete everything in the folder "C: \ WINDOWS \ Microsoft.NET \ Framework \ v2.0.50727 \ Temporary ASP.NET" and then start IIS again.

+2
source

You can set the Reference Copy Local property to false so that VS Studio does not display a copy of the dll. Thus, the CLR will only go into the GAC version.

+2
source

, Bin. , . , , bin

+1

Source: https://habr.com/ru/post/1702817/


All Articles