X

ASP.NET

Conditionally include partial view in ASP.NET Core

I have ASP.NET Core web application where I need to include partial view only if it exists. The application uses areas and some areas may have their specific side menu. This blog post shows two ways how to conditionally include partial view to ASP.NET Core layout page.

.NET Core 3.0 Preview 3 now available!

.NET Core 3.0 Preview 3 is out and there are many interesting updates to framework and to ASP.NET Core. Here’s the short list of what’s new.

Pre-compressed static files with ASP.NET Core

Optimizing web applications is important because more economic web applications consume less CPU cycles and need less bandwidth – resources we have to pay for. It’s easy to turn on response compression on ASP.NET Core, but serving pre-compressed files needs more work. This blog post shows how to do it.

Fail build on Azure DevOps for low code coverage

As my ASP.NET Core code coverage reports work nice in Azure DevOps build pipeline I took step forward and made builds fail on Azure DevOps if percent of lines covered is below 60. This blog post shows how to do it using ReportGenerator and Build Quality Checks build tasks.

Running .NET Core apps on Windows Sandbox

After my first introduction to Windows Sandbox I took one of my ASP.NET Core applications and tried to find a way how to get it quickly to Windows Sandbox and open in browser. This scenario is already possible and it wasn’t hard all to make things work. This blog post shows how to do it.

ASP.NET Core code coverage reports on Azure DevOps

After making ASP.NET Core code coverage reports work on local box I made step further and made code coverage reports available also on Azure DevOps. This blog post shows how to generate code coverage reports for .NET and ASP.NET Core applications on Azure DevOps.

How to exclude code from code coverage

Recently I blogged about how to generate nice code coverage reports for ASP.NET Core and .NET Core applications. This blog post focuses on how to leave out from code coverage all code that will not be covered with unit tests and get numbers shown on code coverage reports correct.

ASP.NET Core response compression and content encoding

ASP.NET Core supports response compression. From popular algorithms gzip and Brotli are supported. Those who like can also implement their own response compression providers. This blog post shows how to response compression works in ASP.NET Core.

Code coverage reports for ASP.NET Core

Code coverage reports for ASP.NET Core projects are not provided out-of-box but using right tools we can build decent code coverage reports. I needed code coverage reports in some of my projects and here is how I made things work using different free libraries and packages.

Automated date based versioning for ASP.NET Core assemblies using Azure DevOps

I needed automatic version numbering based on current date when web application is built. It was wish by some customers and in their projects it’s okay with it. As their code is covered with automated tests and other diagnostics I’m using Azure DevOps as build server and this is where I made automated date based versioning work.