Posts

Showing posts with the label nuget

DotEnv for .NET: The Configuration Superpower You Didn’t Know You Needed!

Image
  Why DotEnv is PERFECT for both regular apps and the new .NET 10 file-based apps If you're building modern .NET applications—especially those new single-file .NET 10 apps —you need a configuration approach that’s simple, portable, secure-ish, and doesn’t require a full appsettings.json pipeline just to load two key-value pairs. Guess what? The DotEnv NuGet package is the hero we've been waiting for . 🎉 DotEnv brings the simplicity of JavaScript, Python, and Linux environments straight into .NET—no ceremony, no boilerplate, just clean environment variables in a .env file that you load with one line of code. Today, I'm going to show you why DotEnv is a game changer and why it's one of the BEST configuration choices for both full .NET applications and the new file-based apps introduced in .NET 10. 🚀 Why DotEnv? Because configuration shouldn’t hurt your brain. ✔ Perfect for simple apps Your console app doesn't need a full JSON hierarchy the size of a Tolkein nov...

Brand New Default Blazor Templates

Image
 I have made the decision to switch to using TailwindCss for all my new projects because I really like  TailwindCss . It became a pain to have to clean out the Bootstrap and add the styling for the default pages each time I started a new project. My solution, create a new default Blazor default template that uses TailwindCss. Ways to create templates After some investigation, I discovered there are now two ways to create project templates for .Net. The original one where you use Visual Studio to token your project and then export it out. The second method is to use the template engine. Using Visual Studio is error-prone. Once you tokenize your project, it will not build anymore. You will have to keep two versions of the project and update each one moving forward. It does generate a zip file which makes it easier to share the new template. The new and better way, in my opinion, is to use the new template engine. Channel 9 has a good video series  on how it works. You use t...