Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a SharePoint 2010 Solution that is made in VS 2012. I wanted to try and upgrade the solution to it deploy to our new SharePoint 2013 server.

In the Package properties i have set the version to 15.0

Package.package properties

The site url is pointing to the SP2013 site collection.

enter image description here

But the Server Connection is giving me the following error.

enter image description here

Also, the Project Properties, wont let me choose .NET Framework 4.0

enter image description here

How can i get VS2012 to treat the project as if it is a SharePoint 2013 Solution ?

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

I should have checked this earlier.

I made 2 empty SharePoint projects. One 2010 and one 2013 and did a compare of the different files.

The only difference i could find was in the csproj file. In the SP 2013 project there is a <TargetOfficeVersion>15.0</TargetOfficeVersion> property that was not present in the SP 2010 project.

I added it and reopened the project, and it worked just fine.

You could also change the TargetFramework to 4.5 but i chose to do it in the project properties instead, incase VS is doing something special when you change Framework

If you have references to the _layouts folder or the _controlltemplates folder, like you have in visual web parts, you should change them to _layouts/15/ and _controlltemplates/15/

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.