Background
DynamoText currently targets net45, which has been EOL since 2016. The project uses a Visual Studio 2012 legacy .csproj format with packages.config. This issue tracks a full migration to .NET 8 and SDK-style project format so the package can build against modern Dynamo SDK versions and run on current .NET runtimes.
This issue is assigned to an AI coding agent. Every step below is meant to be executed directly — no design decisions left open.
Files to touch
| File |
Action |
DynamoText.csproj |
Full rewrite to SDK-style |
packages.config |
Delete after migration |
Properties/AssemblyInfo.cs |
Delete after absorbing attributes into .csproj |
All .cs files using FormattedText |
Fix constructor signature if needed |
.github/workflows/build.yml |
Create new file |
Checklist
1. Convert DynamoText.csproj to SDK-style
- Replace the entire file with a
<Project Sdk="Microsoft.NET.Sdk"> SDK-style project.
- Set
<TargetFramework>net8.0-windows</TargetFramework>. The -windows suffix is required — this project uses WPF types (FormattedText, FontFamily, Typeface, GlyphTypeface) that are Windows-only.
- Set
<UseWpf>true</UseWpf> so the SDK includes WPF references automatically. Remove any manual <Reference> entries for PresentationCore, PresentationFramework, and WindowsBase — they are covered by UseWpf.
- Set
<Nullable>enable</Nullable> and <ImplicitUsings>disable</ImplicitUsings>.
- Set
<AssemblyName>, <RootNamespace>, and <Platforms>x64</Platforms> to match current values.
2. Migrate NuGet references from packages.config to PackageReference
- Find the latest versions of
DynamoVisualProgramming.DynamoServices and DynamoVisualProgramming.ZeroTouchLibrary on NuGet that target net8.0 or net8.0-windows. Use those versions.
- Add them as
<PackageReference> items in the new .csproj.
- Delete
packages.config and the packages/ directory if it exists.
3. Absorb Properties/AssemblyInfo.cs into .csproj
- Move
AssemblyTitle, AssemblyDescription, AssemblyCompany, AssemblyProduct, AssemblyCopyright, AssemblyVersion, and AssemblyFileVersion into .csproj metadata elements.
- Delete
Properties/AssemblyInfo.cs. If Properties/ becomes empty, delete the directory too.
4. Fix FormattedText constructor calls
The FormattedText constructor signature changed between .NET Framework and .NET Core/5+. Several overloads now require a numberSubstitution parameter that was absent before.
- Search all
.cs files for new FormattedText( and inspect every call site.
- If any call is missing the
numberSubstitution argument, pass new NumberSubstitution(). Also add pixelsPerDip (use 1.0 if no Visual source is available):
new FormattedText(
textToFormat,
cultureInfo,
flowDirection,
typeface,
emSize,
foreground,
new NumberSubstitution(), // add if missing
1.0 // pixelsPerDip — add if missing
)
- Add any needed
using statements (System.Windows.Media, System.Globalization).
- Do not change logic — only fix constructor call signatures to compile cleanly.
5. Add a GitHub Actions CI workflow
Create .github/workflows/build.yml:
- Trigger on
push and pull_request to main.
- Run on
windows-latest (required for net8.0-windows).
- Steps: checkout →
actions/setup-dotnet@v4 with dotnet-version: '8.0.x' → dotnet restore → dotnet build --no-restore --configuration Release.
6. Verify the build
dotnet build --configuration Release must exit with code 0, zero errors.
- Do not suppress warnings with
#pragma unless there is no cleaner fix.
Definition of done
Notes
- Do not add a test project as part of this PR — tracked separately.
- Keep the public API surface identical. This is a build infrastructure change, not a refactor.
- If the DynamoVisualProgramming packages don't yet publish
net8 TFM targets and only ship net48 or netstandard2.0, use the best available version and document the TFM mismatch as a comment in the .csproj.
Background
DynamoText currently targets
net45, which has been EOL since 2016. The project uses a Visual Studio 2012 legacy.csprojformat withpackages.config. This issue tracks a full migration to .NET 8 and SDK-style project format so the package can build against modern Dynamo SDK versions and run on current .NET runtimes.This issue is assigned to an AI coding agent. Every step below is meant to be executed directly — no design decisions left open.
Files to touch
DynamoText.csprojpackages.configProperties/AssemblyInfo.cs.csproj.csfiles usingFormattedText.github/workflows/build.ymlChecklist
1. Convert
DynamoText.csprojto SDK-style<Project Sdk="Microsoft.NET.Sdk">SDK-style project.<TargetFramework>net8.0-windows</TargetFramework>. The-windowssuffix is required — this project uses WPF types (FormattedText,FontFamily,Typeface,GlyphTypeface) that are Windows-only.<UseWpf>true</UseWpf>so the SDK includes WPF references automatically. Remove any manual<Reference>entries forPresentationCore,PresentationFramework, andWindowsBase— they are covered byUseWpf.<Nullable>enable</Nullable>and<ImplicitUsings>disable</ImplicitUsings>.<AssemblyName>,<RootNamespace>, and<Platforms>x64</Platforms>to match current values.2. Migrate NuGet references from
packages.configtoPackageReferenceDynamoVisualProgramming.DynamoServicesandDynamoVisualProgramming.ZeroTouchLibraryon NuGet that targetnet8.0ornet8.0-windows. Use those versions.<PackageReference>items in the new.csproj.packages.configand thepackages/directory if it exists.3. Absorb
Properties/AssemblyInfo.csinto.csprojAssemblyTitle,AssemblyDescription,AssemblyCompany,AssemblyProduct,AssemblyCopyright,AssemblyVersion, andAssemblyFileVersioninto.csprojmetadata elements.Properties/AssemblyInfo.cs. IfProperties/becomes empty, delete the directory too.4. Fix
FormattedTextconstructor callsThe
FormattedTextconstructor signature changed between .NET Framework and .NET Core/5+. Several overloads now require anumberSubstitutionparameter that was absent before..csfiles fornew FormattedText(and inspect every call site.numberSubstitutionargument, passnew NumberSubstitution(). Also addpixelsPerDip(use1.0if noVisualsource is available):usingstatements (System.Windows.Media,System.Globalization).5. Add a GitHub Actions CI workflow
Create
.github/workflows/build.yml:pushandpull_requesttomain.windows-latest(required fornet8.0-windows).actions/setup-dotnet@v4withdotnet-version: '8.0.x'→dotnet restore→dotnet build --no-restore --configuration Release.6. Verify the build
dotnet build --configuration Releasemust exit with code 0, zero errors.#pragmaunless there is no cleaner fix.Definition of done
DynamoText.csprojis SDK-style, targetsnet8.0-windows, uses<UseWpf>true</UseWpf>packages.configdeletedProperties/AssemblyInfo.csdeleted; metadata lives in.csprojDynamoVisualProgramming.*packages updated to latest net8-compatible versionsFormattedTextconstructor calls compile without error on .NET 8.github/workflows/build.ymlexists and build step passes onwindows-latestdotnet build --configuration Releaseexits with code 0Notes
net8TFM targets and only shipnet48ornetstandard2.0, use the best available version and document the TFM mismatch as a comment in the.csproj.