-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compilation error for null-conditional operator and comparison (value?.Count > 0) #71
Comments
Hi @HardHub - are you running the latest version of h5 (and have the release version of net7.0 sdk installed)? |
I have used SDK provided by VS 17.4.1 (it is latest on the moment)
Log:
Project file: <Project Sdk="h5.Target/0.0.34005">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>7.2</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="h5" Version="0.0.13619" />
<PackageReference Include="h5.core" Version="0.0.13833" />
<PackageReference Include="h5.Newtonsoft.Json" Version="0.0.13835" />
<PackageReference Include="Tesserae" Version="0.0.14660" />
</ItemGroup>
</Project>
Though in general it is not very good idea to switch to .NET 7 so extremely fast. For example JetBrains Rider still does not support .NET 7. So I even cannot test if it supports H5 well. |
Nothing is changed if project file updated to netstandard 2.1 and fresh version of packages: <Project Sdk="h5.Target/0.0.34005">
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<LangVersion>7.2</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="h5" Version="0.0.32875" />
<PackageReference Include="h5.core" Version="0.0.31340" />
<PackageReference Include="h5.Newtonsoft.Json" Version="0.0.23385" />
<PackageReference Include="Tesserae" Version="2022.11.34114" />
</ItemGroup>
</Project> |
That looks correct - I'll need to investigate more here. For net70, it shouldn't be an issue with Rider as this is just the dependency from the compiler process to run, not with H5 projects (which are still restricted to netstandard). |
For example this code will fail on build.
Most likely it is something introduced with .NET 7 or some sort of regression, as I remember it was successfully built via .NET 6 packages.
The text was updated successfully, but these errors were encountered: