diff --git a/.gitignore b/.gitignore index fcbb782bcc1..638ccb50973 100644 --- a/.gitignore +++ b/.gitignore @@ -288,7 +288,7 @@ FakesAssemblies/ *.opt .vs/ -.vscode/ +.vscode/launch.json launchSettings.json target/ diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 00000000000..f40e6f99b42 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,19 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "build", + "command": "dotnet", + "type": "process", + "args": [ + "build", + "${workspaceFolder}/Microsoft.Azure.Devices.Edge.sln" + ], + "problemMatcher": "$msCompile", + "group": { + "kind": "build", + "isDefault": true + } + } + ] +} \ No newline at end of file diff --git a/edge-hub/src/Microsoft.Azure.Devices.Routing.Core/Microsoft.Azure.Devices.Routing.Core.csproj b/edge-hub/src/Microsoft.Azure.Devices.Routing.Core/Microsoft.Azure.Devices.Routing.Core.csproj index 36afc018c8c..8c8b9d2c7f1 100644 --- a/edge-hub/src/Microsoft.Azure.Devices.Routing.Core/Microsoft.Azure.Devices.Routing.Core.csproj +++ b/edge-hub/src/Microsoft.Azure.Devices.Routing.Core/Microsoft.Azure.Devices.Routing.Core.csproj @@ -1,5 +1,4 @@ - - + netstandard2.0 @@ -23,7 +22,7 @@ - + MSBuild:Compile Microsoft.Azure.Devices.Routing.Core.Query @@ -55,9 +54,30 @@ - + + + + + + $(NuGetPackageRoot)antlr4.codegenerator/4.6.1-beta002/tools/antlr4-csharp-4.6.1-SNAPSHOT-complete.jar + + + + + + + + + + + + + + + diff --git a/scripts/linux/buildBranch.sh b/scripts/linux/buildBranch.sh index ca4e3961d23..8012d13956b 100755 --- a/scripts/linux/buildBranch.sh +++ b/scripts/linux/buildBranch.sh @@ -14,7 +14,6 @@ SLN_PATTERN='Microsoft.Azure.*.sln' CSPROJ_PATTERN='*.csproj' TEST_CSPROJ_PATTERN='*Test.csproj' FUNCTION_BINDING_CSPROJ_PATTERN='*Binding.csproj' -ANTLR_PATTERN='*.g4' ROOT_FOLDER=$BUILD_REPOSITORY_LOCALPATH PUBLISH_FOLDER=$BUILD_BINARIESDIRECTORY/publish RELEASE_TESTS_FOLDER=$BUILD_BINARIESDIRECTORY/release-tests @@ -57,15 +56,6 @@ while read soln; do $DOTNET_ROOT_PATH/dotnet restore $soln done < <(find $ROOT_FOLDER -type f -name $SLN_PATTERN) -echo "Generating Antlr code files" - -while read g4file; do - echo "Generating .cs files for - $g4file" - OUTPUT_DIR=$(dirname "$g4file")/generated - mkdir -p $OUTPUT_DIR - java -jar ~/.nuget/packages/antlr4.codegenerator/4.6.1-beta002/tools/antlr4-csharp-4.6.1-SNAPSHOT-complete.jar $g4file -package Microsoft.Azure.Devices.Routing.Core -Dlanguage=CSharp_v4_5 -visitor -listener -o $OUTPUT_DIR -done < <(find $ROOT_FOLDER -type f -name $ANTLR_PATTERN) - echo "Building all solutions in repo" RES=0 while read soln; do diff --git a/scripts/windows/buildBranch.bat b/scripts/windows/buildBranch.bat index d293f252b27..e80bd73c91a 100644 --- a/scripts/windows/buildBranch.bat +++ b/scripts/windows/buildBranch.bat @@ -27,7 +27,6 @@ if not defined CONFIGURATION ( set SLN_PATTERN=Microsoft.Azure.*.sln set CSPROJ_PATTERN=*.csproj -set ANTLR_PATTERN=*.g4 set DOTNET_ROOT_PATH=%AGENT_WORKFOLDER%\dotnet set PUBLISH_FOLDER=%BUILD_BINARIESDIRECTORY%\publish set SRC_DOCKER_DIR=%BUILD_REPOSITORY_LOCALPATH%\docker @@ -60,26 +59,6 @@ for /r %%f in (%SLN_PATTERN%) do ( if !ERRORLEVEL! neq 0 exit /b 1 ) -echo. -echo Generating Antlr code files -echo. - -set JAVA_COMMAND=java -where %JAVA_COMMAND% >nul 2>&1 -if %ERRORLEVEL% neq 0 ( - REM Fallback to using IKVM if Java isn't installed. Java is preferred for Antlr codegen - REM because it's a lot faster. - set "JAVA_COMMAND=%UserProfile%\.nuget\packages\Antlr4.CodeGenerator\4.6.1-beta002\tools\ikvm.exe" -) - -for /r %%a in (%ANTLR_PATTERN%) do ( - set GENERATED_PATH=%%~dpagenerated - echo Generating .cs files for - %%a - if not exist "!GENERATED_PATH!" mkdir "!GENERATED_PATH!" - "%JAVA_COMMAND%" -jar "%UserProfile%/.nuget/packages/Antlr4.CodeGenerator/4.6.1-beta002/tools/antlr4-csharp-4.6.1-SNAPSHOT-complete.jar" %%a -package Microsoft.Azure.Devices.Routing.Core -Dlanguage=CSharp_v4_5 -visitor -listener -o "!GENERATED_PATH!" - if !ERRORLEVEL! neq 0 exit /b 1 -) - echo. echo Building all solutions in repo echo.