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.
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?
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.
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.
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.
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:
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.
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
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
I'd be happy to take a look with you if you're at Codegarden next week?
Maff
Unfortunately I won't be there
When I create a new repository, there is no tfignore file created.
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.
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?
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
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.
Have you checked the NuGet client versions? That could be causing issues with the package restore...
is working on a reply...