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

cross platform build #65

Merged
merged 31 commits into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
d3fb2b7
ensuring tests use crlf line endings
dzsquared Jan 5, 2024
2c7de27
re-fixing line endings
dzsquared Jan 5, 2024
3700597
clearly don't know what I'm doing
dzsquared Jan 5, 2024
05b7136
localizing gitattributes to test
dzsquared Jan 5, 2024
3a7206f
reverting lineending change
dzsquared Jan 5, 2024
f4ef49a
get rid of the gitattributes
dzsquared Jan 9, 2024
4c395bb
cross plat build, no tests
dzsquared Jan 10, 2024
bf9ac2e
adding powershell
dzsquared Jan 10, 2024
fa19adf
correcting ast generator path
dzsquared Jan 10, 2024
9ac0bc4
build tools exes back on windows
dzsquared Jan 10, 2024
b2c7344
fixing windows build - always using netcore tools
dzsquared Jan 10, 2024
09aad2c
add linux build to PR validation
dzsquared Jan 10, 2024
f441f82
workflow syntax correction
dzsquared Jan 10, 2024
9340917
fixing linux pipeline error, probably
dzsquared Jan 10, 2024
9010cd7
correcting the case of astgen for linux
dzsquared Jan 10, 2024
5193fac
starting P0 test support, down to 61 failures
dzsquared Jan 10, 2024
c397b2d
Normalize line endings in ParsingEntryPointsTests
zijchen Jan 10, 2024
895e18d
Temporarily run PR check on all branches
zijchen Jan 10, 2024
2af1b30
Update on pull_request
zijchen Jan 10, 2024
1c14bc5
standardizing scripts read from streamreader on CRLF
dzsquared Jan 11, 2024
5b7fac3
exempt scripts with specific line endings
dzsquared Jan 11, 2024
eccb633
finishing fixes to parsererrorstests.cs
dzsquared Jan 11, 2024
7dc785d
Merge branch 'zijchen/xplat-build' of github.com:microsoft/SqlScriptD…
dzsquared Jan 11, 2024
a414f0e
down to 44 failures, parsingentrypointstests.cs done
dzsquared Jan 11, 2024
3dea6b0
avoid gitattributes for line endings, again
dzsquared Jan 11, 2024
f8d55a6
fixing workloadclassifier test for windows
dzsquared Jan 11, 2024
d1f9a04
down to 8 failing P0
dzsquared Jan 12, 2024
3d8a4c4
all P0 passing on linux
dzsquared Jan 13, 2024
1afc6d3
consolidating test job for all tests on linux
dzsquared Jan 13, 2024
8a5a613
tests for both netfx and netcore
dzsquared Jan 19, 2024
29bbdef
very small corrections before merging
dzsquared Jan 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions .github/workflows/pr-validation.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
name: pr-validation

on:
pull_request:
branches:
- main
pull_request

jobs:
build:
runs-on: windows-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v2
Expand All @@ -18,14 +19,23 @@ jobs:
- name: Build
run: dotnet build dirs.proj
test:
runs-on: windows-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
needs: build
steps:
- uses: actions/checkout@v2
- name: Disable strong name validation
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
.\disableStrongName.ps1

- name: Run tests
- name: Run tests Windows
if: matrix.os == 'windows-latest'
run: dotnet test

- name: Run tests Linux
if: matrix.os == 'ubuntu-latest'
run: dotnet test /p:TargetFramework=net6.0
28 changes: 26 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@ When you submit a pull request, a CLA bot will automatically determine whether y
a CLA and decorate the PR appropriately (e.g. status check, comment). Simply follow the instructions
provided by the bot. You will only need to do this once across all repos using our CLA.


### Getting Started

#### Windows

1. Download .NET SDKS from https://dotnet.microsoft.com/download/visual-studio-sdks
- .NET Framework SDK (4.6.2 or higher)
- .NET 6 SDK (see [global.json](./global.json) for latest version)
Expand All @@ -52,13 +55,32 @@ provided by the bot. You will only need to do this once across all repos using o
git clone https://github.com/microsoft/SqlScriptDOM
```

#### macOS/Linux

1. Download .NET SDKS from https://dotnet.microsoft.com/download/visual-studio-sdks
- .NET 6 SDK (see [global.json](./global.json) for latest version)

2. Install the Java runtime (JRE)
- macOS: `brew install openjdk`
- Linux: see https://openjdk.org/install/

3. Install PowerShell Core
- macOS: `brew install powershell/tap/powershell`
- Linux: see https://learn.microsoft.com/powershell/scripting/install/installing-powershell-on-linux

4. Clone the repository
```
git clone https://github.com/microsoft/SqlScriptDOM
```

### Building

Navigate to the root of the source code:
```cmd
cd C:\SqlScriptDOM\
cd SqlScriptDOM
```
Generate and open Visual Studio solution. This is an optional step for developers using Visual Studio

Optional, Windows-only - Generate and open Visual Studio solution. This step is not required to build the project.
```cmd
slngen
```
Expand All @@ -73,6 +95,8 @@ To build:
dotnet build
```



### Running the tests

You can run tests directly in Visual Studio Text Explorer or by using the ```dotnet test``` command.
Expand Down
8 changes: 5 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,15 @@
<OutputPath>$(BaseOutputPath)\$(Configuration)</OutputPath>

<!-- Path for tools output files, .exe executable generated files for tools can be found here -->
<BuildToolsPath>$(BaseOutputPath)\tools\$(NetfxVersion)</BuildToolsPath>
<BuildToolsPath>$(BaseOutputPath)\tools\$(NetCoreVersion)</BuildToolsPath>
dzsquared marked this conversation as resolved.
Show resolved Hide resolved

<!-- put obj files in a mirror tree off the root to keep the src folder tree cleaner -->
<BaseIntermediateOutputPath Condition=" '$(BaseIntermediateOutputPath)' == '' ">$(EnlistmentRoot)\obj\$([MSBuild]::MakeRelative('$(EnlistmentRoot)\', $(MSBuildProjectDirectory)))</BaseIntermediateOutputPath>

<AntlrSourceUrl>https://www.antlr2.org/download/antlr-2.7.5.exe</AntlrSourceUrl>
<AntlrLocation>$(BaseIntermediateOutputPath)\antlr-2.7.5.exe</AntlrLocation>
<AntlrSourceUrl Condition="'$(OS)' != 'Windows_NT'">https://www.antlr2.org/download/antlr-2.7.5.jar</AntlrSourceUrl>
<AntlrLocation Condition="'$(OS)' != 'Windows_NT'">$(BaseIntermediateOutputPath)\antlr-2.7.5.jar</AntlrLocation>
<AntlrSourceUrl Condition="'$(OS)' == 'Windows_NT'">https://www.antlr2.org/download/antlr-2.7.5.exe</AntlrSourceUrl>
<AntlrLocation Condition="'$(OS)' == 'Windows_NT'">$(BaseIntermediateOutputPath)\antlr-2.7.5.exe</AntlrLocation>
</PropertyGroup>

<!-- Don't enable localization when we are inside VS -->
Expand Down
35 changes: 25 additions & 10 deletions SqlScriptDom/GenerateFiles.props
Original file line number Diff line number Diff line change
Expand Up @@ -26,36 +26,51 @@
</DownloadFile>
</Target>
<Target Name="GSqlTokenTypesCompile" Condition="'@(GSqlTokenTypesCompile)'!=''" DependsOnTargets="CreateCsGenIntermediateOutputPath;InstallAntlr" BeforeTargets="CoreCompile" Inputs="@(GSqlTokenTypesCompile)" Outputs="@(GSqlTokenTypesCompile->'$(CsGenIntermediateOutputPath)%(filename)_final.cs')">
<Exec Command="&quot;$(AntlrLocation)&quot; -o &quot;$(CsGenIntermediateOutputPath.TrimEnd('\'))&quot; &quot;%(GSqlTokenTypesCompile.Identity)&quot;" />
<Exec Command="powershell -NonInteractive -Executionpolicy Unrestricted .\TSqlTokenTypes.ps1 &quot;$(CsGenIntermediateOutputPath)%(GSqlTokenTypesCompile.Filename).cs&quot; &quot;$(CsGenIntermediateOutputPath)%(GSqlTokenTypesCompile.Filename)_final.cs&quot;" />
<Exec Command="java -cp &quot;$(AntlrLocation)&quot; antlr.Tool -o &quot;$(CsGenIntermediateOutputPath.TrimEnd('\'))&quot; &quot;%(GSqlTokenTypesCompile.Identity)&quot;" Condition="'$(OS)' != 'Windows_NT'" />
<Exec Command="pwsh TSqlTokenTypes.ps1 &quot;$(CsGenIntermediateOutputPath)%(GSqlTokenTypesCompile.Filename).cs&quot; &quot;$(CsGenIntermediateOutputPath)%(GSqlTokenTypesCompile.Filename)_final.cs&quot;" Condition="'$(OS)' != 'Windows_NT'" />

<Exec Command="&quot;$(AntlrLocation)&quot; -o &quot;$(CsGenIntermediateOutputPath.TrimEnd('\'))&quot; &quot;%(GSqlTokenTypesCompile.Identity)&quot;" Condition="'$(OS)' == 'Windows_NT'" />
<Exec Command="powershell -NonInteractive -Executionpolicy Unrestricted .\TSqlTokenTypes.ps1 &quot;$(CsGenIntermediateOutputPath)%(GSqlTokenTypesCompile.Filename).cs&quot; &quot;$(CsGenIntermediateOutputPath)%(GSqlTokenTypesCompile.Filename)_final.cs&quot;" Condition="'$(OS)' == 'Windows_NT'" />

<ItemGroup>
<Compile Condition="'$(SqlDomNuget)'!='true'" Include="$(CsGenIntermediateOutputPath)%(GSqlTokenTypesCompile.Filename)_final.cs" />
</ItemGroup>
</Target>
<Target Name="GLexerParserCompile" Condition="'@(GLexerParserCompile)'!=''" DependsOnTargets="CreateCsGenIntermediateOutputPath;InstallAntlr" BeforeTargets="CoreCompile" Inputs="@(GLexerParserCompile)" Outputs="@(GLexerParserCompile->'$(CsGenIntermediateOutputPath)%(filename)ParserInternal_final.cs');@(GLexerParserCompile->'$(CsGenIntermediateOutputPath)%(filename)LexerInternal_final.cs')">
<!--Based on property we either run antlr with all warnings and errors supressed or not-->
<Exec Command="&quot;$(AntlrLocation)&quot; -o &quot;$(CsGenIntermediateOutputPath.TrimEnd('\'))&quot; &quot;%(GLexerParserCompile.Identity)&quot; &gt; NUL 2&gt;&amp;1" Condition="'$(OutputErrorInLexerParserCompile)' == 'false'" />
<Exec Command="&quot;$(AntlrLocation)&quot; -o &quot;$(CsGenIntermediateOutputPath.TrimEnd('\'))&quot; &quot;%(GLexerParserCompile.Identity)&quot; " Condition="'$(OutputErrorInLexerParserCompile)' == 'true'" />
<Exec Command="java -cp &quot;$(AntlrLocation)&quot; antlr.Tool -o &quot;$(CsGenIntermediateOutputPath.TrimEnd('\'))&quot; &quot;%(GLexerParserCompile.Identity)&quot; &gt; NUL 2&gt;&amp;1" Condition="'$(OutputErrorInLexerParserCompile)' == 'false' And '$(OS)' != 'Windows_NT'" />
<Exec Command="java -cp &quot;$(AntlrLocation)&quot; antlr.Tool -o &quot;$(CsGenIntermediateOutputPath.TrimEnd('\'))&quot; &quot;%(GLexerParserCompile.Identity)&quot; " Condition="'$(OutputErrorInLexerParserCompile)' == 'true' And '$(OS)' != 'Windows_NT'" />

<Exec Command="pwsh LexerPostProcessing.ps1 &quot;$(CsGenIntermediateOutputPath)%(GLexerParserCompile.Filename)LexerInternal.cs&quot; &quot;$(CsGenIntermediateOutputPath)%(GLexerParserCompile.Filename)LexerInternal_final.cs&quot;" Condition="'$(OS)' != 'Windows_NT'" />
<Exec Command="pwsh ParserPostProcessing.ps1 &quot;$(CsGenIntermediateOutputPath)%(GLexerParserCompile.Filename)ParserInternal.cs&quot; &quot;$(CsGenIntermediateOutputPath)%(GLexerParserCompile.Filename)ParserInternal_final.cs&quot;" Condition="'$(OS)' != 'Windows_NT'" />


<Exec Command="&quot;$(AntlrLocation)&quot; -o &quot;$(CsGenIntermediateOutputPath.TrimEnd('\'))&quot; &quot;%(GLexerParserCompile.Identity)&quot; &gt; NUL 2&gt;&amp;1" Condition="'$(OutputErrorInLexerParserCompile)' == 'false' And '$(OS)' == 'Windows_NT'" />
<Exec Command="&quot;$(AntlrLocation)&quot; -o &quot;$(CsGenIntermediateOutputPath.TrimEnd('\'))&quot; &quot;%(GLexerParserCompile.Identity)&quot; " Condition="'$(OutputErrorInLexerParserCompile)' == 'true' And '$(OS)' == 'Windows_NT'" />

<Exec Command="powershell -NonInteractive -Executionpolicy Unrestricted .\LexerPostProcessing.ps1 &quot;$(CsGenIntermediateOutputPath)%(GLexerParserCompile.Filename)LexerInternal.cs&quot; &quot;$(CsGenIntermediateOutputPath)%(GLexerParserCompile.Filename)LexerInternal_final.cs&quot;" />
<Exec Command="powershell -NonInteractive -Executionpolicy Unrestricted .\ParserPostProcessing.ps1 &quot;$(CsGenIntermediateOutputPath)%(GLexerParserCompile.Filename)ParserInternal.cs&quot; &quot;$(CsGenIntermediateOutputPath)%(GLexerParserCompile.Filename)ParserInternal_final.cs&quot;" />
<Exec Command="powershell -NonInteractive -Executionpolicy Unrestricted .\LexerPostProcessing.ps1 &quot;$(CsGenIntermediateOutputPath)%(GLexerParserCompile.Filename)LexerInternal.cs&quot; &quot;$(CsGenIntermediateOutputPath)%(GLexerParserCompile.Filename)LexerInternal_final.cs&quot;" Condition="'$(OS)' == 'Windows_NT'" />
<Exec Command="powershell -NonInteractive -Executionpolicy Unrestricted .\ParserPostProcessing.ps1 &quot;$(CsGenIntermediateOutputPath)%(GLexerParserCompile.Filename)ParserInternal.cs&quot; &quot;$(CsGenIntermediateOutputPath)%(GLexerParserCompile.Filename)ParserInternal_final.cs&quot;" Condition="'$(OS)' == 'Windows_NT'" />

<ItemGroup>
<Compile Condition="'$(SqlDomNuget)'!='true'" Include="$(CsGenIntermediateOutputPath)%(GLexerParserCompile.Filename)LexerInternal_final.cs" />
<Compile Condition="'$(SqlDomNuget)'!='true'" Include="$(CsGenIntermediateOutputPath)%(GLexerParserCompile.Filename)ParserInternal_final.cs" />
</ItemGroup>
</Target>
<Target Name="CreateAST" DependsOnTargets="AfterResolveReferences;GSqlTokenTypesCompile" BeforeTargets="CoreCompile" Inputs="$(SQLSCRIPTDOM)\Parser\TSql\Ast.xml;" Outputs="$(CsGenIntermediateOutputPath)Ast.cs;$(CsGenIntermediateOutputPath)TSqlConcreteFragmentVisitor.codegen.cs">
<Exec Condition="'$(SqlDomNuget)'!='true'" Command="&quot;$(BuildToolsPath)\AstGen.exe&quot; &quot;$(SQLSCRIPTDOM)\Parser\TSql\Ast.xml&quot; &quot;$(CsGenIntermediateOutputPath)TSqlFragmentVisitor.codegen.cs&quot; &quot;$(CsGenIntermediateOutputPath)TSqlConcreteFragmentVisitor.codegen.cs&quot; &quot;$(CsGenIntermediateOutputPath)Ast.cs&quot; &quot;" />
<Exec Condition="'$(SqlDomNuget)'=='true'" Command="&quot;$(BuildToolsPath)\AstGen.exe&quot; &quot;$(SQLSCRIPTDOM)\Parser\TSql\Ast.xml&quot; &quot;$(CsGenIntermediateOutputPath)TSqlFragmentVisitor.codegen.cs&quot; &quot;$(CsGenIntermediateOutputPath)TSqlConcreteFragmentVisitor.codegen.cs&quot; &quot;$(CsGenIntermediateOutputPath)Ast.cs&quot; -test &quot;$(CsGenIntermediateOutputPath)\OverrideSqlScriptGeneratorVisitor.codegen.cs&quot; &quot;" />
<Exec Condition="'$(SqlDomNuget)'!='true' And '$(OS)' != 'Windows_NT'" Command="&quot;$(BuildToolsPath)/astgen&quot; &quot;$(SQLSCRIPTDOM)/Parser/TSql/Ast.xml&quot; &quot;$(CsGenIntermediateOutputPath)TSqlFragmentVisitor.codegen.cs&quot; &quot;$(CsGenIntermediateOutputPath)TSqlConcreteFragmentVisitor.codegen.cs&quot; &quot;$(CsGenIntermediateOutputPath)Ast.cs&quot; " />
<Exec Condition="'$(SqlDomNuget)'=='true' And '$(OS)' != 'Windows_NT'" Command="&quot;$(BuildToolsPath)/astgen&quot; &quot;$(SQLSCRIPTDOM)/Parser/TSql/Ast.xml&quot; &quot;$(CsGenIntermediateOutputPath)TSqlFragmentVisitor.codegen.cs&quot; &quot;$(CsGenIntermediateOutputPath)TSqlConcreteFragmentVisitor.codegen.cs&quot; &quot;$(CsGenIntermediateOutputPath)Ast.cs&quot; -test &quot;$(CsGenIntermediateOutputPath)\OverrideSqlScriptGeneratorVisitor.codegen.cs&quot; &quot;" />
<Exec Condition="'$(SqlDomNuget)'!='true' And '$(OS)' == 'Windows_NT'" Command="&quot;$(BuildToolsPath)\AstGen.exe&quot; &quot;$(SQLSCRIPTDOM)\Parser\TSql\Ast.xml&quot; &quot;$(CsGenIntermediateOutputPath)TSqlFragmentVisitor.codegen.cs&quot; &quot;$(CsGenIntermediateOutputPath)TSqlConcreteFragmentVisitor.codegen.cs&quot; &quot;$(CsGenIntermediateOutputPath)Ast.cs&quot; " />
<Exec Condition="'$(SqlDomNuget)'=='true' And '$(OS)' == 'Windows_NT'" Command="&quot;$(BuildToolsPath)\AstGen.exe&quot; &quot;$(SQLSCRIPTDOM)\Parser\TSql\Ast.xml&quot; &quot;$(CsGenIntermediateOutputPath)TSqlFragmentVisitor.codegen.cs&quot; &quot;$(CsGenIntermediateOutputPath)TSqlConcreteFragmentVisitor.codegen.cs&quot; &quot;$(CsGenIntermediateOutputPath)Ast.cs&quot; -test &quot;$(CsGenIntermediateOutputPath)\OverrideSqlScriptGeneratorVisitor.codegen.cs&quot; &quot;" />
<ItemGroup>
<Compile Condition="'$(SqlDomNuget)'!='true'" Include="$(CsGenIntermediateOutputPath)Ast.cs" />
<Compile Condition="'$(SqlDomNuget)'!='true'" Include="$(CsGenIntermediateOutputPath)TSqlConcreteFragmentVisitor.codegen.cs" />
</ItemGroup>
</Target>
<Target Name="GenerateEverything" DependsOnTargets="AfterResolveReferences;GSqlTokenTypesCompile" BeforeTargets="CoreCompile" Inputs="$(SQLSCRIPTDOM)\ScriptDom\SqlServer\Settings\SqlScriptGeneratorOptions.xml" Outputs="$(CsGenIntermediateOutputPath)TSqlTokenTypes.txt;$(CsGenIntermediateOutputPath)TSqlFragmentVisitor.codegen.cs;$(CsGenIntermediateOutputPath)SqlScriptGeneratorOptions.cs;$(CsGenIntermediateOutputPath)ScriptGeneratorSupporter.Generated.cs">
<Exec Command="&quot;$(BuildToolsPath)\ScriptGenSettingsGenerator.exe&quot; &quot;$(SQLSCRIPTDOM)\ScriptDom\SqlServer\Settings\SqlScriptGeneratorOptions.xml&quot; &quot;$(CsGenIntermediateOutputPath)SqlScriptGeneratorOptions.cs&quot; &quot;$(CsGenIntermediateOutputPath)SqlScriptGeneratorOptionsAdapter.Generated.cs&quot;" />
<Exec Command="&quot;$(BuildToolsPath)\TokenListGenerator.exe&quot; &quot;$(CsGenIntermediateOutputPath)TSqlTokenTypes.txt&quot; &gt; &quot;$(CsGenIntermediateOutputPath)ScriptGeneratorSupporter.Generated.cs&quot;" />
<Exec Condition="'$(OS)' != 'Windows_NT'" Command="&quot;$(BuildToolsPath)/ScriptGenSettingsGenerator&quot; &quot;$(SQLSCRIPTDOM)/ScriptDom/SqlServer/Settings/SqlScriptGeneratorOptions.xml&quot; &quot;$(CsGenIntermediateOutputPath)SqlScriptGeneratorOptions.cs&quot; &quot;$(CsGenIntermediateOutputPath)SqlScriptGeneratorOptionsAdapter.Generated.cs&quot;" />
<Exec Condition="'$(OS)' != 'Windows_NT'" Command="&quot;$(BuildToolsPath)/TokenListGenerator&quot; &quot;$(CsGenIntermediateOutputPath)TSqlTokenTypes.txt&quot; &gt; &quot;$(CsGenIntermediateOutputPath)ScriptGeneratorSupporter.Generated.cs&quot;" />
<Exec Condition="'$(OS)' == 'Windows_NT'" Command="&quot;$(BuildToolsPath)\ScriptGenSettingsGenerator.exe&quot; &quot;$(SQLSCRIPTDOM)\ScriptDom\SqlServer\Settings\SqlScriptGeneratorOptions.xml&quot; &quot;$(CsGenIntermediateOutputPath)SqlScriptGeneratorOptions.cs&quot; &quot;$(CsGenIntermediateOutputPath)SqlScriptGeneratorOptionsAdapter.Generated.cs&quot;" />
<Exec Condition="'$(OS)' == 'Windows_NT'" Command="&quot;$(BuildToolsPath)\TokenListGenerator.exe&quot; &quot;$(CsGenIntermediateOutputPath)TSqlTokenTypes.txt&quot; &gt; &quot;$(CsGenIntermediateOutputPath)ScriptGeneratorSupporter.Generated.cs&quot;" />
<ItemGroup>
<Compile Condition="'$(SqlDomNuget)'!='true'" Include="$(CsGenIntermediateOutputPath)ScriptGeneratorSupporter.Generated.cs" />
<Compile Condition="'$(SqlDomNuget)'!='true'" Include="$(CsGenIntermediateOutputPath)SqlScriptGeneratorOptions.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@

<!-- These project references make sure tools are built first.
The SetTargetFramework tells msbuild to only build to build
those projects for the one and only flavor we need, i.e. $(NetfxVersion).
those projects for the one and only flavor we need, i.e. $(NetCoreVersion).
-->
<ItemGroup>
<ProjectReference Include="..\tools\AstGen\astgen.csproj">
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<SetTargetFramework>TargetFramework=$(NetfxVersion)</SetTargetFramework>
<SetTargetFramework>TargetFramework=$(NetCoreVersion)</SetTargetFramework>
dzsquared marked this conversation as resolved.
Show resolved Hide resolved
</ProjectReference>
<ProjectReference Include="..\tools\ScriptGenSettingsGenerator\ScriptGenSettingsGenerator.csproj">
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<SetTargetFramework>TargetFramework=$(NetfxVersion)</SetTargetFramework>
<SetTargetFramework>TargetFramework=$(NetCoreVersion)</SetTargetFramework>
</ProjectReference>
<ProjectReference Include="..\tools\TokenListGenerator\TokenListGenerator.csproj">
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<SetTargetFramework>TargetFramework=$(NetfxVersion)</SetTargetFramework>
<SetTargetFramework>TargetFramework=$(NetCoreVersion)</SetTargetFramework>
</ProjectReference>
</ItemGroup>
<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions Test/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
<!-- put obj files in a mirror tree off the root to keep the src folder tree cleaner -->
<BaseIntermediateOutputPath Condition=" '$(BaseIntermediateOutputPath)' == '' ">$(EnlistmentRoot)\obj\$([MSBuild]::MakeRelative('$(EnlistmentRoot)\', $(MSBuildProjectDirectory)))</BaseIntermediateOutputPath>

<!-- Tests currently only work for netfx -->
<TargetFrameworks>$(NetfxVersion)</TargetFrameworks>
<!-- Test on netcore to cover all platforms -->
<TargetFrameworks>$(NetfxVersion);$(NetCoreVersion)</TargetFrameworks>

<!-- The TargetGroup can be used to express condition that are common to more than one TargetFramework (currently not used)-->
<TargetGroup Condition="'$(TargetFramework)'=='netstandard2.0' Or '$(TargetFramework)'=='netstandard2.1' Or '$(TargetFramework)'=='netstandard2.2'">netstandard</TargetGroup>
Expand Down
Loading
Loading