Posts

Bonkers Build Server

Image
Setting up a VSTS Build Server to do automated builds and run unit tests. Life is good, I have provisioned the VM and installed all the necessary tools required to build and test my solution. I queue a new build and watch helplessly as my build fails on the step to execute my lovely unit tests (SSDT unit tests if you must know). This is the exception that I get: Microsoft.Build.Exceptions.InvalidProjectFileException: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.  ... Aborting test execution. But wait, I have logged on to the build server vm and built and tested my solution manually so I know all the bits are on the machine, so what's up dude, you're ruining my day!! The key word in the exception is "<Import>". My test project is configured to d...

VSTS Agent Proxy Hell

Image
Well, not quite fire and damnation but quite a lot of grief. Let me start by saying how much I appreciate Visual Studio Team Services (aka VSTS) - it is a fantastic product and although stuff keeps changing (and you need to remember that) it is usually for the better. For example: the build agent that you can download and install on a local build server is often changing. I can tell this because the folder structure changes almost every time I set up a new build server. I think this is great! It means that the VSTS team are continually improving the product. However, one issue relating to agents that can be quite annoying and time consuming is trying to figure out how to tell it to use a proxy server to connect to VSTS. In the old days an agent would use the default IE proxy settings, then came the 'modify the agent config file' approach which meant adding the following to the VsoAgent.exe.config and VsoAgentService.exe.config files: But now there is a different ...

"Microsoft" -and "Licensing" -eq "Pain"

Image
This is new to me... Apparently, you can't use Reporting Services to connect to an incorrectly matched SQL Database SKU:  https://blogs.msdn.microsoft.com/psssql/2013/02/20/rs-database-engine-does-not-meet-edition-requirements/ If you try to, you get this lovely exception in SSRS: The interesting thing is I got this exception trying to setup a SQL Express Reporting Service data source connecting to a Developer edition of the database server. I thought Express was free so why would they put restrictions on what database server it connects to? Ahh well...time to install SSRS Developer edition I guess :-)

Splat! Ahhhaaaa!!!

Ever had a situation where you need to execute a cmdlet in PowerShell but also needed to pass in different parameters depending on what parameters had been passed to your code? So the first thing you try is using a whole lot of if else statements...but that is butt ugly and verbose right? Well, PowerShell uses a technique called Splatting to resolve this. Here is a simple enough post to explain it:  https://ramblingcookiemonster.wordpress.com/2014/12/01/powershell-splatting-build-parameters-dynamically/ Thanks rambling cookie monster!

Migrating from TFS to Git

Ok, so I want to migrate my TFS source code to a Git repository but I don't want to lose any history - how do I do it? Git-tf will do the job quite nicely and this blog post does a decent job of explaining it:  https://chriskirby.net/blog/migrate-an-existing-project-from-tfs-to-github-with-changeset-history-intact Only thing to keep in mind is that Git-tf uses Java so that will need to be installed first. Happy days!

Deploying Master Data Services (MDS) Models using VSTS!

Image
If you need to know how and why and what when it comes to MDS model deployment then this article is the best I have read to help you understand the basics:  http://www.sqlchick.com/entries/2015/3/16/how-to-deploy-master-data-services-models-between-environments However, what it doesn't cover is how to get a Build or Release engine like VSTS to deploy the models remotely. Fortunately VSTS provides a PowerShell on Target Machines Build Task that enables us to execute the MDSModelDeploy.exe command remotely. I have a PowerShell script in my TFS repository that I copy to the target machine using a Copy Files Build Task and then invoke that script using the PowerShell on Target Machines task. Now all I need to do is figure out why PS-Remoting is not working on my MDS servers...oh well, next blog post dudes :-)

Let's talk about Nano baby!

Just watched a demo of a Windows Server 2016 Nano vm deployment using PowerShell by one of our very own DevOps Dudes (Si - you da man)...and it rocked! I absolutely love the idea of Nano and to see it up an running within a few minutes with a few lines of Posh code...well, let's just say the brain was on fire! If you haven't looked into Nano yet, you might want to take a look at Channel 9's dedicated channel:  https://channel9.msdn.com/Series/Nano-Server-Team This is the future dudes and dudettes!