Mission accomplished before the end of year 2017.
Mission accomplished before the end of year 2017.
Step 1 – Spin up VM
Sign up a free Azure account, then spin up a VM with Windows 2016 Data Centre image
Step 2 – Configure NSG (Network Security Group)
Make sure you add both HTTP and HTTPS in the Inbound security rules, so we can later access from external.
Step 3 – SQL Server and TFS Installation
Download SQL Server 2016 Express installer (5MB) from the link below, then follow the instruction and install with default settings.
Download TFS 2017 installer (2MB) from the link below, then follow the instruction and install with default settings
By default, TFS will be running on port 8080. In this example, my TFS web url is
Open you your TFS site in IE, make sure you can see the TFS homepage
Step 4 – Register a free domain name
In this step, we’ll register a DNS, and in the next few steps we can configure the TFS to be accessible from external.
After a quick search, I found http://www.freenom.com/ that seems good enough and satisfy me need, so I registered a few free domain names from this site. Registration process is quite straightforward and only took me a few minutes to get my free domain name. 🙂
Once you logged in to the site, you can access to your domain management from Services menu.
Before set up your DNS, you will need to get the virtual machine public IP from Azure portal
In the DNS management screen, put the public IP in the target for A record.
Step 5 – Bind the domain name on TFS site
Open the IIS, first disable the Default Website,then locate to Team Foundation Server site, add a new binding
Host Name: <The one your registered in step 4>
Step 6 – Update the TFS public url
You can change the TFS public url via TFS Admin console.
TIPS: If you try to test the new public url from TFS server, you will be prompted to enter username and password, but I couldn’t manage to log in successfully. I can’t figure out what caused this. If you want to access the TFS on its server, you’ll need to continue using your the local url with port 8080.
Congratulation, you have completed everything, and your TFS server is now publicly available.
It’s a tough day, but finally I get it working 🙂 Hopefully, this might help you.
When you are working on the CMS solution, the solution design and architecture can be very different, that caused writing and maintaining the uint tests be even more difficult than bespoke solution.
A typical example of this is at some point your code calls the Sitecore API, how do you ensure your code is working when the code has related to external dependencies that you can’t remove?
Thanks for Sitecore FakeDb, it makes that happen and a lot simpler to write the unit tests on this CMS plateform. In the following sections, I will assume you are a Sitecore developer with passion of writing the unit tests.
In order to use FakeDb for the unit tests, you need the following dlls within your Tests project
NOTES: All above Sitecore related packages can be either reference from dll or via Sitecore nuget server.
Lastly, you also need to copy your Sitecore license.xml file into the root of your Test project.
NOTE: When you install the Sitecore.FakeDb package, it will automatically update the app.config file by including the license file location (see screenshot below)
In order to run unit tests with NCrunch, in the
NCrunch Configuration window, select the tests project and configure the following settings:
AutoFixture with Sitecore.FakeDb
Adds to the archive.7z all files from Folder1 and its subfolders, except *.png files.
7z a archive.7z Folder1\ -xr!*.png
To exclude the list of directories and files, you can first store the items in a text file separated by new line for each, then run the following command
7z.exe a -t7z archive.7z C:\Project\Solution1 -xr@exclusionList.txt
a – Add to archive
-t7z – type of archive, in this example, it uses 7z
-xr@ – specify the exclusion list.
Recently, I was trying to save the PDF file in the media library and found this issue. The PDF file used empty icon instead.
Luckily, this seems a common issue and solution can be easily googling out.
Sitecore has official document in its knowledge base about this issue.
What I want to point out is if you search this issue from google, you will be very likely found some other blog posts provide the similar approach, the only difference comparing to Sitecore official document is the type specified in the generator.
The type seems redundant or causing icon failed to be displayed in my current Sitecore v8.0 update 3.
Below is my patch config instead of modifying the web.config
<mediaType name="PDF file" extensions="pdf" patch:before="*[@name='AVI video']" >
Happy coding 🙂
My demo app came up with this issue after making some changes to patch config file today.
Reader is in incorrect state
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.Exception: Reader is in incorrect state
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
[Exception: Reader is in incorrect state]
Sitecore.Xml.Patch.XmlReaderSource..ctor(XmlReader reader, String sourceName) +123
Sitecore.Configuration.ConfigPatcher.GetXmlElement(XmlReader reader, String sourceName) +45
Sitecore.Configuration.ConfigPatcher.ApplyPatch(TextReader patch, String sourceName) +138
Sitecore.Configuration.ConfigPatcher.ApplyPatch(String filename) +93
Sitecore.Configuration.ConfigReader.LoadAutoIncludeFiles(ConfigPatcher patcher, String folder) +177
This is a weird issue at the first glance, I still have no idea what happened under the hood, though I solved the problem.
I added a comment in my patch config which is in between and section, this is the fundamental cause.
To fix this YSOD, simply move the comment anywhere within section.
Happy coding 🙂
brew update && brew install jenkins
After Jenkins is installed successfully, follow the instructions to start Jenkins on login
ln -sfv /usr/local/opt/jenkins/*.plist ~/Library/LaunchAgents
If you want to configure Jenkins to launch on system startup, for all users on OS X, then copy the plist file to the system Launchd location instead
$ sudo cp -fv /usr/local/opt/jenkins/*.plist /Library/LaunchDaemons
$ sudo chown `whoami` /Library/LaunchDaemons/homebrew.mxcl.jenkins.plist
You can always start Jenkins manually with
or if you have set up your PATH correctly when installing Homebrew, simply
brew services start jenkins
brew services stop jenkins
brew services restart jenkins
If you have an older version of Jenkins and you are upgrading it, then you can restart it this way:
$ launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.jenkins.plist
$ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.jenkins.plist
Manage Jenkins -> Global Tool Configuration, configure the following sections
Intall automaticallyas we will use the installed JDK
JDK NameE.g. JDK 1.7
JAVA_HOMEpath. E.g. /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home
Intall automaticallyas we will use the installed Maven
Maven NameE.g. Maven 3
MAVEN_HOMEpath. E.g. /usr/local/opt/maven31/libexec
Git intallation should be picked up by default, unless you install GIT after Jekins.
Source Code Managementsections, add repositories link.
Addbutton in Credentials section. In the dialog, choose
SSH Username with private keyoption, then select
From the jenkins master ./ssh, Note: Dont put any value into
Build Nowto test the job.
The ‘lib’ folder should be linking to
If you install your maven via homebrew, your maven home should
maven31 is the version I installed on my mac, change this according to your local setting.)
Execute uninstall script from terminal: