I am working on creating the event receiver in SharePoint 2010. When I create a new--> project--> event receiver, I choose the sandbox solution and hit ok.
I am getting the following error
"Cannot connect to the SharePoint site: http://servername/. Make sure that this is a valid URL and the SharePoint site is running on the local computer. If you moved this project to a new computer or if the URL of the SharePoint site has changed since you created the project, update the Site URL property of the project."
I get this error all the time when I create any SharePoint solution and deploy it. So usually I will just go inside the proj folder and change this 'projname.csproj.user' file's tag <SharePointSiteUrl>http://servername/</SharePointSiteUrl>
to <SharePointSiteUrl>http://sitename/</SharePointSiteUrl>
and from then on it works fine.
But this time for event receiver, I'm getting that error and when I look into the project folder its empty. I'm not sure how to work around this scenario.