Below you will find pages that utilize the taxonomy term “.NET”
March 10, 2022
C# 11 and .NET 7 - early look at new features
.NET 7 is coming soon alongside C# 11. It’s possible to take a look at some of the new features now, including the bang bang (!!) operator and List patterns, which I think are really cool.
Here is a video on the topic:
February 18, 2021
Adding Razor cshtml view runtime re-compilation to a ASP.NET Core 5.0 app after creating it
I recently came across an interesting issue where after starting a new ASP.NET Core 5.0 .NET 5 project using the “ASP.NET Core Web App (Model-View-Controller)” template did not include the ability to update .cshtml Razor files without recompiling and restarting the whole app. There is a checkbox to “Enable Razor Runtime Compilation” during project setup but it’s easy to miss and tricky to add afterwards if you don’t know what you are looking for.
February 7, 2021
Handling and intercepting Back button Navigation in Xamarin Forms Shell
I’ve recently ended up needing to ask if the user really wants to navigate away from a page in my Xamarin app, Net Writer. Essentially whilst a post is being edited I don’t want the user to accidentally lose their progress, necessitating the need to inject a “Are you sure?” or “Confirm exit” prompt when the user presses either the Android hardware or OS level back button or the back button on the navigation bar provided by the Xamarin Forms Shell.
July 2, 2020
Using Google APIs and Auth in Xamarin Forms
I’m working on porting Net Writer from UWP to Android using Xamarin Forms. The Google authentication is a little bit tricky as it is constantly changing. Working off this amazing blog post by Timothé Larivière got me 90% of the way there but there are some updates to the process in 2020.
Pre-requisites to register an app with Google At this point in time you’ll need to do the following before you can register a Public app:
June 25, 2020
UWP and Xamarin Forms - How to display your app's version number
Assume we want to automatically show the version number of your app in your UI, for example, the settings page or elsewhere. Your version number will normally be updated by your CI/CD system (updating Package.appxmanifest for UWP and AndroidManifest.xml for an Android Xamarin app).
Create a property to bind to ViewModels and how they bind to your UI are out of scope for this post (as you’ll have already got this far).
June 11, 2020
Adding an Admin Panel to a .NET Core web app with CoreAdmin
I’ve published version 1.0.0 of a new open source package and a corresponding nuget package – CoreAdmin.CoreAdmin adds a nice set of CRUD screens to your .NET Core web app in one line of code!
Adding CoreAdmin to your app Given a typical Startup.cs file, you will have a ConfigureServices method. You need to add the line services.AddCoreAdmin() somewhere near the bottom (at least after you register your Entity Framework DbContexts).
May 27, 2019
Missing StoreKey PFX certificates when building a Visual Studio 2019 UWP project
I came across an interesting issue updating my UWP app to Visual Studio 2019 and a new Azure DevOps pipeline. “Associate with Store” no longer adds password-less PFX files named *TemporaryKey.pfx and *StoreKey.pfx to your project to sign your store submissions – instead in VS2019 it now adds the certificates to your local user store only.
Which means when it comes to build, you get errors like
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\VisualStudio\v15.
February 9, 2015
Why use a Macbook Pro as a Windows .NET Software Developer (Updated)
Update December 2016: Apple has released a new version of the MacBook Pro featuring the new Touch Bar feature. I do not recommend buying this model.
Worse battery life Worse keyboard Touch Bar feature is pretty useless for Bootcamp or virtualization – you will miss the usual function keys USB-C only. Expect to spend 100s on adapters. The original Bootcamp drivers actually physically blew the speakers when running Windows Luckily Apple still sell the 2015 model without Touch Bar.
October 28, 2012
Why I won’t be returning my Microsoft Surface RT
I’ve picked up a Microsoft Surface RT from the “temporary” New York Times Square Microsoft Store. While the purchasing experience was a bit of a mess (untrained sales staff – I ended up having to type my own details into their POS terminal as I’m not quite sure the guy knew how to type), I managed to make off with a properly boxed (I skipped getting the staff to unbox it and walk me through the “Out of Box Experience”) 32GB Surface, Type Cover and VGA adapter.
April 24, 2011
Fun with jQuery flot charting
I’ve got the Microsoft Money style cashflow chart going with the flot library and some massaging of ASP.NET MVC 3 to output JSON.
The chart correctly predicts future cashflow based on your set bills and future transactions. Next up is multiple accounts and currencies at once.
April 22, 2011
Working on an online MS Money replacement
I am finally fed up of having to install Microsoft Money and set up syncing of the data file, so I’ve decided to try and build a web based version. Mint.com does not support non-US markets and apparently does not even support adding your own transactions that have not been downloaded from a bank. “Private Money” is the codename and it looks a bit like this at the moment:
The stack:
April 19, 2011
Thoughts on ASP.NET MVC3 Update and Entity Framework 4.1
Microsoft have now released an update to ASP.NET MVC3 imaginatively called “ASP.NET MVC3 Update”. This update upgrades NuGet, bundles Entity Framework 4.1 with all new templates, adds HTML5 template support and splits the jQuery libraries off into NuGet packages so they can be upgraded individually.
The bundling with new MVC projects is a sign that Microsoft has selected Entity Framework as the “chosen” ORM layer from now on. Linq2SQL is not flexible enough when dealing with pre-existing database schemas and third party solutions such NHibernate are difficult to get pointy-haired boss approval.
December 16, 2010
Windows .NET Development on Mac OSX
I use Windows at work so for some variety I have moved to a Mac at home. The 2010 Mac Mini is a decent little machine with the RAM upgraded to 4GB.
For Windows development you need Visual Studio, which means running Windows on your Mac. Bootcamp is one way of doing this, but then you lose all the benefits of OSX as your host OS. The secret is of course Parallels Desktop which allows you to run Windows virtualized on your Mac.
November 27, 2010
That upgraded WPF 4.0 Text rendering again
Just to hammer the point home about how important it is to upgrade to .NET 4.0 if you are using WPF, here are some comparison screenshots of the text rendering in WPF 3.5 and 4.0:
Pay attention to the difference between the text rendering on lines 2 and 3.
Line 2 shows the new Display formatting mode available in WPF 4.0. This renders the text the same way as the rest of Windows – the shape of the font is distorted so that lines fall on pixel boundaries.
October 31, 2010
Evernote has no patience, drops WPF over fixed issues
Much noise has been made about Evernote’s new Windows client. For version 4, they dropped WPF/.NET and released a C++ native application.
They were pretty damning with their reasoning:
Evernote 4 is a major departure from Evernote 3.5 in every way. While 3.5 added tons of great new features, there were some problems we simply couldn’t fix: the blurry fonts, slow startup times, large memory footprint, and poor support for certain graphics cards were all issues that the technology behind 3.