Building for .Net Framework on a Mac with Paket
I’m lucky enough to have a new shiny Macbook Pro. Now I have VPN access there is a fair bit I can do, in fact all I need is for my Office365 access to be sorted and I will be able to do most things I can do on Windows. This is particularly handy when Windows is wanting to update as mine currently is.
I decided to start doing some proper work on the Mac. First steps were easy, cloning the first repo from Github went as planned. This however is where things started to go wrong. The first issue is that I have a UNC for a package source. This source is what I use for pre-release packages so it’s not a showstopper but I do need a rethink. For now I have simply commented it out but I’m sure there is a better solution.
My TFM’s are generally net standard or dotnet LTS versions, however a few have netfx targets. Unsuprisingly dotnet didn’t like me building these on the Mac. Thankfully Microsoft have come up with a nice solution. If I simply add the reference assemblies — Microsoft.NETFramework.ReferenceAssemblies — from nuget it should all work. That didn’t quite work as hoped however there are a long list of individual assemblies and you can pick out the one(s) that you want from that and all is well. So now I can carry on enjoying my MacBook while my Windows laptop updates.