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.