Week 6 of my series, sharing things I’ve learnt, read, watched and listened to, in the pursuit of expanding my knowledge about software development.
Things I’ve Blogged
Customising ASP.NET MVC Core Behaviour with an IApplicationModelConvention – In this post I cover details and demo the basics of creating custom conventions for ASP.NET MVC Core.
Things I’ve Learnt
UserSecrets API Changes
One of the changes coming due to the project.json to csproj move is a slight change needed on the UserSecrets API. In current project.json applications we can use the AddUserSecrets() extension method. This picks up the UserSecretsId from the project.json file and sets up the UserSecrets config using it. With the move to csproj this method’s implementation might pick up the wrong assembly and therefore not find the newly located UserSecretsId. To resolve this, the method now needs the assembly to be passed to into it.
There is a new generic call we can make we can use with looks like .AddUserSecrets<Startup>() – This takes a class and will use the assembly where that class is located when calling the AddUserSecrets(assemblyname) method.
When ASP.NET Core 2.0 lands, the old API for AddUserSecrets() will be removed. Making it clear that ASP.NET Core 2.0 will require VS 2017 and support csproj only.
You can read more about these changes on Github here, here and here.
Things I’ve Read
- How terrible code gets written by perfectly sane people by Christian M. Mackeprang
- Profiling a .NET Core Application on Linux by Sasha Goldshtein
- The Promise of Windows Containers by Naeem Sarfraz
- Configuration management from Git to Consul by Ryan Breen
- Configuring .NET Core Applications using Consul by Matthew Thornton
- .NET Framework – Immutable Collections By Hadi Brais
- Sensitive Configuration Data in ASP.NET Core by Derek Comartin – A good recap on UserSecrets which are a very useful way to manage private secrets when working on OpenSource projects for example.
Things I’ve Listened To
- .NET Rocks – Container Strategies with Michele Bustamante
- .NET Rocks – Refactoring Code and Team with Ryan Stelly
Things I’ve Watched
Have you enjoyed this post and found it useful? If so, please consider supporting me:
One thought to “Things I’ve Learnt This Week (5th March)”