Skip to content

Commit 0820a2f

Browse files
Pin the language version instead of building on preview (#839)
`preview` tracks whatever the installed SDK considers unreleased, so the semantics of the code compiled here could change between SDK patch releases with no signal in the repository. For a library that ships strong-named binaries that is a dependency on a moving target rather than a feature. C# projects pin to 14.0, which supplies everything preview did that this repository uses, including extension members. F# does not accept a numeric LangVersion of 14.0 -- FSC rejects it with FS0246 -- so the property is now scoped by project extension and the F# wrappers take `latest`, the stable equivalent of what they had. The two analyzer projects still fail to build on Linux for an unrelated reason (NETSDK1060 out of a backslash-separated ProjectReference); that is unchanged by this commit and was verified against master. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 11d8cb6 commit 0820a2f

3 files changed

Lines changed: 11 additions & 4 deletions

File tree

‎Sources/AngouriMath/AngouriMath.csproj‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
<PropertyGroup>
1111
<OutputType>Library</OutputType>
12-
<LangVersion>preview</LangVersion>
12+
<LangVersion>14.0</LangVersion>
1313
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
1414
<PackageTags>$(PackageTags), csharp</PackageTags>
1515
<Description>Enables to work with formulas built in the code or from a string. Computing, derivating, latex rendering, compilation, solving equations and systems of equations analytycally, simplification, and much more. Read more on https://am.angouri.org.</Description>

‎Sources/Directory.Build.props‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project>
33
<PropertyGroup>
4-
<LangVersion>preview</LangVersion>
54
<Nullable>enable</Nullable>
65
</PropertyGroup>
7-
</Project>
6+
7+
<PropertyGroup Condition="'$(MSBuildProjectExtension)' == '.csproj'">
8+
<LangVersion>14.0</LangVersion>
9+
</PropertyGroup>
10+
11+
<PropertyGroup Condition="'$(MSBuildProjectExtension)' == '.fsproj'">
12+
<LangVersion>latest</LangVersion>
13+
</PropertyGroup>
14+
</Project>

‎Sources/Samples/Samples/Playground.csproj‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
55
<TargetFramework>net10.0</TargetFramework>
6-
<LangVersion>preview</LangVersion>
6+
<LangVersion>14.0</LangVersion>
77
<Nullable>enable</Nullable>
88
</PropertyGroup>
99

0 commit comments

Comments
 (0)