8.2 Site installs. - uSync will put any of your configuration from the repo into the site.
8.3 if both using SQL CE - you can ignore the changes to web.config at this point (in fact the file should look near identical and may not even say there have been changes)
I gave that a go, but step 8 is failing. I get a couple Errors and 63 Warnings on the build.
Errors:
The name 'model' does not exist in the current context
'System.Web.WebPages.Html.HtmlHelper' does not contain a definition for 'Partial' and no extension method 'Partial' accepting a first argument of type 'System.Web.WebPages.Html.HtmlHelper' could be found (are you missing a using directive or an assembly reference?)
Warning example (no need for all of them, I shouldn't think)
Unable to update auto-refresh reference 'automapper.dll'. Cannot find assembly 'C:\Users\UserName\Documents\Visual Studio 2015\Projects\umbraco.7.6.6.2017.09.21\packages\AutoMapper.3.3.1\lib\net40\AutoMapper.dll'.
Perhaps I should provide my steps here, and if anyone can spot any obvious errors... NB All steps are taken in VS.
8.0 - Clone repo to local directory
8.1 - File: Open Web Site... (From local files - I browse to the repo)
8.2 - Save solution (in repo - not in default VS2015 folder)
8.3 - In solution explorer: right-click the solution name and choose "build".
Usually I create a "web project" not a "web site" inside visual studio - there are some subtle differences, but one is that all the "umbraco" folders like umbraco, umbraco_client don't appear in your solution but are handled by config settings within the project.
if you've created a Web Application in visual studio you shouldn't need to add the solution to visual studio like your step 8.1 your repo should have a .sln file that your developer can just open with everything they need already setup.
One last question... does the colleague then commit their webconfig (edited in 7.1)? Or is this added to the gitignore (as I think you suggest (in 8.3)?
if they have set it up the same as you (for example both local SQLCE) then the web.configs should actually be the same.
you might see it as a change because the UmbracoDSN line moved, but if you check it - you might see that the actuall connection strings match.
In that sense you can just 'revert' the changes made when the colleague setup there install, because the original web.config will have everything they need - so there would be nothing for them to check in once they had setup their version.
Visual Studio and Git workflow
I think it should go something like this:
Am I missing anything here?
Specifically, should Colleague use NuGet to install an Umbraco package on their local machine? Or will all the needed files be part of the repo?
I am a complete noob when it comes to working with Umbraco and git, so please forgive any elementary mistakes in this outline.
Hi
My Additional steps for this (using uSync)
6.1. Install uSync (
install-package uSync
)6.2. make sure the uSync folder is commited to the repo (usync/data)
....
7.1 Colleague - alters values in web.config on first start
So it looks like
Also remove the ConnectionString from
UmbracoDSN
connection8.0 builds website
8.1 will be prompted to Install Umbraco
(Customize - selects SQLCE - no starterkit)
8.2 Site installs. - uSync will put any of your configuration from the repo into the site.
8.3 if both using SQL CE - you can ignore the changes to web.config at this point (in fact the file should look near identical and may not even say there have been changes)
9 . Colleague gets to work.
Thanks...
I gave that a go, but step 8 is failing. I get a couple Errors and 63 Warnings on the build.
Errors:
Warning example (no need for all of them, I shouldn't think)
Perhaps I should provide my steps here, and if anyone can spot any obvious errors... NB All steps are taken in VS.
8.0 - Clone repo to local directory
8.1 - File: Open Web Site... (From local files - I browse to the repo)
8.2 - Save solution (in repo - not in default VS2015 folder)
8.3 - In solution explorer: right-click the solution name and choose "build".
(8.4 - watch Error list populate)
Addendum: by saving the .sln where VS expects it to be, I got rid of all the warnings. However, the two error messages remain.
Hi
Usually I create a "web project" not a "web site" inside visual studio - there are some subtle differences, but one is that all the "umbraco" folders like umbraco, umbraco_client don't appear in your solution but are handled by config settings within the project.
if you've created a Web Application in visual studio you shouldn't need to add the solution to visual studio like your step 8.1 your repo should have a
.sln
file that your developer can just open with everything they need already setup.Kevin, That solved it. Thanks a bunch.
One last question... does the colleague then commit their webconfig (edited in 7.1)? Or is this added to the gitignore (as I think you suggest (in 8.3)?
if they have set it up the same as you (for example both local SQLCE) then the web.configs should actually be the same.
you might see it as a change because the UmbracoDSN line moved, but if you check it - you might see that the actuall connection strings match.
In that sense you can just 'revert' the changes made when the colleague setup there install, because the original web.config will have everything they need - so there would be nothing for them to check in once they had setup their version.
if for what ever reason you have diffrent db settings (so say you run on SQLCE and your Colleauge is using SQL Express) then i would suggest moving the connection string out of the web.config and excluding that 'connectionStrings.config' using .gitignore
To anyone else who might want it, here is what worked for me (Visual Studio 2015)
Creating a new (empty) Umraco site in Visual Studio and working with GIT
1) Create a new project in Visual Studio
1-a) File: New: Project
1-b) In the next window:
1-b-i) Visual C#
1-b-ii) ASP.NET Web Application
1-b-iii) Ensure create New Git Repository is checked
1-c) In the next window:
1-c-i) Choose Empty project
1-c-ii) Ensure MVC is ticked.
2) Use Nuget to install these packages into the project
2-a) Umbraco CMS
2-b) Usync
3) Build Umbraco
4) Edit .gitignore
4-a) If there is none, add a text file to the project and name it ".gitignore"
4-b) Paste the Visual studio gitignore code into the file (VS gitignore).
4-c) Paste the Umbraco gitignore code into the file (Umbraco gitignore).
5) Commit
6) Publish repo to a git service (e.g. Visual Studio Team Services)
6-a) Check to ensure that /usync/data is in remote
7) Pull repo onto new machine
8) Edit web.config (to these empty values)
8-a) key="umbracoConfigurationStatus" value=""
8-b) name="umbracoDbDSN" connectionString="" (NB: keep provider name)
9) Commit
10) Build Umbraco on new machine
is working on a reply...