Skip to main content
SharePoint 2013Uncategorized

Visual Studio 2012 Issues Connecting to SharePoint 2013

By June 15, 2013July 24th, 2018No Comments

Issue:

Started to learn how to use c# and asp.net and thought I would start to teach myself how to develop new apps for SharePoint 2013.  Turns out after getting SP2013 and Visual Studio 2012 all setup in my dev environment I couldn’t get Visual Studio to connect to SharePoint.  After naming my project and trying to specify the site to deploy my project to I would get the following error:

Cannot connect to the targeted site. This error can occur if the specified site is not hosted on the local system. SharePoint solutions work only with locally-installed versions of SharePoint Foundation or SharePoint Server. Remote development is supported only for apps for SharePoint 2013.

VS2012_SP2013_Connect_Issues

 

Solution:

Turns out, Visual Studio will only connect to SharePoint if the physical address of the machine is returned instead of 127.0.0.1.  To overcome this issue I added an entry into my hosts file “C:WindowsSystem32driversetchosts” that had my machines physical address and Visual Studio had no problems connecting after that.

Jason

Author Jason

More posts by Jason

Leave a Reply