Closed Dzoay closed 1 year ago
I have the same issue after upgrading to .net 7
More info: Locally I have locally rebuilt the nuget package at an arbitrary version 7.0.2 and a local feed with the following changes as an experiment: I added this to the nuspec:
<file src="$OutDir$\net7.0\**" target="tools/net7.0" />
I updated the FlatSharp.Compiler.targets to include the $(TargetFramework) in the compiler path:
<CompilerPath>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\..\tools\$(TargetFramework)\FlatSharp.Compiler.dll'))</CompilerPath>
This deals with the required
build errors identified above. I am uncertain this is the right fix but wanted to post my findings here.
This looks like a bug. I'm sorry for the miss here. I will take a look this evening. Thanks for pointing this out!
My best guess at the moment is that this is because your build machine does not have .NET 7 installed (as all of the test environments do...). This means that when Flatsharp runs, it sees "non-required" properties. You can mitigate this quickly by installing NET7 on your build machines or local machines.
Fixed in 7.0.1
Just cloned the latest code and rebuilt the samples with these project settings:
Building this generates code as follows that is an error due to the lack of
required
Am I missing some configuration here?
Further investigations: