SharePoint Labor Types and Types

We are having problems with the following code:

        BSPSite site = new BSPSite();
        BSPWeb web = site.SetRootWeb();

Error: Failed to load the file or assembly "System.Moles, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = 0ae41878053f6703" or one of its dependencies. The system cannot find the specified file.

We tried to restore the Behavoir assembly in the .NET 4 source code, but that did not work. We are using v0.94.

Any help would be appreciated.

+3
source share
2 answers

1) Go to C: \ Program Files (x86) \ Microsoft Visual Studio 10.0 \ Common7 \ IDE \ PrivateAssemblies

2) Find Microsoft.Moles.VsHost.x86.exe.config

3) Open and modify by adding the following lines at runtime

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
           <dependentAssembly>
                     <assemblyIdentity name="System.Moles" publicKeyToken="0ae41878053f6703" culture="neutral"/>
                     <bindingRedirect oldVersion= "4.0.0.0"
                                              newVersion= "2.0.0.0"/>
            </dependentAssembly>

     </assemblyBinding>
0
source

.moles .moles.

Moles ( Moles). .dlls Moles.

-1

All Articles