TGIMBA .NET Core Upgrade – Part 8 – Continuous Integration / Continuous Deployment – Part 2 – Building On Visual Studio Team Services

NOTICE: The TGIMBA git hub repository has been corrupted and I had to start over.  The link to the repository is here -> Git  Code Commit

Welcome back! Today, I am going to take the steps (as many as I can) and move then to a cloud provider.

I thought about using Amazon’s code pipeline. If you remember, I did one for the .NET 4.6.x The Globe In My Bucket Application(TGIMBA) release. The details on that are here:

However, Amazon did not have an out of the box .NET 4.6.x container. I could have certainly built one (I plan to for the .NET Core version…eventually), but I didn’t want to deviate from exploring what the code pipeline could do. Given that and how I felt like I kinda had to hack it together (i.e. build locally, check in the code AND runtime files and let code pipeline take it from there), I did not like the idea of using Amazon again. Based on this experience, this approach really make the code pipeline a glorified copy call. The goal of any Continuous Integration/Continuous Deployment (CI/CD) pipeline is to take the raw source files, build them, run any automated tests (a required step in my opinion) and then deploy the result to test/production/etc.

This realization and the results from my last blog post (i.e. local .bat build file) lead me to the conclusion that .NET builds are still best done in a Microsoft Environment. So, I chose Visual Studio Team Services (VSTS). To dig in, I found reference #1 invaluable.

My journey started with logging back into I have had a live account for a number of years. My personal pre-github code is all hosted here. Whatever complaints I may have about Microsoft, their developer tools are not one of them. VSTS has always worked for me 🙂

So, my steps were:

  • I logged in


  • Created new Team Project – Click ‘New Team Project’


  • Created new Team Project – Fill in and click ‘Create’


  • Create Build – Click ‘Setup Build’ under external repository


  • Create Build – Select ‘External Git’, put in your github website w/credentials (separate popup) and click ‘Continue’


  • Pick Template – I was not completely sure here, so I picked the .NET Core one.


  • Click build solution


  • Click ‘Queue’


  • Click ‘Queue’ again


  • Click on queued build link to watch result


Some of the errors I encountered with their fixes:

  • Error 1
  • Error 2
    • Compile issue – My Credentials file does not exist on github (on purpose)
    • Fix – add my database connection string as an environment variable (Reference #3)
  • Error 3
    • No test assemblies found matching the pattern: **\release\*test*.dll,!**\obj\**.
    • Fix – change pattern
      • Old value – **\$(BuildConfiguration)\*test*.dll!**\obj\**
      • New value – **\$(BuildConfiguration)\netcoreapp2.0\Test*.dll!**\obj\**

After getting the .NET Core tests to run, I got stuck.


The tests ran and passed, but the build threw an error stating there was something not correct with my TestsDAL.dll file. Specifically, the output from the build run is:

Starting test execution, please wait…
Error == > System.IO.FileNotFoundException: …
Passed LoginDemoUserTest
Passed RunApiIntegrationTest
Error == > System.IO.FileNotFoundException: …
Passed TestLoggerMsg
Error == > System.IO.FileNotFoundException: …
Passed TestHomeControllerIndex
Passed TestWelcomeControllerIndex
Passed RunBucketListDataV1Tests
Passed RunBucketListDataV1Tests
Passed RunMemberShipDataTests
Error == > System.IO.FileNotFoundException: …

Total tests: Unknown. Passed: 11. Failed: 0. Skipped: 0.

System.IO.FileNotFoundException: Unable to find tests for D:\a\1\s\API\bin\Release\netcoreapp2.0\TestsDAL.dll. Make sure test project has a nuget reference of package “Microsoft.NET.Test.Sdk” and framework version settings are appropriate. Rerun with /diag option to diagnose further.
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Hosting.DotnetTestHostManager.GetTestHostProcessStartInfo(IEnumerable`1 sources, IDictionary`2 environmentVariables, TestRunnerConnectionInfo connectionInfo)
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.SetupChannel(IEnumerable`1 sources)

So, I will wrap up this blog post and plan on tackling this one in my test post.

Stay Tuned!



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s