Update Meadow Apps from .NET Framework to .NET Standard

If you’re running beta 5.1 we released just now, after completing a full stack update from Meadow.OS to the VS Extension, you’ll also need to update your Meadow Application projects. In this post I’m going to show you how to do that.

In beta 5.0, when creating a Meadow Application, when opening the csproj file we’d see something like this:

<Project Sdk="Meadow.Sdk/1.1.0">
  <PropertyGroup>
    <TargetFramework>net472</TargetFramework>
    <OutputType>Exe</OutputType>
    <AssemblyName>App</AssemblyName>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Meadow.Foundation" Version="0.*" />
  </ItemGroup>
</Project>

<Project Sdk="Meadow.Sdk/1.1.0">
  <PropertyGroup>
    <TargetFramework>net472</TargetFramework>
    <OutputType>Exe</OutputType>
    <AssemblyName>App</AssemblyName>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Meadow.Foundation" Version="0.*" />
  </ItemGroup>
</Project>



net472
Exe
App




Delete everything inside the <PropertyGroup> tags, and replace them with the following tags,

<TargetFramework>netstandard2.1</TargetFramework>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<OutputType>Exe</OutputType>
<AssemblyName>App</AssemblyName>

In this example, our blinky project should look like this:

<Project Sdk="Meadow.Sdk/1.1.0">
  <PropertyGroup>    
    <TargetFramework>netstandard2.1</TargetFramework>
    <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
    <OutputType>Exe</OutputType>
    <AssemblyName>App</AssemblyName>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Meadow.Foundation" Version="0.*" />
    <PackageReference Include="Meadow.F7" Version="0.*" />
  </ItemGroup>
</Project>

In the case of your existing projects, you might added more Meadow.Foundation NuGet packages like TftSpi displays, IO expanders like the x75595, etc. Make sure you update them to the latest version, which are converted to work in .NET Standard 2.1

If you encounter any issues, feel free to reach out on the #Support channel in our public Slack, or file a GitHub issue, and we’ll answer any inquiries updating your Meadow apps.

Until next time,
Jorge