Moles and SharePoint Behaviour types

前端 未结 2 1894
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-21 06:00

We are having problems with the following code:

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

The error is : Co

相关标签:
2条回答
  • 2021-01-21 06:13

    Delete all the .moles related files and the .moles references.

    Then add the Moles reference for each of the assemblies (right click on the original assembly under References and select Add Moles Reference). This will make the .dlls regenerate for the new Moles version.

    0 讨论(0)
  • 2021-01-21 06:37

    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 alter by adding next lines under 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 讨论(0)
提交回复
热议问题