Wednesday, June 7, 2017

This is an issue I encountered with Sitecore, TDS and VSO. Everything would compile just fine locally, but when I setup a Build Definition in VSO I would get the following error for all of my projects...

What I ended up doing was removing the following from the top of the generated TDSGlobal.config...

<?xml version="1.0" encoding="utf-8"?>

After that, VSO compiles everything just fine. As far as I can tell the TDSGlobal.config is still working. I'm not sure of any possible negative repercussions from removing this line, but so far I haven't seen any and it got around the error.

Monday, June 5, 2017

Another random TDS error I've encountered a few times now. It seems to stem from renaming and/or moving around TDS projects too much. I'm not 100% on the exact cause, but the error that gets generated...

If you attempt to build only the TDS project listed, then it compiles without any errors. If you attempt to build a different TDS project that uses the Multi-project Properties tab to do Package Bundling, then you get the shown error.

The fix (for me at least) was to change the value of the "Recursive Deploy Action" dropdown, then save and rebuild. You can immediately change it back to the original value, but you need to force it to re-save its value to the .scproj file.

Repeat for any affected TDS projects, and your bundling functionality should work again.

Monday, May 15, 2017

I've received this error several times now, and it feels like each time it stems from a different issue, so I'm going to update this post every time I receive this error to track the different possible solutions.

1. Restart Visual Studio
This error often happens when adding a new TDS Project to an existing solution, and then immediately trying to compile. In this case, I just restarted Visual Studio and the new TDS Project compiled without errors.

2. TDS Version Mismatch
We use the HedgehogDevelopment.TDS.x.x.x.x.nupkg NuGet package to allow our VSO to compile TDS projects without having to install anything on the VSO server. With multiple developers working on a project, not all are always sync'd on the same version of TDS. Having a lower version of TDS installed on your local Visual Studio than the NuGet package version being used has caused this error before.

Thursday, May 11, 2017

I have a project that is setup for CI/CD using VSO and Octopus. VSO has a build definition that compiles the code twice, once under a Release-CM configuration and once under a Release-CD configuration (to take advantage of transforms). Both generate a TDS Update package to be pushed to my Sitecore servers.

I was running into an issue where Octopus was installing the most recent CM Update package, but was sometimes installing the previous build's CD package.

It turns out the problem stemmed from how VSO was interacting with the Trigger in Octopus that was generating the new Release. VSO would build the Release-CM first, which would generate the CM Update package and send it to Octopus, then build the Release-CD second, and send the CD Update package to Octopus. Octopus was triggering a Release when it got the CM Update package, and sometimes the CD Update package was making it in time to be included in the Release, and other times it wasn't so Octopus was just using the most recent version it had (the previous build's version).

The solution was to switch the Trigger to wait for the CD Update package before generating the Release. Easy!

If you're using Sitecore 8.2 and up, you have the option of using Azure SQL. It's pretty easy to push all of the Sitecore DBs up to Azure, except for the Sessions DB. You need to run a quick SQL script to edit the database's schema before you can push it to Azure, otherwise you'll get errors.