DevEnv And The Case Of No Projects Building
Aloha!
Someone emailed me with a problem they were having on compiling SSIS projects. Or rather, it’s a case of the projects not building. This was there output:
“Rebuild All: 0 succeeded, 0 failed, 0 skipped
Build succeeded.
0 Warning(s) 0 Error(s)”
You see, when it comes to Visual Studio Project files, they’re essentially just a MSBuild file. And so when they’re built they’re compiled using MSBuild engine. Even those through Visual Studio.
But, not all project files are the same. Some projects cannot be compiled using MSBuild. Below is a list of project types that we can file under this category:
Here’s a simple demo of what I mean:
The first script is a piece of PowerShell that executes the build file below via MSBuild. You will need to change the value of the $buildFile
The second script below is an MSBuild proj file. It contains a PropertyGroup that defines the properties of where devenv is, where the SSIS solution file is and where the proj file is. You’ll need to update these to match the locations of the relative objects on your box.
Now, the crucial thing here is that the SSIS project was developed in Visual Studio 2015. However, the version of devenv I’m using is 2017. And so when I execute the PowerShell, it will attempt to upgrade the SSIS project to Visual Studio 2017. Whether it passes or fails this task is irrespective, but at any rate, it does not compile my solution.
So the solution here is to make sure you have the correct version of Visual Studio installed on your build box. What makes this particularly is the false-positive in the build succeeding, despite not actually doing anything!
Epilogue:
Here is an updated version of the MSBuild file that would work in a build: I’ve removed the hardcoding to the files and added the $(SolutionRoot). For more info on this read this still-relevant post.