-
Force ‘dotnet publish’ to publish dependencies using PublishWithAspNetCoreTargetManifest
I ran into a problem today doing an automated build for a ASP.NET Core 2 project and then trying to deploy the output. From the command line, I ran “dotnet publish -o c:\temp\presidents” to build and publish the code for my ASP.NET Core web application. Then I went to the directory that I just published…
-
Manually Install & Manage Extensions on TFS
It’s easy to install 3rd party extensions (read: new awesome features & utilities) on to your Team Foundation Server (TFS) directly from https://marketplace.visualstudio.com. But with everything in the technology world, sometimes things go a little wonky and you need to skip the easy stuff and do things manually. TL;DR: Open a browser. Go here. http://{server-name}:8080/tfs/_gallery/manage…
-
Update: TFS2018 Install Guide v1.1
I just pushed an update to my Team Foundation Server 2018 (TFS2018) install guide. This update has a couple of new guides in it related to configuring build servers. Here’s the current list of chapters (chapters in italics are new): Install Windows Server 2016 Install SQL Server 2017 for TFS2018 Install Team Foundation Server 2018…
-
Howto: Install TFS2018 / VSTS Build Agent on Windows Server Core
Here’s a guide to walk you through the process of creating a build server on Windows Server Core. If you’re not already familiar with Windows Server Core, here’s a quick overview. Think of it as Windows Server 2016 with all the extra, unnecessary stuff pulled out. This means that it uses a lot less disk…
-
How to download a file on Windows Core
Windows Core is great. Smaller disk footprint. Less memory usage. Boots up super-fast. But with these benefits comes some caveats — for example, no web browser. So then when you need to download a file or download an installer, how do you do it? The answer is…POWERSHELL TO THE RESCUE!!! Here’s a PowerShell script to download…
-
Deploy to Azure from TFS using an Azure Resource Manager Service Endpoint
[TL;DR — You need an Azure Resource Manager Service Endpoint and some values from Azure. There’s a link to a PowerShell script at the bottom of this post that’ll help. You’ll probably still need to read this blog post though. Sorry. I know. Reading is hard.] Deploying from Visual Studio Team Services (VSTS) to Azure…
-
How to fix “msdeploy.exe failed with return code: 2148734720”
I’m trying to deploy to an Azure AppService using an on-premise build/release agent and Team Foundation Server 2018. This usually isn’t a problem but this time was difficult. Part of the problem is that I’m trying to run a TFS Release from an agent that’s installed on Windows Server Core Build 1709. When I ran…
-
TFS Build Agent Fails to Configure & Run with TFS2018 Self-Signed SSL Certificate
A last week I wrote about fixing some problems between Git and Team Foundation Server 2018 when TFS is configured to use a self-signed SSL certificate for HTTPS. Well, after I got that part working, I found a new problem while trying to configure a TFS build agent that would talk to my self-signed SSL…
-
EF Core & ASP.NET Core: Read Connections Strings & Config Values from Environment Variables
If you’ve gone digging around in EF Core and ASP.NET Core, you’ve probably seen ConfigurationBuilder code that looks like this: var builder = new ConfigurationBuilder() .SetBasePath(basePath) .AddJsonFile(“appsettings.json”) .AddJsonFile($”appsettings.{environmentName}.json”, true) .AddEnvironmentVariables(); var config = builder.Build(); var connstr = config.GetConnectionString(“default”); When you see generated code like this a couple zillion times, it’s easy to kind of forget to ask yourself what it means. It works fine so nevermind…
-
EF Core 2.0 Migrations without Hard-Coded Connection Strings
Earlier this year, I blogged about how to do EF Core migrations without hard-coding your connection string. The short answer was to use IDbContextFactory. Well, that was Entity Framework Core 1.0 and now we’re on Entity Framework Core 2.0 and that IDbContextFactory interface went away. So how to do you do EF Core 2.0 migrations…