Skip to content

Commit

Permalink
[RGen] Make the transformer generator be netstandard2.1 to make edito…
Browse files Browse the repository at this point in the history
…rs happy. (#22039)

In theory we can use net9.0 but some editors need netstandard2.1. We
don't want yet to move Rgen, but we do want to move the transformer one
beause it makes workign with the project easier.
  • Loading branch information
mandel-macaque authored Jan 24, 2025
1 parent b1a1800 commit 8df4754
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/rgen/Microsoft.Macios.Generator/TabbedStringBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ public TabbedStringBuilder AppendLine (ReadOnlySpan<char> span)
return this;
}

#if NET9_0

public TabbedStringBuilder Append (ref DefaultInterpolatedStringHandler handler)
{
WriteTabs ().Append (handler.ToStringAndClear ());
Expand All @@ -133,7 +135,7 @@ public TabbedStringBuilder AppendLine (ref DefaultInterpolatedStringHandler hand
WriteTabs ().Append (handler.ToStringAndClear ()).AppendLine ();
return this;
}


/// <summary>
/// Append a new raw literal by prepending the correct indentation.
Expand All @@ -156,6 +158,8 @@ public TabbedStringBuilder AppendRaw (string rawString)

return this;
}

#endif

/// <summary>
/// Append the generated code attribute to the current string builder. Added for convenience.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net$(BundledNETCoreAppTargetFrameworkVersion)</TargetFramework>
<TargetFramework>netstandard2.1</TargetFramework>
<IsPackable>false</IsPackable>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
Expand Down

0 comments on commit 8df4754

Please sign in to comment.