SharePoint 2013 and Visual Studio 2013

For a few weeks I have been using Visual Studio on my normal development environment. Yesterday I decided to install it on a SharePoint 2013 development environment we have at a client.

This development machine already had a Visual Studio 2012 installation so we first uninstalled the 2012 installation. After the uninstall we installed Visual Studio 2013. After rebooting machine strange things started to happen.

  • SharePoint Designer could not connect any more to my SharePoint sites.
  • SharePoint Controls did not work anymore. The content search web part always returned a error:

Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

  • Errors in the ULS log:

11/21/2013 14:35:27.81     w3wp.exe (0x0DA0)                           0x23B4    SharePoint Server Search          Query                             afpkb    Unexpected    Getting results failed: System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.     at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)     at System.Reflection.RuntimeModule.GetTypes()     at System.Reflection.Assembly.GetTypes()     at Microsoft.SharePoint.Client.ProxyMap.ProcessOneAssembly(Assembly azzembly, ClientServiceHost processorSurrogate)     at Microsoft.SharePoint.Client.ProxyMap.Init(ClientServiceHost processorSurrogate)     at Microsoft.SharePoint.Client.ProxyMap.EnsureInited(ClientServiceHost processorSurrogate)     at Microsoft.SharePoint.Client.ProxyMap.GetServerStub(Type type, ClientServiceHost processorSurrogate)     at Microsoft.SharePoint.Client.DataConv…    
11/21/2013 14:35:27.81*    w3wp.exe (0x0DA0)                           0x23B4    SharePoint Server Search          Query                             afpkb    Unexpected    …erter.WriteAsJson(JsonWriter writer, Object obj, ProxyContext proxyContext, JsonSerializationOptions options)     at Microsoft.SharePoint.Client.JsonUtility.SerializeToJson(Object value, TextWriter writer, JsonSerializationOptions options)     at Microsoft.SharePoint.Client.JsonUtility.SerializeToJson(Object value)     at Microsoft.Office.Server.Search.WebControls.DataProviderScriptWebPart.GetInitialResult()    
11/21/2013 14:35:27.81     w3wp.exe (0x0DA0)                           0x23B4    SharePoint Server Search          Query                             afpkb    Unexpected    Getting results failed: System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.     at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)     at System.Reflection.RuntimeModule.GetTypes()     at System.Reflection.Assembly.GetTypes()     at Microsoft.SharePoint.Client.ProxyMap.ProcessOneAssembly(Assembly azzembly, ClientServiceHost processorSurrogate)     at Microsoft.SharePoint.Client.ProxyMap.Init(ClientServiceHost processorSurrogate)     at Microsoft.SharePoint.Client.ProxyMap.EnsureInited(ClientServiceHost processorSurrogate)     at Microsoft.SharePoint.Client.ProxyMap.GetServerStub(Type type, ClientServiceHost processorSurrogate)     at Microsoft.SharePoint.Client.DataConv…    
11/21/2013 14:35:27.81*    w3wp.exe (0x0DA0)                           0x23B4    SharePoint Server Search          Query                             afpkb    Unexpected    …erter.WriteAsJson(JsonWriter writer, Object obj, ProxyContext proxyContext, JsonSerializationOptions options)     at Microsoft.SharePoint.Client.JsonUtility.SerializeToJson(Object value, TextWriter writer, JsonSerializationOptions options)     at Microsoft.SharePoint.Client.JsonUtility.SerializeToJson(Object value)     at Microsoft.Office.Server.Search.WebControls.DataProviderScriptWebPart.GetInitialResult()    
11/21/2013 14:35:27.81     w3wp.exe (0x0DA0)                           0x23B4    SharePoint Server Search          Query                             afpkb    Unexpected    Getting results failed: System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.     at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)     at System.Reflection.RuntimeModule.GetTypes()     at System.Reflection.Assembly.GetTypes()     at Microsoft.SharePoint.Client.ProxyMap.ProcessOneAssembly(Assembly azzembly, ClientServiceHost processorSurrogate)     at Microsoft.SharePoint.Client.ProxyMap.Init(ClientServiceHost processorSurrogate)     at Microsoft.SharePoint.Client.ProxyMap.EnsureInited(ClientServiceHost processorSurrogate)     at Microsoft.SharePoint.Client.ProxyMap.GetServerStub(Type type, ClientServiceHost processorSurrogate)     at Microsoft.SharePoint.Client.DataConv…
    

We started looking for the problem and tried the following list already:

  • Uninstall the Office developer tools for Visual Studio 2012.
  • Repair the SharePoint 2013 installation.
  • Run the Configuration wizard of SharePoint. This also returned a error. Looking in the upgrade log we could not find a real exception.

After all this work we decided to reinstall Visual Studio 2012 to check if that would work and it did!! For now we choose to run both version on our development system. If there is someone that knows what is going wrong please let us know.

Related Posts

Forcing a Device Channel Device channels are a way of using different master pages for different devices. MSDN describes the functionality as followed:   “Browsing ...
Offline Installation SharePoint 2013 In many situation you would like to do a offline installation of SharePoint 2013 or you are required to do a offline installation because you do not h...
User automatically removed from SharePoint Group During my current project we received an access request from a user. We did what we normally do, we checked the request and added the user in the appr...
Unable to start User Profile Synchronization Service A few days ago I wrote a post about loading modules in PowerShell by default: “Load modules by default when opening PowerShell”. Today we had to setup...
Filtering SharePoint Search Results by Content Source Working for one my projects we were looking for a solution to only retrieve search results for a specific Content Source. In our scenario we had a Ext...
PowerShell Scripts During my current project we are using a lot of PowerShell scripts to administrate the environment and make development easier for us. In this post...

4 comments

  • Without spending research hours, my first hunch is changes in the .Net framwork (i.e. SharePoint uses the wrong .Net framework version).

  • I’m facing the same problem as yours. Removed VS2012 and installed VS2013 and then search results web part threw that error message. Have you identified the cause? Thank you

    • Because of different projects we did not have time to identity the problem. The only solution I know untill now is reinstalling Visual Studio 2012 and also keep Visual Studio 2013.

Leave a Reply

Your email address will not be published. Required fields are marked *