4

We need to develop for SharePoint 2013 and SharePoint 2010 concurrently, so I installed Windows Server 2012 on my machine with a SharePoint 2013 installed, because of the downward compatibility of SharePoint 2013.

When opening a solution containing SharePoint 2010 projects with Visual Studio 2012 (with the Office 2013 developer tools installed), every time I get this annoying dialogue:

Migration Dialogue

and after clicking "No", a migration report opens in my browser. Additionally, the .csproj file gets checked-out and the FileUpgradeFlags element gets a value of 40.

Appart from being really annoying (especially when opening very large solutions), the check-out of the project file and value of FileUpgradeFlags is a problem when accidentally checked-in, because then all my collegues still working with Windows 7 and SharePoint 2010 would be presented with another migration dialogue upon opening the respective solution.

Does anyone experience a similar behaviour and possibly know a way to disable the migration dialogue and check-out of the project files?

We need the SharePoint 2010 projects to stay that way.

Thanks in advance!

Boris
  • 159
  • 11
  • 1
    Hello, have you found any solution here? Thanks in advance! – Serhiy Aug 03 '13 at 13:24
  • 1
    Not yet, sadly. I have copied the question to [StackExchange](http://sharepoint.stackexchange.com/questions/72171/how-to-disable-project-migration-dialogue-when-opening-a-sharepoint-2010-project), but no help there, either. – Boris Aug 05 '13 at 07:20

1 Answers1

3

I've found how to manage this. Update your .csproj file for SP 2010 project. Set

<TargetOfficeVersion>15.0</TargetOfficeVersion>

So now it will not ask you for migration anymore when opening in SP 2013 machine. But you will not be able to build the project on 2010 machine. So you can put following code to the .csproj.user file:

  <PropertyGroup>
    ...
    <TargetOfficeVersion>14.0</TargetOfficeVersion>
  </PropertyGroup>

The revision control system(like SVN or Git) is usualy configured to ignore .csproj.user files. So if this file is not ignored by revision control system - add it to ignore list.

That's it. Everyone who opens a project on a SP 2013 machine will not see a migration dialog. Everyone who needs to work on SP 2010 - just update the .csproj.user file.

Serhiy
  • 4,357
  • 5
  • 37
  • 53
  • 1
    Thanks, that sounds great! I am on vacation right now, but will try this out first thing when I am back in the office. I will reverse your suggestion, though, as currently I am the only one working with SP2013 at the moment, so I will set `TargetOfficeVersion` to `15.0` in my own .csproj.user file. I will go ahead and mark your answer as the accepted one, because I think, it will be! :) – Boris Aug 21 '13 at 10:44