Open cpyfferoen opened 4 years ago
Update - perhaps it has something to do with a fragments file -
I do have an import MagicFragments;
line in two Lexers, but I did not have a dotnet build
or dotnet msbuild
working w/ an import MagicFragments
in it. It magically works as soon as I open VisualStudio, it creates the *.tokens
files.. but seems like black magic since it doesn't work outside of VisualStudio
No combination of <Abstract/>
<Antlr4AbstractGrammar/>
or a host of other settings will produce, using the dotnet CLI (dotnet build
or dotnet msbuild
), tokens for any grammar that has an Imports in it. Possibly this is related to #111 - but as soon as I start visual studio (don't even build or click any buttons) bamm! It generates the *.tokens file for my partials, and everything works there after..
Workaround (aka cheating):
- task: DotNetCoreCLI@2
displayName: 'dotnet msbuild $(project)'
continueOnError: true
inputs:
command: 'custom'
projects: '$(project)'
custom: 'msbuild'
arguments: '/p:DesignTimeBuild=true /p:Configuration=$(buildConfiguration)'
# yes, the above task fails.. so build again!!!
- task: DotNetCoreCLI@2
inputs:
command: 'build'
projects: '$(project)'
arguments: '-c $(buildConfiguration)'
and the powershell to achieve same result
dotnet restore
dotnet msbuild /p:DesignTimeBuild=true
dotnet build
Can you create a minimal project to reproduce this, and submit it as a pull request to https://github.com/tunnelvisionlabs/antlr-integration-tests-csharp? I expect the pull request to initially fail, at which point I can work to find a solution to it.
There are a host of issues logged that discuss dotnet core etc. specifically #208 but...
Please help guide me? csproj
azure yaml