Closed shadowbane1000 closed 2 years ago
Thanks for raising this! @yak-shaver, do you mind taking a look at this one? I think the answer is probably to trim any trailing \
characters in the targets file.
Sure, I'll take a look.
This was easy enough to reproduce in the sample project by adding a trailing backslash to the IncludePath
property.
Agree with @jamescourtney that the best solution is to trim the trailing \
prior to calling the command line.
Thanks @yak-shaver for submitting the fix. I've just completed the PR and will publish version 6.2.1 within the next day.
6.2.1 is published!
I have a project that uses this kind of include path:
Sometimes, as a result of this, I get this error:
0>C:\Users\james.colbert.nuget\packages\flatsharp.compiler\6.2.0\build\FlatSharp.Compiler.targets(127,9): Error MSB3073 : The command "dotnet C:\Users\james.colbert.nuget\packages\flatsharp.compiler\6.2.0\tools\net6.0\FlatSharp.Compiler.dll --nullable-warnings true --normalize-field-names false --input "D:\Hexagon.Schema\WebSchemaFB\V1009\SceneGraph\Attributes.fbs" --includes "D:\Hexagon.Schema\WebSchemaFB\V1009\" --output obj\Debug\net6.0\" exited with code -1.
The issue is that the --includes argument is "D:\Hexagon.Schema\WebSchemaFB\V1009\", which ends with a \, which ends up escaping the close quote, which confuses the command line parser.
My temporary workaround is to change the include path to this:
By adding the "." to the end, the path no longer has the trailing backslach so the include path no longer escapes the closing quote and everything works fine.
On some files, with the trailing backslash, the compile does not issue the error, and I do not know why.