The official release for .NET 7.0 is in November 2022, though there have been a number of preview versions this year. In order to upgrade services to this, it might be necessary to update Visual Studio and MSBuild first.
Target Framework To upgrade, set the target framework as follows:
<TargetFramework>net7.0</TargetFramework> And maybe do the following update all package references to 7.0.0 for Microsoft.AspNetCore and Microsoft.Extensions.
Other target frameworks include:
net7.0 net7.
I think I’ve found the ideal theme for my Hugo site. Mainroad is relatively simple in design, the layout is roughly what I was looking for, and it’s easier to customise. It still has tags and categories features that are essential for a site hosting technical documentation. I spent around six hours learning how the template works, re-arranging the content and tweaking the CSS to make it as clean as my MkDocs site.
Netlify CMS and Continuous Deployment for Hugo Having experimented with this, I think Netlify’s idea of tacking a CMS onto a static site generator is tailored for situations where multiple developers, through Continuous Deployment, are providing a corporate site for which the content is being edited by non-technical users. At least it appears that way, because it takes a lot of work to develop the site and configure the CMS for anything more generic than the template provided, and an individual developer working on this as a personal project would most likely dispense with the CMS entirely and modify the files in the /content directory themselves (I’ll explain why).
Can a static site generator (SSG) be more accessible than a content management system (CMS) to someone without Web development experience? And should we use an SSG instead of setting up something like WordPress?
For those who don’t know, a static site generator is essentially a program that compiles a directory of text/Markdown files into a Web site that can be hosted on any Web server. Its core function is to convert Markdown to HTML.
Migrations Using Visual Studio SQL Server Database Project Setting Up the Migration Project Add a new project to the Visual Studio solution. This project will initially be empty, without assembly references or scaffold files - it appears everything is native to Visual Studio. To this we need to add the connection to the database the schema is to be imported from. There will be a menu option for ‘Import’ -> ‘Database’.
A Docker container runs as a sandboxed process on a local system or a server, and consists of at least one image. An image is built from the source code of an application or service, and can be distributed, through a repository, to provide others the means of testing an existing software product with minimal setup.
Containers and images can be managed through the Docker Dashboard application. As such, a Docker container will require its own configurations and script that enable it to run as intended.
The purpose of generating Entity Framework migrations is to apply database schema changes consistently across Staging, UAT and Production environments.
The proposed method would involve developers generating migration a migration script whenever changes are made to the Entity Framework model in their projects. The DevOps team would apply that migration script to update the Azure environments. The services and applications being developed themselves should not have permissions to modify the environment.
The following is another commonly-posted question in Stack Overflow, which I’ve been looking at while debugging the same problem:
System.InvalidOperationException: Unable to configure HTTPS endpoint. No server certificate was specified, and the default developer certificate could not be found or is out of date. The most obvious cause would be Kestrel trying to use invalid or expired HTTPS certificates. However, looking more closely, my error message was preceded by:
[...]
[15:25:25 FTL] Unable to start Kestrel.
If upgrading an existing application, the following are required from NuGet:
Microsoft.Identity.Web Microsoft.Identity.Web.UI Generating the Project The project in this repository was generated from the ASP.NET Core Web App template. When generating the project, select ‘Microsoft identity platform’ as the Authentication type in the Additional Information section. HTTPS and Docker were also enabled for this project.
After installing dotnet msidentity tool, Visual Studio will display the Service Dependencies and Service References.
After some hours of frustration and asking myself whether I should have used Unit of Work in the first place (there are already layers of abstraction in the standard .NET Core template project) I managed to get a functioning xUnit test method that mocks the repositories, populates them with data and verifies the model returned by a controller method.
Setting Up a Unit Test Project Add a xUnit project to the solution, then add an assembly reference in that to the project being tested.