Step 2. Run scaffolding script
Executing The Script
You can just run the script and enter the parameters on the command line:
> powershell -file scaffold.ps1
Or you can supply all the parameters when running the script:
> powershell -file scaffold.ps1 -solution "My.Solution" -tenant "MySolution" -company "My Company" -site mysolution
Input Parameters
Required
-solution "Project.Name"
- The name of your project. This should be what you want the solution and project names in the solution to have as a root name.-tenant
"ProjectName"
- The name of your tenant site in Sitecore. This will also be used as the name for the MVC Area in the Web project and thus has to be a single word.-company "Some Company Name"
- the name of the company for which the project is being done. Will be added to theAssemblyInfo.cs
-site "projectname"
- the url of the sandbox site running locally without thehttp://
on it. Will ne added to TDS project configuration
Optional
-vsversion "version"
- version of Visual Studio installed on the machine. This is needed to properly include targets into the Web project build when running from the command line. The default is set for Visual Studio 2013 (v12). If you are running 2012 please specify the-vsversion "11"
.
Expected Output
Abbreviated not to include all the build output:
Prerequisites Checking if script is running from forder that contains original files Done! Detecting Sitecore version Detecting Sitecore... Detected 7.2.140526 Will now set up local environment 1. Backing up Web.config. You will thank us for this one later :) 2. Copying license.xml to support unit tests based on Sitecore.FakeDb 3. Renaming solution artifacts to MySolution - Renaming file names - Renaming file contents - Renaming Area folder and Area Registration class - Renaming Area references 4. Renaming company name on the assembly and TDS packages to My Company 5. Renaming local site reference to point to http://mysolution - Renaming TDS deployment targets - Renaming Sitecore <site> configuration patches for Sandbox profiles 6. Generating new GUIDs for solution project files and TDS connector 7. Setup MVC references in solution based on Sitecore release - For Sitecore 7.2 - Copy pre-built config files =============================================================== - Copying - .\Automation\Sitecore-Versions\7.2\packages.config ==> .\MySolution.Web\ - Copying - .\Automation\Sitecore-Versions\7.2\Web.config ==> .\MySolution.Web\Areas\MySolution\Views\ 8. Copying Sitecore binary dependencies into Libs\Sitecore - Copying - .\sandbox\Website\bin\Lucene.Net.dll ==> .\Libs\Sitecore - Copying - .\sandbox\Website\bin\Sitecore.Analytics.dll ==> .\Libs\Sitecore - Copying - .\sandbox\Website\bin\Sitecore.Buckets.dll ==> .\Libs\Sitecore - Copying - .\sandbox\Website\bin\Sitecore.Kernel.dll ==> .\Libs\Sitecore - Copying - .\sandbox\Website\bin\Sitecore.Logging.dll ==> .\Libs\Sitecore - Copying - .\sandbox\Website\bin\Sitecore.Mvc.dll ==> .\Libs\Sitecore - Copying - .\sandbox\Website\bin\sitecore.nexus.dll ==> .\Libs\Sitecore - Copying - .\sandbox\Website\bin\Sitecore.Update.dll ==> .\Libs\Sitecore - Copying - .\sandbox\Website\bin\Sitecore.Zip.dll ==> .\Libs\Sitecore 9. Restoring NuGet packages... Installing 'Microsoft.AspNet.Mvc 5.1.2'. Installing 'Microsoft.AspNet.Razor 3.1.2'. Installing 'Microsoft.Web.Infrastructure 1.0.0.0'. Installing 'Microsoft.AspNet.WebPages 3.1.2'. Successfully installed 'Microsoft.Web.Infrastructure 1.0.0.0'. Installing 'FluentAssertions 2.2.0.0'. Successfully installed 'Microsoft.AspNet.Razor 3.1.2'. Installing 'NSubstitute 1.7.2.0'. Successfully installed 'Microsoft.AspNet.Mvc 5.1.2'. Installing 'NUnit 2.6.3'. Successfully installed 'Microsoft.AspNet.WebPages 3.1.2'. Installing 'Sitecore.FakeDb 0.21.0'. Successfully installed 'NUnit 2.6.3'. Successfully installed 'Sitecore.FakeDb 0.21.0'. Successfully installed 'NSubstitute 1.7.2.0'. Successfully installed 'FluentAssertions 2.2.0.0'. 10. Add MVC references into MySolution.Web project 11. Will now build and deploy Sandbox configuration Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. Build started 11/12/2014 1:20:58 PM. [...] Build succeeded. 0 Warning(s) 0 Error(s) TDSVersion: 5.0.0.10 FrameworkVersion: 4 Visual Studio Version: 12.0 \Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.Tasks.dll Restoring NuGet packages... To prevent NuGet from downloading packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck 'Allow NuGet to download missing packages'. All packages listed in packages.config are already installed. MySolution.Data -> C:\Training\Test\MySolution.Data\bin\Sandbox\MySolution.Data.dll MySolution.Custom -> C:\Training\Test\MySolution.Custom\bin\Sandbox\MySolution.Custom.dll MySolution.Web -> C:\Training\Test\MySolution.Web\bin\MySolution.Web.dll Using TDS project config setting 'Sandbox' to perform config transforms Using TDS project config setting 'Sandbox' to perform xml transforms Preparing to do FOLDER replacement from ..\MySolution.Environments\ALL to C:\Training\Test\MySolution.TDS.Master\Sandbox\\ Preparing to do FOLDER replacement from ..\MySolution.Environments\Sandbox to C:\Training\Test\MySolution.TDS.Master\Sandbox\\ Preparing to run File Replacement cleanup File Replacement cleanup complete Looking for: C:\Training\Test\MySolution.TDS.Master\Sandbox\**\*.* Sitecore Connector Successfully installed to ..\sandbox\Website Preparing to run Sitecore Web Project Deploy Cleanup Sitecore Web Project Deploy Cleanup complete All Done.
Exceptional Scenarios
No Sitecore installed in ./sandbox