Posts

Asp.net core sites on an IIS

Image
This video will show you how to get asp.net core apps running on IIS. The main thing is that you need to know is that it requires that you install .NET Core Runtime & Hosting Bundle for Windows.

dotnet migration from command line

Image
dotnet from command line can do more than just create projects and add packages. It can be used to work with ef core migrations. Lets start by creating a new console app. Run this command:  dotnet new console . Add these three packages: dotnet add package Microsoft.EntityFrameworkCore dotnet add package Microsoft.EntityFrameworkCore.Design dotnet add package Microsoft.EntityFrameworkCore.SqlServer Your csproj should now look like this: <Project Sdk= "Microsoft.NET.Sdk" > <PropertyGroup> <OutputType> Exe </OutputType> <TargetFramework> netcoreapp2.2 </TargetFramework> </PropertyGroup> <ItemGroup> <PackageReference Include= "Microsoft.EntityFrameworkCore" Version= "2.2.6" /> <PackageReference Include= "Microsoft.EntityFrameworkCore.Design" Version= "2.2.6" /> <PackageReference Include= "Microsoft.EntityFrameworkCore.S...

Using @CurrentIteration with TFS API

Image
@CurrentIteration is neat macro I use when I created saved queries in TFS. For example, I recently needed to write a query that fetched all current bugs in the sprint: This works great in the TFS web interface. The main reason for me to create this saved query was however was to be able to access it via the TFS API. So I started like this: using ( var workItemTrackingHttpClient = new WorkItemTrackingHttpClient ( new Uri ( " http://mytfs/tfs/Plato " ) , new VssCredentials ( ) ) ) { try { var items = workItemTrackingHttpClient . QueryByIdAsync ( new Guid ( " 25c6e737-d0ce-416f-9f7a-3cb78959334d " ) ) . Result . WorkItems ; } catch ( Exception ex ) { } } This returned the following error: System.AggregateException: One or more errors occurred. ---> Microsoft.VisualStudio.Services.Common.VssServiceException: VS402612: The macro '@CurrentIteration...