Building SSIS .dtproj inside a VSTS Hosted Build Agent - ssis

I'm trying to build a SSIS 2016 project, that's been configured with the Project Deployment model in a VSTS build with the intent to deploy the .ispac file onto a SQL Server VM hosted in Azure.
Using MSBuild to build the project file returns the following error:
The default XML namespace of the project must be the MSBuild XML namespace.
If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the element.
If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format.
I found a blog post here describing the same issue
https://speaksql.wordpress.com/2013/06/07/a-journey-to-db-deployment-automaton-ssis-build-using-msbuild/
However, the solution depends on installed SQL Server Data Tools into a build agent.
Is there a method where I can use a VSTS Hosted agent, and not have to create an on-premises agent with SSDT installed?

Just released new Extension for VSTS/TFS
https://github.com/ToxicGlobe/VSTS-SSIS-Extension
It build Visual Studio project, containing packages and parameters to a project deployment file (.ispac)
https://marketplace.visualstudio.com/items?itemName=TG.VSTS-SSIS

For similar scenario i used devenv.exe
Tool : C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe
Arguments : .\Code\Database\NameOfSolution.sln /build $(BuildConfiguration)
devenv.exe /build does not require ssdt to installed on build agent

Looks like Microsoft is not supporting this just yet based off UserVoice
https://visualstudio.uservoice.com/forums/330519-team-services/suggestions/11543292-install-sql-server-data-tools-ssdt-for-sql-serve
https://visualstudio.uservoice.com/forums/330519-team-services/suggestions/4850300-install-sql-server-data-tools-for-bi-on-the-team-f

Related

How can I push my local website on visual studio code to a webapp I deployed on Azure

I developed a local website on vs code using basic html and CSS. I then deployed an Azure web app. I want to push the local website to the Azure web app
I watched videos on youtube but the sets didn't work. I have tried using Azuredevops as well
Visual Studio Code does not have an integrated build system (Web Publish) like Visual Studio does. But it does have command line task running and Git built in.
Use a task runner to kick off your build/publish from the command palette (ctrl+p). Grunt is available. This requires that you manually script it out, but once that is done, it is easy to kick off the task from that point.
Compatible task runner details: https://code.visualstudio.com/Docs/editor/tasks
Another option is to create a CI/CD pipeline using your source control like Git or Azure Devops to execute your build and release task.
You can use MSBuild task from visual studio code for deploying the website:
msbuild <Project or Solution Path> /p:DeployOnBuild=true /p:PublishProfile=<Publish Profile Name>
You can point to a solution, this will publish ALL the projects that includes a valid Publish Profile
msbuild <FullPath>\MySolution.sln /p:DeployOnBuild=true /p:PublishProfile=Test
Hope it helps.

Azure Devops Build SSIS task

I have created an SSIS package using VS 2017 and added the project to Azure Devops. I am trying to setup a build task in Azure Devops using the SQL Integration Service add in. Everything I am doing is setup on my machine which includes the Agent Pool etc. When trying to setup parameters for the SSIS build the Devenv Version selection only gives me 12 and 14. VS2017 doesn't appear. As a result it appears that when I do a build the incorrect version on devenv is used and the build (even though it doesn't say its failed) fails.
The version the build is using is C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Devenv.com but should be using C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE>Devenv.com
How do I get to DEVENV config parameter to include the Hosted VS2017 version?
The following web page gives an idea of what I am trying to achieve: -
http://chamindac.blogspot.com/2018/09/build-and-deploy-ssis-with-azure-devops.html
I ended up using a powershell script instead.
The script has one line to run the build.
&"${env:ProgramFiles(x86)}\Microsoft Visual Studio\2017\Professional\Common7\IDE\devenv.com" "C:\Users\me\Downloads\vsts-agent-win-x64-2.140.0_work\2\s\POC_SSIS.sln" /rebuild
I place the code in a .ps1 file and put it into the root of my repo. I then used the Powershell config to reference the file and it worked.
I did a similar thing for the deployment where I used : -
ISDeploymentWizard /S /SP:C:\Users\me\Downloads\vsts-agent-win-x64-2.140.0_work\2\s\POC_SSIS\bin\Development\POC_SSIS.ispac /DS:serverName /DP:/SSISDB/POC_SSIS/POC_SSIS

Sideloaded app requires package Microsoft.VCLibs.120.00 on my build server

In trying to run integration tests on my windows store app but the sideloading of my test appx file fails with error (0x80073CF3):
Windows cannot install package (my package GUID) because this package depends on another package that could not be found. This package requir
es minimum version 12.0.21005.1 of framework Microsoft.VCLibs.120.00 published by any publisher to install. Provide the framework along with this package..
The same procedure works fine on my dev machine (from powershell).
A Microsoft blog post states:
...In order to facilitate this scenario for sideloaded apps, we have made
the framework packages available here.
After downloading, and extracting the relevant architecture appx file, I installed it via powershell:
Add-AppxPackage "C:\temp\Microsoft.VCLibs.120.00_12.0.21005.1_x86__8wekyb3d8bbwe.appx"

Using Visual Studio Online to build Windows Store Apps?

I have a Windows Store Application (Windows 8.1), hosted on a GIT repo on Visual Studio Online.
I created a build definition, left all the default values as they were, ran the build and downloaded the artifacts.
I didn't find the Powershell script used to side load (install) the application, instead I found an .exe file.
What can be missing to generate the Powershell script needed to install the app?
The default build configuration is copying the files in "bin" folder to artifacts, that's why you see exe file.
To copy the package files to artifacts, please configure your build definition as following:
In "Visual Studio Build" step, add following argument in "MSBuild Arguments":
/p:AppxPackageDir="$(Build.BinariesDirectory)\AppxPackages\\"
And in "Publish Build Artifacts" steps, set "Path to Publish" as following:
$(Build.BinariesDirectory)\AppxPackages
To package Windows Store App during the TFS build process, you can (assume you're using XAML build):
1). Set MSBuild Arguments to be: /p:DeployOnBuild=true;DeployMethod=Package /p:DefaultPackageOutputDir="$(TF_BUILD_BINARIESDIRECTORY)"\StoreAppPackage
2). Set Output location to be 'SingleFolder' or 'PerProject'.
Then, after you queue one build, you will find one folder called StoreAppPackage in the TFS Build Drop folder. You can then find the Add-AppDevPackage.ps1 file.

How to resolve Microsoft SQL geography type dependency on AppHarbor

I am trying to deploy my web service on AppHarbor through GitHub. My web service is using NHibernate.Spatial, which has Microsoft.SQLServer.Types version 10.0.0.0 as a dependency. This assembly is, if I understand correctly, installed along with SQL Server 2008. When I run my web service on my development computer, on which I have SQL Server 2008 installed, the service runs without trouble, but when I deploy to AppHarbor I get the following exception:
"Could not load file or assembly 'Microsoft.SqlServer.Types,
Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or
one of its dependencies. The system cannot find the file specified."
As I already build my own version of NHibernate.Spatial.MsSql2008, the assembly from which the dependency derives, I have simply tried copying the required dll into the bin folder when building this project, by setting the reference property Copy Local to true. This is also reflected in the web service bin folder which is pulled by AppHarbor through Git. This didn't help though and my guess is that my web service is looking for the dependency in a different folder than bin.
How do I make the Microsoft.SqlServer.Types assembly available on AppHarbor? As the exception states, this might also be caused by possible missing dependencies of Microsoft.SqlServer.Types, but how do I find if this is the case, and again, how do I make the dependencies of Microsoft.SqlServer.Types available on AppHarbor?
Here's a NuGet package with the Microsoft.SqlServer.Types assembly. You can use this in combination with NuGet package restore on AppHarbor.