Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jason Espin 368 posts 1335 karma points
    Jun 04, 2015 @ 16:44
    Jason Espin
    0

    Using Visual Studio Online for Umbraco 7 project control

    Hi all,

    Our company has taken the decision to move our code repositories from Mercurial and Bitbucket to Visual Studio Online (Essentially cloud based TFS) however we are having nothing but issue migrating an existing project over to TFS especially when it comes to uGet and dependencies.

    Does anyone have any experience with managing an Umbraco project in TFS or Visual Studio online? If so, how do you go about your set-up? We have excluded the bin folder from the repository as dlls should really be compiled on each users individual machines.

    We also only ever install packages through nuget as doing so through the back office can lead to numerous conflicts later on down the line.

    In our current TFS setup I included all of the Umbraco files in my solution apart from the bin folder as mentioned above.

    In my local workspace I have cloaked the packages folder and uncloaked the repositories.config file contained within. This prevents the packages folder from being uploaded to the TFS server.

    This seems to work fine as all of the NuGet packages are added in when someone pulls the codebase from TFS however after attempting to run the Umbraco solution we then get a yellow screen of death and the following message:

    Could not load file or assembly 'HtmlAgilityPack, Version=1.4.0.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
    
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
    
    Exception Details: System.IO.FileLoadException: Could not load file or assembly 'HtmlAgilityPack, Version=1.4.0.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
    

    My main question is, how do we avoid these issues?

    Any help would be greatly appreciated as so far I am starting to think TFS/VS Online is pretty useless for hosting Umbraco code respositories.

    Thanks in advance.

  • Maff 141 posts 466 karma points
    Jun 04, 2015 @ 17:09
    Maff
    0

    Hi Jason,

    I'm using VS Online for the majority of my Umbraco projects and haven't had any issues with it. Your error sounds like a NuGet issue rather than Umbraco.

    I always add my packages folder to the .tfignore file (which is at the root of your local folder along with the BuildProcessTemplates and Code folders) and have NuGet restore enabled on my solution (VS2013).

    Have you tried restoring NuGet packages in VS before building/running the application?

    Thanks,

    Maff

  • Jason Espin 368 posts 1335 karma points
    Jun 04, 2015 @ 17:33
    Jason Espin
    0

    Hi Maff,

    That's exactly what I am doing except rather than using the .tfignore file I am using the cloaking functionality of TFS to ignore/hide folders. When the project is restored or downloaded on another machine, upon build, NuGet does it's thing and retrieves the package information.

    It was a fairly simple process with Mercurial as there are a number of example files on here as to how to setup an Umbraco project for each version control engine but no such example for TFS / Visual Studio online.

    Cheers,

    Jason

  • Maff 141 posts 466 karma points
    Jun 04, 2015 @ 17:48
    Maff
    0

    I'd be happy to take a look with you if you're at Codegarden next week?

    Maff

  • Jason Espin 368 posts 1335 karma points
    Jun 04, 2015 @ 17:53
    Jason Espin
    0

    Unfortunately I won't be there

  • Jason Espin 368 posts 1335 karma points
    Jun 04, 2015 @ 17:58
    Jason Espin
    0

    When I create a new repository, there is no tfignore file created.

  • Maff 141 posts 466 karma points
    Jun 04, 2015 @ 22:09
    Maff
    0

    That's a shame.

    The file isn't created until you ignore a file, so in your Pending Changes, choose to ignore a file or folder, then you will see the .tfignore file (and it will appear in the Pending Changes list also). Now you can open that file up and add whatever folders/files you want.

  • Jason Espin 368 posts 1335 karma points
    Jun 05, 2015 @ 20:44
    Jason Espin
    0

    I managed to get the packages file excluded using another method however I now have this issue:

    https://our.umbraco.org/forum/umbraco-7/using-umbraco-7/65371-Server-compilation-errors-when-restoring-TFS-Umbraco-solution

    Any ideas?

  • Maff 141 posts 466 karma points
    Jun 07, 2015 @ 23:32
    Maff
    0

    sorry haven't seen that issue before - looks like some pretty fundamental DLLs are missing from your project by the looks of it though... :s

  • Jason Espin 368 posts 1335 karma points
    Jun 08, 2015 @ 11:02
    Jason Espin
    0

    Well that leads me to believe that maybe the Umbraco Nuget package isn't put together correctly as the elements that are 'missing' are dependencies that should be brought in with this Nuget package. I only ever use Nuget to install packages so everything should be restored correctly on the other end but it looks like that isn't the case here. Back to Mercurial methinks.

  • Maff 141 posts 466 karma points
    Jun 08, 2015 @ 11:17
    Maff
    0

    Have you checked the NuGet client versions? That could be causing issues with the package restore...

Please Sign in or register to post replies

Write your reply to:

Draft