Sunday, October 26, 2014

An error occurred while trying to load some required components

An error occurred while trying to load required components in Visual Studio 2012

This could be the case happening while installing Office Developer Tools in offline mode and then started creating SharePoint projects using Visual Studio 2012


An error occurred whilst trying to load some required components, Please ensure the following prerequisite components are installed.

Microsoft Web Developer Tools

Microsoft Exchange Web Services

The possible reason could be while installing the Office Developer tools and prerequisites, the office web installer sets some parameters mapped to GAC, which is not done while installed in offline mode according to following link
http://blogs.msdn.com/b/timquin/archive/2013/01/22/setting-up-visual-studio-2012-for-sharepoint-2013-development-offline.aspx

The fix this try the following steps:
- To un-install Microsoft Exchange Web Services from Control Panel
- Open the 'Command Prompt' with Administrator Previliges
- Navigate to location of file EWSManagedApi32.msi from the Command Prompts
- Run the following command. Make sure to be in single line. There is 'space' between .msi  and addlocal

  EwsManagedApi32.msi addlocal="ExchangeWebServicesApi_Feature,ExchangeWebServicesApi_Gac"

- The installation of the Exchange Web Services Api finishes. This commands does the installation and as well as maps the required dll files in GAC.
- Try closing any open instances of Visual Studio. Restart the Visual Studio
- Enjoy creating SharePoint Projects.

Hope this helps!

Thanks,

Vinay.


Saturday, October 25, 2014

SharePoint Connection Error

SharePoint Connection Error While Adding Visual Web Part: 

While creating the web part in SharePoint 2013, in the SharePoint customization wizard, i got the following error


While developing web part, Visual Studio creates file structure to debug and deploy the solution. After some searching in google i came to know that, the following are the causes for failure in my case:

- The service account (used for development) did not have login priviliges for SQL Server
- The service account (used for development) did not have dbOwner permissions for specified content DB
- The service account (used for development) did not have read and write access to Config DB.

Once all these conditions are satisfied i can finally connect to SharePoint site via Visual Studio

References: 
http://blog.aditi.com/enterprise_social/challenges-starting-developing-apps-sharepoint-2013/#lightbox[gallery-8VSV]/8/
https://support.microsoft.com/kb/935751?wa=wsignin1.0


Installing Microsoft Office Developer Tools for Visual Studio 2012

While trying to set up My Development machine, i have finished installing Visual Studio 2012. For development in SharePoint 2013 we need to have Microsoft Office Developer Tools installed. Microsoft has web installer version for this which can be downloaded from

http://aka.ms/OfficeDevToolsForVS2012

The download file name is OfficeToolsForVS2012RTW

Unfortunately, due to closed environments, Firewall rules, this installer cannot run. It might give the following error

'Unable to Download the product list from, check your network connection and try again. If the problem persists, report the issue on the Web Platform Installer 5.0 forum at:


At this time while doing some searching in google, i came to know that we can download the following tools one by one and install it offline. Even Web Installer does the same steps but due to connectivity settings it could fail sometimes.

Microsoft Identity Extensions
http://download.microsoft.com/download/0/1/D/01D06854-CA0C-46F1-ADBA-EBF86010DCC6/RTM/MicrosoftIdentityExtensions-64.msi

Workflow Manager Client 1.0
http://download.microsoft.com/download/D/B/D/DBD439A9-370D-40EA-B3B7-45CD935B98FB/WF/en/WorkflowManagerClient_x64.msi

Microsoft Exchange Web Services 2.0
http://download.microsoft.com/download/8/2/5/825231AC-D373-45D4-A644-7AF12340C815/EwsManagedApi32.msi

Microsoft Windows Identity Foundation SDK 4.0
http://download.microsoft.com/download/7/0/1/70118832-3749-4C75-B860-456FC0712870/WindowsIdentityFoundation-SDK-4.0.msi

Microsoft SharePoint Client Components
http://download.microsoft.com/download/E/1/9/E1987F6C-4D0A-4918-AEFE-12105B59FF6A/sharepointclientcomponents_x64.msi

Microsoft Workflow Manager Tools
http://download.microsoft.com/download/D/B/D/DBD439A9-370D-40EA-B3B7-45CD935B98FB/WFTools/en/WorkflowManagerTools_x64.msi

Cumulative Update 1.0 for Microsoft Workflow Manager Tools
http://download.microsoft.com/download/3/B/B/3BBBBE7D-5D9B-4ADD-9A53-BDDF002F4ABB/WorkflowManager-KB2799754-x64-EN.exe

Open XML SDK 2.5
http://download.microsoft.com/download/5/5/3/553C731E-9333-40FB-ADE3-E02DC9643B31/OpenXMLSDKV25.msi

Microsfot Visual Studio Tools for Office Runtime
http://download.microsoft.com/download/A/6/0/A60BE6E6-41E8-4A23-BF86-CD3CC2FE968A/ENU/vstor40_x64.exe

Microsoft Office Developer Tools for Visual Studio 2012 - RTM
http://download.microsoft.com/download/2/F/6/2F6A4FFA-D409-40C8-AF68-F6F0CBE0A00D/ENU/officetools_bundle.exe

Once all these tools are downloaded and installed you can see the office extensions for SharePoint 2013 in Visual Studio 2012 Environment.

The following link helped me:
http://blogs.msdn.com/b/timquin/archive/2013/01/22/setting-up-visual-studio-2012-for-sharepoint-2013-development-offline.aspx

Thank you so much Tim!!!

Happy SharePointing !