Unable to open in Visual Studio shared apps created in Xamarin Studio

VagifAbilovVagifAbilov Vagif AbilovNO ✭✭

I am testing Xamarin Forms on Windows and Mac, and it looks like shared (universal) apps created in Xamarin Studio can't be opened in Visual Studio (2013 Update 2). Here is what happens:

  1. Projects based on Portable app templates can be created and opened in either environment.
  2. Projects based on Shared app templates and created using Visual Studio can be opened in Xamarin Studio both on Windows and Mac.
  3. Projects based on Shared app templates and created using Xamarin Studio for Windows freezes Visual Studio on attempt to open them ("Loading project XXX...")
  4. Projects based on Shared app templates and created using Xamarin Studio for Mac fail to load in Visual Studio with the message "Some data sources have regressed in their version number." Log file has further information about mismatch in ImmutableDictionary contents (see attached file).

I suspect this is a Visual Studio bug (since Xamarin Studio happily opens all projects), but it makes it hard to reuse solutions between environments.

Posts

  • TheRealJasonSmithTheRealJasonSmith Jason Smith USXamarin Team Xamurai

    Yes we are seeing evidence that the shared projects as created by XS are not compatible with VS. At this time I suggest if you are in a mixed environment to create your projects in VS. I am following up with the XS team.

  • CraigDunnCraigDunn Craig Dunn USXamarin Team Xamurai
    edited May 2014

    @VagifAbilov‌ have you also installed the Shared Projects support Visual Studio extension? Visual Studio 2013 Update 2 may still require that extension to create and use Shared Projects outside of the Microsoft Universal Application template.

    To test, I just created an empty Xamarin.Forms Shared solution on Mac OS X / Xamarin Studio and then opened it in Visual Studio 2013 Update 2 (with that extension installed) and it worked fine... *

    (see our Shared Projects doc for more info).

    • Your Mileage May Vary - let us know?
  • VagifAbilovVagifAbilov Vagif Abilov NO ✭✭

    @CraigDunn, I installed the extension, it affected behavior somewhat, but still no luck. I no longer get "Some data sources have regressed in their version number." error, but now Visual Studio just hangs with "Preparing Solution" message if I try to open projects created with Xamarin Studio.

  • KevinFordKevinFord Kevin Ford USUniversity, Certified XTC Partners ✭✭✭

    You shouldn't need the extension, only VS 2013 Update 2. You can modify the project and solution files directly to do what the extension does. There must be something specific that Xamarin Studio is doing with the solution format that is causing the issue.

  • LluisSanchezLluisSanchez Lluis Sanchez ESXamarin Team Xamurai

    @VagifAbilov‌ Can you paste the Visual Studio version information from the about box? I had no problems opening shared projects created in XS, but maybe you have a different version.

  • jeffsimonjeffsimon jeff simon USMember
    edited May 2014

    +1 on this issue, currently blocked by it. Data points in case any of them are helpful:

    • I'm using VS2013u2 on Win8.1 and XS 5.0 on OSX
    • This was working just fine yesterday, freezes this morning. Didn't change anything that I'm aware of on my end, but I was playing with projects most of yesterday trying to get an iOS/Mac/Win SharedProject-based solution up and running, so may have tweaked something towards the end of the day :/
    • Repros on 2 different machines right now. Repro'ed on both update from vs2013u1 to vs2013u2, and a fresh install of vs2013u2. Note that in neither case could I create a Shared Project in VS (or load one that I created in XS-Mac) unless I installed the extension. Not sure why that is.
    • My solution has a variety of platform-specific app projects and 5 or 6 Shared Projects
    • As with @VagifAbilov‌, VS is now freezing while trying to load one of the shared projects. Example from the vsfault pasted below my sig.
    • Through various shenanigans, I can get a dialog that tells me it's failing to create a resx
    • NOTE: If I remove all references to resx and designer-related files in the .projitems file, it loads fine in VS
    • VS version: "12.0.30501.00 Update 2" (Ultimate, fwiw)
    • XS-Mac version: "5.0 (build 878)"

    Edit: in case it helps: the resx files in questions are in a Windows Forms project that was created in VS prior to VS2013u2/Shared projects. I just added the project to the new solution. It worked fine yesterday, doesn't today...

    Hope that helps,
    Jeff

    5/31/2014 6:52:50 AM
    Crippling
    System.AggregateException: One or more errors occurred. ---> Microsoft.VisualStudio.ProjectSystem.Utilities.Designers.ProjectDataSources+DataSourceRegressionException: Some data sources have regressed in their version number.
    at Microsoft.VisualStudio.ProjectSystem.Utilities.Designers.ProjectDataSources.CheckValidVersionProgression(IImmutableMap2 oldDataSourceVersions, IImmutableMap2 dataSourceVersions, Boolean unconfiguredProjectLevel)
    at Microsoft.VisualStudio.ProjectSystem.Utilities.Designers.ProjectDataSources.<>c__DisplayClass22.<b__1b>d__29.MoveNext()
    --- End of inner exception stack trace ---
    ---> (Inner Exception #0) Microsoft.VisualStudio.ProjectSystem.Utilities.Designers.ProjectDataSources+DataSourceRegressionException: Some data sources have regressed in their version number.
    at Microsoft.VisualStudio.ProjectSystem.Utilities.Designers.ProjectDataSources.CheckValidVersionProgression(IImmutableMap2 oldDataSourceVersions, IImmutableMap2 dataSourceVersions, Boolean unconfiguredProjectLevel)
    at Microsoft.VisualStudio.ProjectSystem.Utilities.Designers.ProjectDataSources.<>c__DisplayClass22.<b__1b>d__29.MoveNext()
    Old data source versions: ImmutableDictionary[85439c5d-3d72-4d93-b51c-672bcd086803:0,32d22f95-eded-49da-b33f-21eb5a8a2f36:1,5c70c195-9b03-4ce0-97dd-39df2fb92b5a:1,7aa20670-ba3c-4776-b8db-95f1867c33c1:3,13cc1033-4555-4750-ab7d-327ee4d555af:1]

    New data source versions: ImmutableDictionary[85439c5d-3d72-4d93-b51c-672bcd086803:0,5c70c195-9b03-4ce0-97dd-39df2fb92b5a:1,7aa20670-ba3c-4776-b8db-95f1867c33c1:0,13cc1033-4555-4750-ab7d-327ee4d555af:1]
    <---

  • jeffsimonjeffsimon jeff simon USMember
    edited May 2014

    Also, not sure if this is related, but at some point while creating a Shared Project based Solution, I start getting "Source file specified multiple times (CS2002)" warnings, and sure enough they're specified multiple times in the mcs line. No idea what step I'm doing that causes this, but it's happened several times as I restarted the solution from scratch. note that I was flipping back and forth between VS and XS(Mac) multiple times as I was setting up/testing the solution.

  • jeffsimonjeffsimon jeff simon USMember
    edited May 2014

    I've figured out a simple repro case for the freeze. Open the sln in the attached zip file, select "add existing project" to the sln, select the project in the Defns folder; VS2013u2 hangs. Wild guess time: it's because the projitems specified that it has shared items along with the shardguid, but that shared project isn't in the sln.

    hope that helps,
    Jeff

  • jeffsimonjeffsimon jeff simon USMember
    edited May 2014

    Update; removing references to sharedprojects still fails. Updated sln attached.

    For context;

    • The sln was created in vs2013u2 and XS never touched it

    • the project itself was created in vs2013u1, and worked fine for months; the only interaction XS has had is I added the project to the new sharedproject based solution in VS yesterday, and mucked with the solution in VS trying to get it to work yesterday (it was still working fine then). This morning I tried to load it in XS-Mac (and maybe saved it, can't remember), after which it now freezes in VS.

  • VagifAbilovVagifAbilov Vagif Abilov NO ✭✭

    @LluisSanchez, sorry for late reply. It's Visual Studio 2013 Premium Update 2 (installed Update 2 RTM specifically for Xamarin.Forms). Judging from other replies I suspect there is some sporadic error that is not always reproducible, and the error seems to be in how VS handles projects created with Xamarin Studio. However when the project is created from inside VS, it always works.

  • ZackGramanaZackGramana Zack Gramana USMember

    @VagifAbilov‌ +1 for fixing the problem. Currently biting us at Couchbase.

  • ZackGramanaZackGramana Zack Gramana USMember

    FWIW, also getting this issue, on two machines, in Visual Studio 2013 R2 Premium.

    The issue only seems to occur when I change the active build configuration (e.g. from Debug | Any CPU to Debug | iPhone, or from Debug | iPhone to Release | iPhone).

    To work around this bug, any time I change the active config, I close the solution and reopen it.

  • i_NateCooki_NateCook Nate Cook USMember ✭✭

    Was a bugzilla ever created for this issue that I can follow, or was there ever any resolution?

Sign In or Register to comment.