Skip to content
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

Pipeline-Build-Error at executing the flatsharp compiler #371

Closed
Spoomer opened this issue Mar 11, 2023 · 3 comments
Closed

Pipeline-Build-Error at executing the flatsharp compiler #371

Spoomer opened this issue Mar 11, 2023 · 3 comments

Comments

@Spoomer
Copy link

Spoomer commented Mar 11, 2023

Hey James,
thanks for your great work.
I got in my azure pipeline an error executing the flatsharp compiler. I think it is because of the pipeline is running with net 7.0 and in FlatSharp.Compiler/FlatSharp.Compiler.targets line 108 is the compiler path set to the net 6.0 dll.
<CompilerPath>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\..\tools\net6.0\FlatSharp.Compiler.dll'))

Maybe the following would do the trick:
<CompilerPath>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\..\tools\$(TargetFramework)\FlatSharp.Compiler.dll'))</CompilerPath>

@jamescourtney
Copy link
Owner

jamescourtney commented Mar 14, 2023

thanks for your great work.

Happy to help :)

Your error is interesting. My understanding is that the net7.0 runtime is backwards-compatible with net6.0, so you should be able to run net6.0 if you have any runtime at or above that installed.

I'll need to do a bit of research on this. In the meantime, you should be able to also install .NET 6 to unblock yourself.

@jamescourtney
Copy link
Owner

I've validated that this behavior does indeed occur. In the past, I've tried all sorts of fancy runtime detection in my targets file, and it really only got me into trouble because there were some compatibility issues in certain pipelines. My solution was just to dumb it down and require .NET 6 (a LTS version) in the build pipeline.

Is this an absolute dealbreaker? The code emitted by FlatSharp will happily compile with .NET 7.

@Spoomer
Copy link
Author

Spoomer commented Apr 12, 2023

Hey James, thanks for your investigating! No that's not an absolute dealbreaker. I tried your recommendation and added net 6.0 to the pipeline and it works. Thanks again.

@Spoomer Spoomer closed this as completed Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants