Dependent builds, publishing and packaging (#65)
authorMike McLaughlin <mikem@microsoft.com>
Fri, 24 Aug 2018 23:56:12 +0000 (16:56 -0700)
committerGitHub <noreply@github.com>
Fri, 24 Aug 2018 23:56:12 +0000 (16:56 -0700)
Restore Microsoft.DotNet.BuildTools to generate the
native build _version.h/version.cpp.

Generate proper version header and source file for
native binaries. Issue https://github.com/dotnet/diagnostics/issues/19.

39 files changed:
.vsts-dotnet-ci.yml
.vsts-dotnet.yml
Build.cmd
CMakeLists.txt
build.sh
diagnostics.sln
eng/Build-Native.cmd
eng/Build.cmd
eng/BuildTask.targets [deleted file]
eng/BuildTools.csproj [new file with mode: 0644]
eng/CIBuild.cmd
eng/CreateVersionFile.csproj [new file with mode: 0644]
eng/GalleryManifest.xml [new file with mode: 0644]
eng/SignToolData.json
eng/Versions.props
eng/build-native.sh
eng/build.sh
eng/build.yml
eng/cibuild.sh
eng/cipack.cmd [new file with mode: 0644]
eng/citest.sh [new file with mode: 0755]
eng/common/templates/phases/base.yml
eng/common/templates/steps/run-script-ifequalelse.yml [new file with mode: 0644]
eng/common/templates/steps/telemetry-end.yml [new file with mode: 0644]
eng/common/templates/steps/telemetry-start.yml [new file with mode: 0644]
eng/docker-build.sh [new file with mode: 0755]
eng/docker-cibuild.sh [deleted file]
functions.cmake
pack.cmd [deleted file]
src/SOS/SOS.NETCore/SOS.NETCore.csproj
src/SOS/SOS.UnitTests/SOS.UnitTests.csproj
src/SOS/Strike/sosdocs.txt
src/SOS/dbgutil/CMakeLists.txt
src/SOS/debugshim/CMakeLists.txt
src/SOS/lldbplugin.tests/TestDebuggee/TestDebuggee.csproj
src/SOS/lldbplugin/CMakeLists.txt
src/inc/_version.h [deleted file]
src/pal/src/CMakeLists.txt
src/palrt/CMakeLists.txt

index 5c3ed1f1e8752a9a93e85a54184aaab737fa7847..0c9a0f858efa37cb4a0bea32befe01295e4b4d67 100644 (file)
@@ -3,7 +3,6 @@ phases:
   parameters:
     phaseName: Windows
     agentOs: Windows_NT
-    buildReason: IndividualCI
     queue: 
       name: Hosted VS2017
       demands:
@@ -13,19 +12,14 @@ phases:
         Build_Debug:
           _BuildConfig: Debug
           _BuildArch: x64
-          _PublishType: none
-          _SignType: test
         Build_Release:
           _BuildConfig: Release
           _BuildArch: x64
-          _PublishType: none
-          _SignType: test
 
 - template: /eng/build.yml
   parameters:
     phaseName: CentOS_7
     agentOs: Linux
-    buildReason: IndividualCI
     dockerImage: microsoft/dotnet-buildtools-prereqs:centos-7-c103199-20180628120549
     queue:
       name: DotNetCore-Linux
@@ -36,19 +30,14 @@ phases:
         Build_Debug:
           _BuildConfig: Debug
           _BuildArch: x64
-          _PublishType: none
-          _SignType: test
         Build_Release:
           _BuildConfig: Release
           _BuildArch: x64
-          _PublishType: none
-          _SignType: test
 
 - template: /eng/build.yml
   parameters:
     phaseName: MacOS
     agentOs: Darwin
-    buildReason: IndividualCI
     queue: 
       name: Hosted macOS Preview
       demands:
@@ -58,11 +47,7 @@ phases:
         Build_Debug:
           _BuildConfig: Debug
           _BuildArch: x64
-          _PublishType: none
-          _SignType: test
         Build_Release:
           _BuildConfig: Release
           _BuildArch: x64
-          _PublishType: none
-          _SignType: test
 
index e53c98680522bc3172768bc266711d5db5ebcfa5..d2bdab7aac0262acfe3d00e2221731bc0e335f85 100644 (file)
@@ -1,9 +1,30 @@
 phases:
+- template: /eng/build.yml
+  parameters:
+    phaseName: Windows
+    agentOs: Windows_NT
+    queue: 
+      name: DotNetCore-Build
+      demands:
+        - agent.os -equals Windows_NT
+      parallel: 3
+      matrix:
+        Build_Debug:
+          _BuildConfig: Debug
+          _BuildArch: x64
+        Build_Release:
+          _BuildConfig: Release
+          _BuildArch: x64
+          _PublishArtifacts: bin
+        Build_Release_x86:
+          _BuildConfig: Release
+          _BuildArch: x86
+          _PublishArtifacts: bin/Windows_NT.x86
+
 - template: /eng/build.yml
   parameters:
     phaseName: CentOS_7
     agentOs: Linux
-    buildReason: Internal
     dockerImage: microsoft/dotnet-buildtools-prereqs:centos-7-c103199-20180628120549
     queue:
       name: DotNet-Build
@@ -14,37 +35,37 @@ phases:
         Build_Debug:
           _BuildConfig: Debug
           _BuildArch: x64
-          _PublishType: none
-          _SignType: test
+          _PublishArtifacts: bin/Linux.x64
         Build_Release:
           _BuildConfig: Release
           _BuildArch: x64
-          _PublishType: none
-          _SignType: real
+          _PublishArtifacts: bin/Linux.x64
 
 - template: /eng/build.yml
   parameters:
-    phaseName: Debian_Stretch
-    agentOs: Linux
-    buildReason: Internal
-    dockerImage: microsoft/dotnet-buildtools-prereqs:debian-stretch-c103199-20180628122423
-    queue:
-      name: DotNet-Build
+    phaseName: MacOS
+    agentOs: Darwin
+    queue: 
+      name: Hosted macOS Preview
       demands:
-        - agent.os -equals Linux
+        - agent.os -equals Darwin
+      parallel: 2
       matrix:
         Build_Debug:
           _BuildConfig: Debug
           _BuildArch: x64
-          _PublishType: none
-          _SignType: test
+        Build_Release:
+          _BuildConfig: Release
+          _BuildArch: x64
+          _PublishArtifacts: bin/OSX.x64
 
 - template: /eng/build.yml
   parameters:
-    phaseName: Fedora_24
+    phaseName: Debian_Stretch
     agentOs: Linux
-    buildReason: Internal
-    dockerImage: microsoft/dotnet-buildtools-prereqs:fedora-24-c103199-20180628122443
+    dockerImage: microsoft/dotnet-buildtools-prereqs:debian-stretch-c103199-20180628122423
+    dependsOn: CentOS_7
+    testOnly: true
     queue:
       name: DotNet-Build
       demands:
@@ -53,15 +74,14 @@ phases:
         Build_Debug:
           _BuildConfig: Debug
           _BuildArch: x64
-          _PublishType: none
-          _SignType: test
 
 - template: /eng/build.yml
   parameters:
     phaseName: Fedora_27
     agentOs: Linux
-    buildReason: Internal
     dockerImage: microsoft/dotnet-buildtools-prereqs:fedora-27-c103199-20180628122443
+    dependsOn: CentOS_7
+    testOnly: true
     queue:
       name: DotNet-Build
       demands:
@@ -70,15 +90,14 @@ phases:
         Build_Debug:
           _BuildConfig: Debug
           _BuildArch: x64
-          _PublishType: none
-          _SignType: test
 
 - template: /eng/build.yml
   parameters:
     phaseName: Fedora_28
     agentOs: Linux
-    buildReason: Internal
     dockerImage: microsoft/dotnet-buildtools-prereqs:fedora-28-c103199-20180628122443
+    dependsOn: CentOS_7
+    testOnly: true
     queue:
       name: DotNet-Build
       demands:
@@ -87,15 +106,14 @@ phases:
         Build_Debug:
           _BuildConfig: Debug
           _BuildArch: x64
-          _PublishType: none
-          _SignType: test
 
 - template: /eng/build.yml
   parameters:
     phaseName: OpenSuse_42_1
     agentOs: Linux
-    buildReason: Internal
     dockerImage: microsoft/dotnet-buildtools-prereqs:opensuse-42.1-c103199-20180628122439
+    dependsOn: CentOS_7
+    testOnly: true
     queue:
       name: DotNet-Build
       demands:
@@ -104,15 +122,14 @@ phases:
         Build_Debug:
           _BuildConfig: Debug
           _BuildArch: x64
-          _PublishType: none
-          _SignType: real
 
 - template: /eng/build.yml
   parameters:
     phaseName: OpenSuse_42_3
     agentOs: Linux
-    buildReason: Internal
     dockerImage: microsoft/dotnet-buildtools-prereqs:opensuse-42.3-c103199-20180628122439
+    dependsOn: CentOS_7
+    testOnly: true
     queue:
       name: DotNet-Build
       demands:
@@ -121,15 +138,14 @@ phases:
         Build_Debug:
           _BuildConfig: Debug
           _BuildArch: x64
-          _PublishType: none
-          _SignType: test
 
 - template: /eng/build.yml
   parameters:
     phaseName: Ubuntu_14_04
     agentOs: Linux
-    buildReason: Internal
     dockerImage: microsoft/dotnet-buildtools-prereqs:ubuntu-14.04-c103199-20180628134413
+    dependsOn: CentOS_7
+    testOnly: true
     queue:
       name: DotNet-Build
       demands:
@@ -138,15 +154,14 @@ phases:
         Build_Debug:
           _BuildConfig: Debug
           _BuildArch: x64
-          _PublishType: none
-          _SignType: test
 
 - template: /eng/build.yml
   parameters:
     phaseName: Ubuntu_16_04
     agentOs: Linux
-    buildReason: Internal
     dockerImage: microsoft/dotnet-buildtools-prereqs:ubuntu-16.04-c103199-20180628134544
+    dependsOn: CentOS_7
+    testOnly: true
     queue:
       name: DotNet-Build
       demands:
@@ -155,15 +170,14 @@ phases:
         Build_Debug:
           _BuildConfig: Debug
           _BuildArch: x64
-          _PublishType: none
-          _SignType: test
 
 - template: /eng/build.yml
   parameters:
     phaseName: Ubuntu_17_10
     agentOs: Linux
-    buildReason: Internal
     dockerImage: microsoft/dotnet-buildtools-prereqs:ubuntu-17.10-c103199-20180628134544
+    dependsOn: CentOS_7
+    testOnly: true
     queue:
       name: DotNet-Build
       demands:
@@ -172,15 +186,14 @@ phases:
         Build_Debug:
           _BuildConfig: Debug
           _BuildArch: x64
-          _PublishType: none
-          _SignType: test
 
 - template: /eng/build.yml
   parameters:
     phaseName: Ubuntu_18_04
     agentOs: Linux
-    buildReason: Internal
     dockerImage: microsoft/dotnet-buildtools-prereqs:ubuntu-18.04-c103199-20180628134610
+    dependsOn: CentOS_7
+    testOnly: true
     queue:
       name: DotNet-Build
       demands:
@@ -189,55 +202,249 @@ phases:
         Build_Debug:
           _BuildConfig: Debug
           _BuildArch: x64
-          _PublishType: none
-          _SignType: test
 
-- template: /eng/build.yml
-  parameters:
-    phaseName: MacOS
-    agentOs: Darwin
-    buildReason: Internal
-    queue: 
-      name: Hosted macOS Preview
-      demands:
-        - agent.os -equals Darwin
-      parallel: 2
-      matrix:
-        Build_Debug:
-          _BuildConfig: Debug
-          _BuildArch: x64
-          _PublishType: none
-          _SignType: test
-        Build_Release:
-          _BuildConfig: Release
-          _BuildArch: x64
-          _PublishType: none
-          _SignType: real
+- phase: Sign_Package_Publish
+  dependsOn:
+  - Windows
+  - CentOS_7
+  - MacOS
+  queue:
+    name: DotNetCore-Build
+    demands:
+      - agent.os -equals Windows_NT
+  steps: 
+  - task: ms-vseng.MicroBuildTasks.30666190-6959-11e5-9f96-f56098202fef.MicroBuildSigningPlugin@1
+    displayName: Install MicroBuild plugin
+    inputs:
+      signType: real
+      zipSources: false
+      esrpSigning: true
+    env:
+      TeamName: DotNetCore
+    continueOnError: false
+    condition: succeeded()
 
-- template: /eng/build.yml
-  parameters:
-    phaseName: Windows
-    agentOs: Windows_NT
-    buildReason: Internal
-    queue: 
-      name: DotNetCore-Build
-      demands:
-        - agent.os -equals Windows_NT
-      parallel: 3
-      matrix:
-        Build_Debug:
-          _BuildConfig: Debug
-          _BuildArch: x64
-          _PublishType: none
-          _SignType: test
-        Build_Release:
-          _BuildConfig: Release
-          _BuildArch: x64
-          _PublishType: none
-          _SignType: real
-        Build_Release_x86:
-          _BuildConfig: Release
-          _BuildArch: x86
-          _PublishType: none
-          _SignType: real
+  - task: AzureKeyVault@1
+    inputs:
+      azureSubscription: 'DotNet-Engineering-Services_KeyVault'
+      KeyVaultName: EngKeyVault
+      SecretsFilter: 'dotnetfeed-storage-access-key-1'
+    condition: succeeded()
+
+  # Windows x64 download, copy and archive. Everything under "bin" is published for the Windows x64 build.
+
+  - task: DownloadBuildArtifacts@0
+    displayName: Download Windows x64 and Managed Artifacts
+    inputs:
+      artifactName: Windows_Build_Release
+      downloadPath: '$(System.ArtifactsDirectory)'
+    condition: succeeded()
+
+  - task: CopyFiles@2
+    displayName: Copy Windows Artifacts
+    inputs:
+      sourceFolder: '$(System.ArtifactsDirectory)/Windows_Build_Release'
+      targetFolder: '$(Build.SourcesDirectory)/artifacts/Release/bin'
+    condition: succeeded()
+
+  - task: ArchiveFiles@2
+    displayName: Archive Windows x64 Artifacts
+    inputs:
+      archiveType: zip
+      includeRootFolder: false
+      rootFolderOrFile: '$(Build.SourcesDirectory)/artifacts/Release/bin/Windows_NT.x64'
+      archiveFile: '$(Build.SourcesDirectory)/artifacts/Release/sos-win-x64.zip'
+    condition: succeeded()
+
+  # Windows x86 download, copy and archive.
+
+  - task: DownloadBuildArtifacts@0
+    displayName: Download Windows x86 Artifacts
+    inputs:
+      artifactName: Windows_Build_Release_x86
+      downloadPath: '$(System.ArtifactsDirectory)'
+    condition: succeeded()
+
+  - task: CopyFiles@2
+    displayName: Copy Windows x86 Artifacts
+    inputs:
+      sourceFolder: '$(System.ArtifactsDirectory)/Windows_Build_Release_x86'
+      targetFolder: '$(Build.SourcesDirectory)/artifacts/Release/bin/Windows_NT.x86'
+    condition: succeeded()
+
+  - task: CopyFiles@2
+    displayName: Copy Windows x86 Artifacts
+    inputs:
+      sourceFolder: '$(Build.SourcesDirectory)/artifacts/Release/bin/SOS.NETCore/netcoreapp1.0'
+      contents: 'SOS.NETCore.dll'
+      overWrite: true
+      targetFolder: '$(Build.SourcesDirectory)/artifacts/Release/bin/Windows_NT.x86'
+    condition: succeeded()
+
+  - task: ArchiveFiles@2
+    displayName: Archive Windows x86 Artifacts
+    inputs:
+      archiveType: zip
+      includeRootFolder: false
+      rootFolderOrFile: '$(Build.SourcesDirectory)/artifacts/Release/bin/Windows_NT.x86'
+      archiveFile: '$(Build.SourcesDirectory)/artifacts/Release/sos-win-x86.zip'
+    condition: succeeded()
+  
+  # Copy and archive the files for windbg extension gallery.
+
+  - task: CopyFiles@2
+    displayName: Copy Extension Gallery Files
+    inputs:
+      sourceFolder: '$(Build.SourcesDirectory)/artifacts/Release/bin/Windows_NT.x64'
+      contents: 'sos.dll'
+      targetFolder: '$(Build.SourcesDirectory)/artifacts/Release/gallery/x64'
+    condition: succeeded()
+
+  - task: CopyFiles@2
+    displayName: Copy Extension Gallery Files
+    inputs:
+      sourceFolder: '$(Build.SourcesDirectory)/artifacts/Release/bin/SOS.NETCore/netcoreapp1.0'
+      contents: 'SOS.NETCore.dll'
+      overWrite: true
+      targetFolder: '$(Build.SourcesDirectory)/artifacts/Release/gallery/x64'
+    condition: succeeded()
+
+  - task: CopyFiles@2
+    displayName: Copy Extension Gallery Files
+    inputs:
+      sourceFolder: '$(Build.SourcesDirectory)/artifacts/Release/bin/Windows_NT.x86'
+      contents: 'sos.dll'
+      targetFolder: '$(Build.SourcesDirectory)/artifacts/Release/gallery/x86'
+    condition: succeeded()
+
+  - task: CopyFiles@2
+    displayName: Copy Extension Gallery Files
+    inputs:
+      sourceFolder: '$(Build.SourcesDirectory)/artifacts/Release/bin/SOS.NETCore/netcoreapp1.0'
+      contents: 'SOS.NETCore.dll'
+      overWrite: true
+      targetFolder: '$(Build.SourcesDirectory)/artifacts/Release/gallery/x86'
+    condition: succeeded()
+
+  - task: CopyFiles@2
+    displayName: Copy Extension Gallery Files
+    inputs:
+      sourceFolder: '$(Build.SourcesDirectory)/eng'
+      contents: 'GalleryManifest.xml'
+      targetFolder: '$(Build.SourcesDirectory)/artifacts/Release/gallery'
+    condition: succeeded()
+
+  - task: ArchiveFiles@2
+    displayName: Archive Extension Gallery Files
+    inputs:
+      archiveType: zip
+      includeRootFolder: false
+      rootFolderOrFile: '$(Build.SourcesDirectory)/artifacts/Release/gallery'
+      archiveFile: '$(Build.SourcesDirectory)/artifacts/Release/sos-gallery.zip'
+    condition: succeeded()
+
+  # Linux download, copy and archive
+
+  - task: DownloadBuildArtifacts@0
+    displayName: Download Linux Artifacts
+    inputs:
+      artifactName: CentOS_7_Build_Release
+      downloadPath: '$(System.ArtifactsDirectory)'
+    condition: succeeded()
+
+  - task: CopyFiles@2
+    displayName: Copy Linux Artifacts
+    inputs:
+      sourceFolder: '$(System.ArtifactsDirectory)/CentOS_7_Build_Release'
+      targetFolder: '$(Build.SourcesDirectory)/artifacts/Release/bin/Linux.x64'
+    condition: succeeded()
+
+  - task: CopyFiles@2
+    displayName: Copy Linux Artifacts
+    inputs:
+      sourceFolder: '$(Build.SourcesDirectory)/artifacts/Release/bin/SOS.NETCore/netcoreapp1.0'
+      contents: 'SOS.NETCore.dll'
+      overWrite: true
+      targetFolder: '$(Build.SourcesDirectory)/artifacts/Release/bin/Linux.x64'
+    condition: succeeded()
+
+  - task: ArchiveFiles@2
+    displayName: Archive Linux Artifacts
+    inputs:
+      archiveType: tar
+      includeRootFolder: false
+      tarCompression: gz
+      rootFolderOrFile: '$(Build.SourcesDirectory)/artifacts/Release/bin/Linux.x64'
+      archiveFile: '$(Build.SourcesDirectory)/artifacts/Release/sos-linux-x64.tar.gz'
+    condition: succeeded()
+
+  # MacOS download, copy and archive
+
+  - task: DownloadBuildArtifacts@0
+    displayName: Download MacOS Artifacts
+    inputs:
+      artifactName: MacOS_Build_Release
+      downloadPath: '$(System.ArtifactsDirectory)'
+    condition: succeeded()
+
+  - task: CopyFiles@2
+    displayName: Copy MacOS Artifacts
+    inputs:
+      sourceFolder: '$(System.ArtifactsDirectory)/MacOS_Build_Release'
+      targetFolder: '$(Build.SourcesDirectory)/artifacts/Release/bin/OSX.x64'
+    condition: succeeded()
+
+  - task: CopyFiles@2
+    displayName: Copy MacOS Artifacts
+    inputs:
+      sourceFolder: '$(Build.SourcesDirectory)/artifacts/Release/bin/SOS.NETCore/netcoreapp1.0'
+      contents: 'SOS.NETCore.dll'
+      overWrite: true
+      targetFolder: '$(Build.SourcesDirectory)/artifacts/Release/bin/OSX.x64'
+    condition: succeeded()
+
+  - task: ArchiveFiles@2
+    displayName: Archive MacOS Artifacts
+    inputs:
+      archiveType: tar
+      includeRootFolder: false
+      tarCompression: gz
+      rootFolderOrFile: '$(Build.SourcesDirectory)/artifacts/Release/bin/OSX.x64'
+      archiveFile: '$(Build.SourcesDirectory)/artifacts/Release/sos-osx-x64.tar.gz'
+    condition: succeeded()
+
+  # Create nuget package and sign binaries
+
+  - script: $(Build.SourcesDirectory)\eng\cipack.cmd
+      -configuration Release
+      -prepareMachine 
+      /p:SignType=$(SignType)
+      /p:PB_PublishBlobFeedKey=$(dotnetfeed-storage-access-key-1) 
+      /p:PB_PublishBlobFeedUrl=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json
+      /p:PB_PublishType=$(PublishType)
+    displayName: Sign / Package
+    env:
+      OfficialBuildId: $(BUILD.BUILDNUMBER)
+    continueOnError: true
+    condition: succeeded()
+
+  # Optionally drop the artifacts on a share
+
+  - task: PublishBuildArtifacts@1
+    displayName: Drop Artifacts
+    inputs:
+      publishLocation: FilePath
+      pathtoPublish: '$(Build.SourcesDirectory)\artifacts\Release'
+      artifactName: '$(Build.BuildNumber)'
+      targetPath: '$(DropRoot)\DotNetCore\$(Build.DefinitionName)'
+    condition: and(succeeded(), eq(variables['DropArtifacts'], 'true'))
+
+  # Optionally publish the packages to a myget feed
+
+  - task: NuGetCommand@2
+    displayName: Publish TestHelpers to MyGet dotnet-buildtools feed
+    inputs:
+      command: custom
+      arguments: 'push $(Build.SourcesDirectory)\artifacts\Release\packages\Shipping\Microsoft.Diagnostic.TestHelpers.*.nupkg -ApiKey $(dotnet-myget-org-api-key) -Source $(MyGetBuildToolsFeed)'
+    condition: and(succeeded(), eq(variables['PushPackages'], 'true'))
 
index 075bdce948dcf84fc228e379e6286e805d9d7868..2b5bba51f4b58e44b63491656a0f5310d30d5d3f 100644 (file)
--- a/Build.cmd
+++ b/Build.cmd
@@ -1,3 +1,3 @@
 @echo off
-call %~dp0eng\Build.cmd -restore -build %*
+call %~dp0eng\Build.cmd -restore -build -build-native %*
 exit /b %ErrorLevel%
index 2475b2e3f5b8af7309f0ce883e3ac5342c4b2cce..c39471bf9854db52d9bf359dfd4a4f9663465b00 100644 (file)
@@ -20,7 +20,14 @@ if (WIN32)
 endif (WIN32)
 
 set(ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR})
-#set(VERSION_FILE_PATH "${CMAKE_BINARY_DIR}/version.cpp")
+
+# Where the version source file for xplat is generated
+set(VERSION_FILE_PATH "${CMAKE_BINARY_DIR}/version.cpp")
+
+# Where _version.h for Windows is generated
+if (WIN32)
+include_directories("${CMAKE_BINARY_DIR}")
+endif (WIN32)
 
 set(CORECLR_SET_RPATH ON)
 if(CORECLR_SET_RPATH)
index 75055e9c922b9eb3ce6993359436b7ca8e579640..3bbc31edfbf949195ba78d437748d25733722399 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -13,4 +13,4 @@ while [[ -h $source ]]; do
 done
 
 scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
-"$scriptroot/eng/build.sh" --restore --build $@
+"$scriptroot/eng/build.sh" --restore --build --build-native $@
index f5adb8e0867e47488a7991c438c1f5100f2d9fb2..a821688fd93c7d58366c6c182fb73a8e7e65ed73 100644 (file)
@@ -13,6 +13,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SOS", "SOS", "{41638A4C-0DA
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SOS.UnitTests", "src\SOS\SOS.UnitTests\SOS.UnitTests.csproj", "{1532DB3C-7DCD-45C6-B697-62B8378A16A2}"
 EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BuildTools", "eng\BuildTools.csproj", "{32F02701-A0CD-48DD-BC34-536251B90461}"
+EndProject
 Global
        GlobalSection(SolutionConfigurationPlatforms) = preSolution
                Debug|Any CPU = Debug|Any CPU
@@ -71,6 +73,18 @@ Global
                {1532DB3C-7DCD-45C6-B697-62B8378A16A2}.Release|x64.Build.0 = Release|Any CPU
                {1532DB3C-7DCD-45C6-B697-62B8378A16A2}.Release|x86.ActiveCfg = Release|Any CPU
                {1532DB3C-7DCD-45C6-B697-62B8378A16A2}.Release|x86.Build.0 = Release|Any CPU
+               {32F02701-A0CD-48DD-BC34-536251B90461}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {32F02701-A0CD-48DD-BC34-536251B90461}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {32F02701-A0CD-48DD-BC34-536251B90461}.Debug|x64.ActiveCfg = Debug|Any CPU
+               {32F02701-A0CD-48DD-BC34-536251B90461}.Debug|x64.Build.0 = Debug|Any CPU
+               {32F02701-A0CD-48DD-BC34-536251B90461}.Debug|x86.ActiveCfg = Debug|Any CPU
+               {32F02701-A0CD-48DD-BC34-536251B90461}.Debug|x86.Build.0 = Debug|Any CPU
+               {32F02701-A0CD-48DD-BC34-536251B90461}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {32F02701-A0CD-48DD-BC34-536251B90461}.Release|Any CPU.Build.0 = Release|Any CPU
+               {32F02701-A0CD-48DD-BC34-536251B90461}.Release|x64.ActiveCfg = Release|Any CPU
+               {32F02701-A0CD-48DD-BC34-536251B90461}.Release|x64.Build.0 = Release|Any CPU
+               {32F02701-A0CD-48DD-BC34-536251B90461}.Release|x86.ActiveCfg = Release|Any CPU
+               {32F02701-A0CD-48DD-BC34-536251B90461}.Release|x86.Build.0 = Release|Any CPU
        EndGlobalSection
        GlobalSection(SolutionProperties) = preSolution
                HideSolutionNode = FALSE
index fd9ed8562c91f4f57d6badffe22c66e58ffd29f1..499f24b4f1c71e80bf6ad53841b49821d4511bb9 100644 (file)
@@ -72,7 +72,7 @@ if /i "%1" == "-h"    goto Usage
 if /i "%1" == "-help" goto Usage
 if /i "%1" == "--help" goto Usage
 
-if /i "%1" == "-build"               (set __Build=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
+if /i "%1" == "-build-native"        (set __Build=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
 if /i "%1" == "-test"                (set __Test=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
 if /i "%1" == "-configuration"       (set __BuildType=%2&set processedArgs=!processedArgs! %1 %2&shift&shift&goto Arg_Loop)
 if /i "%1" == "-architecture"        (set __BuildArch=%2&set processedArgs=!processedArgs! %1 %2&shift&shift&goto Arg_Loop)
@@ -81,6 +81,7 @@ if /i "%1" == "-verbosity"           (set __Verbosity=%2&set processedArgs=!proc
 if /i "%1" == "-ci"                  (set __TestArgs=!__TestArgs! %1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
 if /i "%1" == "-solution"            (set __TestArgs=!__TestArgs! %1 %2&set processedArgs=!processedArgs! %1&shift&shift&goto Arg_Loop)
 :: These options are ignored for a native build
+if /i "%1" == "-build"               (set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
 if /i "%1" == "-rebuild"             (set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
 if /i "%1" == "-sign"                (set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
 if /i "%1" == "-restore"             (set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
@@ -152,13 +153,17 @@ REM ============================================================================
 
 @if defined _echo @echo on
 
-REM Parse the optdata package versions out of msbuild so that we can pass them on to CMake
+:: Parse the optdata package versions out of msbuild so that we can pass them on to CMake
 set DotNetCli=%__ProjectDir%\.dotnet\dotnet.exe
 if not exist "%DotNetCli%" (
-    echo %__MsgPrefix%Assertion failed: dotnet.exe not found at path "%DotNetCli%"
+    echo %__MsgPrefix%Assertion failed: dotnet cli not found at path "%DotNetCli%"
+    exit /b 1
+)
+set MSBuildPath=%__ProjectDir%\.dotnet\sdk\2.1.300\MSBuild.dll
+if not exist "%MSBuildPath%" (
+    echo %__MsgPrefix%Assertion failed: dotnet cli sdk not found at path "%MSBuildPath%"
     exit /b 1
 )
-set MSBuildPath=%__ProjectDir%\.dotnet\sdk\2.1.300-rc1-008673\msbuild.dll
 
 REM =========================================================================================
 REM ===
@@ -209,6 +214,14 @@ if %__Build% EQU 1 (
     if not exist "!VSINSTALLDIR!DIA SDK" goto NoDIA
 
 :GenVSSolution
+    echo Generating Version Header
+    set __GenerateVersionLog="%__LogDir%\GenerateVersion.binlog"
+    %DotNetCli% %MSBuildPath% %__ProjectDir%\eng\CreateVersionFile.csproj /v:!__Verbosity! /bl:!__GenerateVersionLog! /t:GenerateVersionHeader2 /p:GenerateVersionHeader=true /p:NativeVersionHeaderFile=%__IntermediatesDir%\_version.h /p:Configuration=%__BuildType% /p:Platform=%__BuildArch% %__UnprocessedBuildArgs%
+    if not !errorlevel! == 0 (
+        echo Generate Version Header FAILED
+        exit /b 1
+    )
+
     if defined __SkipConfigure goto SkipConfigure
 
     echo %__MsgPrefix%Regenerating the Visual Studio solution
@@ -229,22 +242,14 @@ if %__Build% EQU 1 (
         echo %__MsgPrefix%Error: failed to generate native component build project!
         exit /b 1
     )
+    set __BuildLog="%__LogDir%\Native.Build.binlog"
 
-    set __BuildLogRootName=Native
-    set __BuildLog="%__LogDir%\!__BuildLogRootName!.log"
-    set __BuildWrn="%__LogDir%\!__BuildLogRootName!.wrn"
-    set __BuildErr="%__LogDir%\!__BuildLogRootName!.err"
-    set __MsbuildLog=/flp:Verbosity=normal;LogFile=!__BuildLog!
-    set __MsbuildWrn=/flp1:WarningsOnly;LogFile=!__BuildWrn!
-    set __MsbuildErr=/flp2:ErrorsOnly;LogFile=!__BuildErr!
-
-    msbuild.exe %__IntermediatesDir%\install.vcxproj /v:!__Verbosity! !__MsbuildLog! !__MsbuildWrn! !__MsbuildErr! /p:Configuration=%__BuildType% /p:Platform=%__BuildArch% %__UnprocessedBuildArgs%
+    :: For some currently unknown reason, "%DotNetCli% msbuild" fails because VCTargetsPath isn't defined.
+    msbuild.exe %__IntermediatesDir%\install.vcxproj /v:!__Verbosity! /bl:!__BuildLog! /p:Configuration=%__BuildType% /p:Platform=%__BuildArch% %__UnprocessedBuildArgs%
 
-    if not !errorlevel! == 0 (
+    if not !ERRORLEVEL! == 0 (
         echo %__MsgPrefix%Error: native component build failed. Refer to the build log files for details:
         echo     !__BuildLog!
-        echo     !__BuildWrn!
-        echo     !__BuildErr!
         exit /b 1
     )
 
@@ -293,24 +298,16 @@ if /i "%__DoCrossArchBuild%"=="1" (
         echo %__MsgPrefix%Error: failed to generate cross-arch components build project!
         exit /b 1
     )
-
     if defined __ConfigureOnly goto SkipCrossCompBuild
 
-    set __BuildLogRootName=Native.Cross
-    set __BuildLog="%__LogDir%\!__BuildLogRootName!.log"
-    set __BuildWrn="%__LogDir%\!__BuildLogRootName!.wrn"
-    set __BuildErr="%__LogDir%\!__BuildLogRootName!.err"
-    set __MsbuildLog=/flp:Verbosity=normal;LogFile=!__BuildLog!
-    set __MsbuildWrn=/flp1:WarningsOnly;LogFile=!__BuildWrn!
-    set __MsbuildErr=/flp2:ErrorsOnly;LogFile=!__BuildErr!
+    set __BuildLog="%__LogDir%\Cross.Build.binlog"
 
-    msbuild.exe %__CrossCompIntermediatesDir%\install.vcxproj /v:!__Verbosity! !__MsbuildLog! !__MsbuildWrn! !__MsbuildErr! /p:Configuration=%__BuildType% /p:Platform=%__CrossArch% %__UnprocessedBuildArgs%
+    :: For some currently unknown reason, "%DotNetCli% msbuild" fails because VCTargetsPath isn't defined.
+    msbuild.exe %__CrossCompIntermediatesDir%\install.vcxproj /v:!__Verbosity! /bl:!__BuildLog! /p:Configuration=%__BuildType% /p:Platform=%__CrossArch% %__UnprocessedBuildArgs%
 
-    if not !errorlevel! == 0 (
+    if not !ERRORLEVEL! == 0 (
         echo %__MsgPrefix%Error: cross-arch components build failed. Refer to the build log files for details:
         echo     !__BuildLog!
-        echo     !__BuildWrn!
-        echo     !__BuildErr!
         exit /b 1
     )
 
@@ -336,7 +333,7 @@ if %__Test% EQU 1 (
 
     :: Run the xunit tests
     powershell -ExecutionPolicy ByPass -NoProfile -command "& """%__ProjectDir%\eng\common\Build.ps1""" -test -configuration %__BuildType% -verbosity %__Verbosity% %__TestArgs%"
-    exit /b %ERRORLEVEL
+    exit /b !ERRORLEVEL!
 )
 exit /b 0
 
@@ -356,7 +353,7 @@ echo.
 echo All arguments are optional. The options are:
 echo.
 echo.-? -h -help --help: view this message.
-echo -build - build native components
+echo -build-native - build native components
 echo -test - test components
 echo -architecture <x64|x86|arm|arm64>
 echo -configuration <debug|release>
index 16bbed608e7688143759494444c60ef9fee9c6cf..8ef13939cfa831b1884a59a41497f99778f2c75a 100644 (file)
@@ -1,13 +1,15 @@
 @echo off
 setlocal
 
-:: remove the -test option and pass it to build-native.cmd
-set "__args=%*"
-set "__args=%__args:-test=%"
+:: remove the -test and -build-native options and pass it to build-native.cmd
+set __args="%*"
+set __args=%__args:-test=%
+set __args=%__args:-build-native=%
+if %__args% == "" set __args=
 
 :: build managed components
 powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0common\Build.ps1""" %__args%"
-if NOT '%ERRORLEVEL%' == '0' exit /b %ERRORLEVEL%
+if NOT '%ERRORLEVEL%' == '0' (exit /b %ERRORLEVEL%)
 
 :: build native componments and test managed/native
 call %~dp0build-native.cmd %*
diff --git a/eng/BuildTask.targets b/eng/BuildTask.targets
deleted file mode 100644 (file)
index 6f3b536..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-<Project>
-  <PropertyGroup>
-    <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
-  </PropertyGroup>
-
-  <PropertyGroup>
-    <IncludeBuildOutput>false</IncludeBuildOutput>
-    <IsPackable>true</IsPackable>
-  </PropertyGroup>
-
-  <!--
-    Default to including all *.props and *.targets files
-    from the project directory into the NuGet package root
-  -->
-  <ItemGroup Condition="'$(EnableDefaultItems)' != 'false'">
-    <None Condition="'$(EnableDefaultNoneItems)' != 'false'"
-          Include="**/*.props;**/*.targets" Pack="true">
-      <PackagePath>%(RecursiveDir)%(Filename)%(Extension)</PackagePath>
-    </None>
-  </ItemGroup>
-
-  <ItemGroup>
-    <None Include="$(RepoRoot)LICENSE.txt" PackagePath="LICENSE.txt" Pack="true"/>
-    <None Include="$(RepoRoot)THIRD-PARTY-NOTICES.txt" PackagePath="THIRD-PARTY-NOTICES.txt" Pack="true"/>
-  </ItemGroup>
-
-  <ItemGroup>
-    <!--
-      Update all PackageReference and ProjectReference Items to have
-      PrivateAssets="All" and default Publish to true
-      This removes the dependency nodes from the generated nuspec and
-      forces the publish output to contain the dlls.
-     -->
-    <PackageReference Update="@(PackageReference)">
-      <PrivateAssets>All</PrivateAssets>
-      <Publish Condition=" '%(PackageReference.Publish)' != 'false' ">true</Publish>
-      <ExcludeAssets Condition=" '%(PackageReference.Publish)' == 'false' ">runtime</ExcludeAssets>
-    </PackageReference>
-    <ProjectReference Update="@(ProjectReference)">
-      <PrivateAssets>All</PrivateAssets>
-      <Publish Condition=" '%(ProjectReference.Publish)' != 'false' ">true</Publish>
-    </ProjectReference>
-    <!--
-      Update all Reference items to have Pack="false"
-      This removes the frameworkDependency nodes from the generated nuspec
-    -->
-    <Reference Update="@(Reference)">
-      <Pack>false</Pack>
-    </Reference>
-  </ItemGroup>
-
-  <!--
-    if $(IncludePublishOutput) it not 'false' add Publish as a dependency to Pack
-    and include TfmSpecificPackageFile items for all published files
-  -->
-  <PropertyGroup Condition="'$(IncludePublishOutput)' != 'false'">
-    <TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);CollectAssets</TargetsForTfmSpecificContentInPackage>
-  </PropertyGroup>
-  <Target Name="CollectAssets" DependsOnTargets="Publish">
-    <RemoveDuplicates Inputs="@(ResolvedFileToPublish)">
-      <Output TaskParameter="Filtered" ItemName="FilteredFileToPublish"/>
-    </RemoveDuplicates>
-    <ItemGroup>
-      <TfmSpecificPackageFile
-        Include="@(FilteredFileToPublish->'$([MSBuild]::NormalizeDirectory($(PublishDir)))%(RelativePath)')"
-        Condition="'%(FilteredFileToPublish.AssetType)' != 'resources'">
-        <PackagePath>tools/$(TargetFramework)/%(FilteredFileToPublish.RelativePath)</PackagePath>
-      </TfmSpecificPackageFile>
-    </ItemGroup>
-  </Target>
-</Project>
diff --git a/eng/BuildTools.csproj b/eng/BuildTools.csproj
new file mode 100644 (file)
index 0000000..01dcd13
--- /dev/null
@@ -0,0 +1,41 @@
+<!-- Copyright (c)  Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information. -->
+<Project>
+  <Import Project="Sdk.props" Sdk="RoslynTools.RepoToolset" />
+
+  <PropertyGroup>
+    <TargetFramework>netcoreapp2.1</TargetFramework>
+    <RelativeOutputPath>BuildTools</RelativeOutputPath>
+  </PropertyGroup>
+
+  <ItemGroup>
+    <PackageReference Include="Microsoft.DotNet.BuildTools" Version="$(MicrosoftDotNetBuildToolsVersion)" />
+  </ItemGroup>
+
+  <Import Project="Sdk.targets" Sdk="RoslynTools.RepoToolset" />
+
+  <Target Name="Build" DependsOnTargets="RestoreBeforeBuild;CopyRestoredItemsToDirectory"/>
+    
+  <Target Name="RestoreBeforeBuild" DependsOnTargets="Restore" Condition="'$(SkipRestore)' != 'true'" />
+
+  <Target Name="CopyRestoredItemsToDirectory" DependsOnTargets="GetAssemblyVersion" >
+
+    <ItemGroup>
+      <BuildToolsSourceFiles Include="$(NuGetPackageRoot)\microsoft.dotnet.buildtools\$(MicrosoftDotNetBuildToolsVersion)\lib\**\*" />
+    </ItemGroup>
+
+    <Copy
+      SourceFiles="@(BuildToolsSourceFiles)"
+      DestinationFiles="@(BuildToolsSourceFiles -> '$(ArtifactsDir)$(RelativeOutputPath)\%(RecursiveDir)%(Filename)%(Extension)')"
+      SkipUnchangedFiles="true"
+      OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
+      Retries="$(CopyRetryCount)"
+      RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
+      UseHardlinksIfPossible="false">
+      
+      <Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
+    </Copy>
+  
+    <Message Importance="High" Text="$(MSBuildProjectName) copied to $(ArtifactsDir)$(RelativeOutputPath)" />
+  </Target>
+
+</Project>
index 2cd76c23c800793340bb04479defd2557853d508..6ed2ac84156323581e82557a9ca0d05e1f3ff4d3 100644 (file)
@@ -1,3 +1,3 @@
 @echo off
-call %~dp0Build.cmd -restore -build -test -publish -sign -pack -ci %*
+call %~dp0Build.cmd -restore -build -build-native -test -publish -ci %*
 exit /b %ErrorLevel%
diff --git a/eng/CreateVersionFile.csproj b/eng/CreateVersionFile.csproj
new file mode 100644 (file)
index 0000000..525194b
--- /dev/null
@@ -0,0 +1,58 @@
+<Project Sdk="RoslynTools.RepoToolset" >
+
+  <PropertyGroup>
+    <OfficialBuildId Condition="'$(OfficialBuildId)' == ''">$(BUILD_BUILDNUMBER)</OfficialBuildId>
+  </PropertyGroup>
+
+  <Import Project="$(ArtifactsDir)\BuildTools\Build.Common.props" />
+  <Import Project="$(ArtifactsDir)\BuildTools\versioning.targets" />
+
+  <PropertyGroup>
+    <BuildVersionFileOverride>$(BuildVersionFilePath)BuildVersion2-$(TodayTimeStamp).props</BuildVersionFileOverride>
+    <ShouldCreateVersionFileOverride Condition="!Exists('$(BuildVersionFileOverride)')">true</ShouldCreateVersionFileOverride>
+  </PropertyGroup>
+
+  <Import Condition="Exists('$(BuildVersionFileOverride)')" Project="$(BuildVersionFileOverride)" />
+
+  <Target Name="GenerateVersionHeader2" DependsOnTargets="CreateVersionFileOverride;GenerateVersionHeader"/>
+
+  <Target Name="GenerateVersionSourceFile2" DependsOnTargets="CreateVersionFileOverride;GenerateVersionSourceFile"/>
+
+  <Target Name="CreateVersionFileOverride" 
+          Condition="'$(SkipVersionGeneration)' != 'true' AND '$(ShouldCreateVersionFileOverride)' == 'true'"
+          DependsOnTargets="CreateVersionFileDuringBuild">
+    <!--
+      All of this is to override the BuildTools version major/minor to what RoslynTools.RepoToolSet does.
+    -->
+    <PropertyGroup>
+      <FileVersion Condition="'$(_BuildNumberFiveDigitDateStamp)' != ''">$(MajorVersion).$(MinorVersion).$(_BuildNumberFiveDigitDateStamp).$(_BuildNumberBuildOfTheDayPadded)</FileVersion>
+      <BuildNumberMajor Condition="'$(_BuildNumberFiveDigitDateStamp)' != ''">$(_BuildNumberFiveDigitDateStamp)</BuildNumberMajor>
+      <BuildNumberMinor Condition="'$(_BuildNumberBuildOfTheDayPadded)' != ''">$(_BuildNumberBuildOfTheDayPadded)</BuildNumberMinor>
+
+      <VersionFileOverrideContent>
+        <![CDATA[<?xml version="1.0" encoding="utf-8"?>
+<!-- This is a generated file. -->
+<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <FileVersion>$(FileVersion)</FileVersion>
+    <BuildNumberMajor>$(BuildNumberMajor)</BuildNumberMajor>
+    <BuildNumberMinor>$(BuildNumberMinor)</BuildNumberMinor>
+  </PropertyGroup>
+</Project>
+]]>
+      </VersionFileOverrideContent>
+    </PropertyGroup>
+
+    <MakeDir Directories="$(BuildVersionFilePath)" />
+
+    <WriteLinesToFile
+      ContinueOnError="WarnAndContinue"
+      Condition="!Exists('$(BuildVersionFileOverride)')"
+      File="$(BuildVersionFileOverride)"
+      Lines="$(VersionFileOverrideContent)"
+      Overwrite="true" />
+
+    <Message Importance="High" Text="Created version override file $(BuildVersionFileOverride)" />
+  </Target>
+
+</Project>
diff --git a/eng/GalleryManifest.xml b/eng/GalleryManifest.xml
new file mode 100644 (file)
index 0000000..60f7cb8
--- /dev/null
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<ExtensionPackage>
+    <Name>SOS</Name>
+    <Version>1.0.0.0</Version> 
+    <Description>Debugging aid for .NET Core programs and runtimes</Description>
+    <Components>
+        <BinaryComponent Name="sos" Type="Engine">
+            <Files>
+                <File Architecture="amd64" Module="x64\sos.dll" />
+                <File Architecture="x86"   Module="x86\sos.dll" />
+            </Files>
+            <LoadTriggers>
+                <TriggerSet>
+                    <ModuleTrigger Name="coreclr.dll" />
+                </TriggerSet>
+            </LoadTriggers>
+            <EngineCommands>
+                <EngineCommand Name="clrstack">
+                    <EngineCommandItem>
+                        <Syntax>!clrstack</Syntax>
+                        <Description>Provides a stack trace of managed code only</Description>
+                    </EngineCommandItem>
+                </EngineCommand>
+                <EngineCommand Name="clrthreads">
+                    <EngineCommandItem>
+                        <Syntax>!clrthreads</Syntax>
+                        <Description>List the managed threads running</Description>
+                    </EngineCommandItem>
+                </EngineCommand>
+                <EngineCommand Name="soshelp">
+                    <EngineCommandItem>
+                        <Syntax>!soshelp</Syntax>
+                        <Description>Displays all available SOS commands or details about the command</Description>
+                    </EngineCommandItem>
+                </EngineCommand>
+            </EngineCommands>
+        </BinaryComponent>
+    </Components>
+</ExtensionPackage>
index aede136932e065ee111d71d20fe9bd3b76b126f1..1592fa20d885766ad7dba2b180ad5836a4abc408 100644 (file)
@@ -4,8 +4,15 @@
       "certificate": "MicrosoftSHA2",
       "strongName": "MsSharedLib72",
       "values": [
+        "bin/Microsoft.Diagnostic.TestHelpers/netcoreapp2.0/Microsoft.Diagnostic.TestHelpers.dll",
         "bin/SOS.NETCore/netcoreapp1.0/SOS.NETCore.dll",
-        "bin/Microsoft.Diagnostic.TestHelpers/netcoreapp2.0/Microsoft.Diagnostic.TestHelpers.dll"
+      ]
+    },
+    {
+      "certificate": "MicrosoftSHA2",
+      "values": [
+        "bin/Windows_NT.x64/sos.dll",
+        "bin/Windows_NT.x86/sos.dll"
       ]
     },
     {
       "values": [
         "packages/Shipping/*.nupkg"
       ]
+    },
+    {
+      "certificate": null,
+      "strongName": null,
+      "values": [
+        "*.zip"
+      ]
     }
   ],
   "exclude": [
index 50a3d66130e77dba45bbd8f7dae422b6ce7e55c8..c8e1daacb1d390714083447105f9bd09e8bf7d3d 100644 (file)
@@ -7,6 +7,7 @@
     <VersionPrefix>1.0.0</VersionPrefix>
     <PreReleaseVersionLabel>beta</PreReleaseVersionLabel>
   
+    <MicrosoftDotNetBuildToolsVersion>2.2.0-preview1-03108-01</MicrosoftDotNetBuildToolsVersion>
     <RoslynToolsSignToolVersion>1.0.0-beta2-63127-01</RoslynToolsSignToolVersion>
     <MicrosoftNetCompilersVersion>2.8.0-beta6-62830-08</MicrosoftNetCompilersVersion>
     <UsingToolNetFrameworkReferenceAssemblies>true</UsingToolNetFrameworkReferenceAssemblies>
index 868e1e4329a714523286cebfe30ae880264462e2..c556b47c02b4e43fb7d2dec08dead164cd01adb1 100755 (executable)
@@ -28,36 +28,19 @@ __CrossBuild=0
 __NumProc=1
 __Build=0
 __Test=0
+__CI=0
 __TestArgs=
 __UnprocessedBuildArgs=
 
-# resolve python-version to use
-if [ "$PYTHON" == "" ] ; then
-    if ! PYTHON=$(command -v python2.7 || command -v python2 || command -v python)
-    then
-       echo "Unable to locate build-dependency python2.x!" 1>&2
-       exit 1
-    fi
-fi
-
-# validate python-dependency
-# useful in case of explicitly set option.
-if ! command -v $PYTHON > /dev/null
-then
-   echo "Unable to locate build-dependency python2.x ($PYTHON)!" 1>&2
-   exit 1
-fi
-
-echo $PYTHON
-
 usage()
 {
     echo "Usage: $0 [options]"
-    echo "--build - build native components"
+    echo "--build-native - build native components"
     echo "--test - test native components"
     echo "--architecture <x64|x86|arm|armel|arm64>"
     echo "--configuration <debug|release>"
     echo "--clangx.y - optional argument to build using clang version x.y"
+    echo "--ci - CI lab build"
     echo "--verbosity <q[uiet]|m[inimal]|n[ormal]|d[etailed]|diag[nostic]>"
     echo "--help - this help message"
     exit 1
@@ -169,21 +152,23 @@ while :; do
             exit 1
             ;;
 
-        --build)
+        --build-native)
             __Build=1
             ;;
 
+        # Passed to common build script when testing
         --test)
             __Test=1
             ;;
 
-        # Passed to common build script when testing
         --ci)
+            __CI=1
             __TestArgs="$__TestArgs $1"
             ;;
 
         --solution)
             __TestArgs="$__TestArgs $1 $2"
+            shift
             ;;
 
         --verbosity)
@@ -191,10 +176,6 @@ while :; do
             shift
             ;;
 
-        # Ignored for a native build
-        --rebuild|--sign|--restore|--pack|--publish|--preparemachine)
-            ;;
-
         --configuration)
             __BuildType="$(to_lowercase "$2")"
             shift
@@ -245,6 +226,10 @@ while :; do
             shift
             ;;
 
+        # Ignored for a native build
+        --build|--rebuild|--sign|--restore|--pack|--publish|--preparemachine)
+            ;;
+
         *)
             __UnprocessedBuildArgs="$__UnprocessedBuildArgs $1"
             ;;
@@ -260,6 +245,33 @@ if [ "$__BuildType" == "debug" ]; then
     __BuildType=Debug
 fi
 
+# Needs to be set for generate version source file/msbuild
+if [[ -z $NUGET_PACKAGES ]]; then
+    if [[ $__CI ]]; then
+        export NUGET_PACKAGES="$__ProjectRoot/.packages"
+    else
+        export NUGET_PACKAGES="$HOME/.nuget/packages"
+    fi
+fi
+
+# Resolve python-version to use
+if [ "$PYTHON" == "" ] ; then
+    if ! PYTHON=$(command -v python2.7 || command -v python2 || command -v python)
+    then
+       echo "Unable to locate build-dependency python2.x!" 1>&2
+       exit 1
+    fi
+fi
+
+# Validate python-dependency. Useful in case of explicitly set option.
+if ! command -v $PYTHON > /dev/null
+then
+   echo "Unable to locate build-dependency python2.x ($PYTHON)!" 1>&2
+   exit 1
+fi
+
+echo $PYTHON
+
 __RootBinDir=$__ProjectRoot/artifacts
 __ConfigBinDir=$__RootBinDir/$__BuildType
 __BinDir=$__ConfigBinDir/bin/$__BuildOS.$__BuildArch
@@ -268,6 +280,17 @@ __IntermediatesDir=$__RootBinDir/obj/$__BuildOS.$__BuildArch.$__BuildType
 __ResultsDir=$__ConfigBinDir/TestResults
 __PackagesBinDir=$__ConfigBinDir/packages
 __ExtraCmakeArgs=-DCLR_MANAGED_BINARY_DIR=$__ConfigBinDir/bin
+__DotNetCli=$__ProjectRoot/.dotnet/dotnet
+__MSBuildPath=$__ProjectRoot/.dotnet/sdk/2.1.300/MSBuild.dll
+
+if [ ! -e $__DotNetCli ]; then
+   echo "dotnet cli not installed $__DotNetCli"
+   exit 1
+fi
+if [ ! -e $__MSBuildPath ]; then
+   echo "dotnet cli sdk not installed $__MSBuildPath"
+   exit 1
+fi
 
 # Specify path to be set for CMAKE_INSTALL_PREFIX.
 # This is where all built native libraries will copied to.
@@ -427,6 +450,14 @@ fi
 
 # Build native components
 if [ $__Build == 1 ]; then
+    echo "Generating Version Source File"
+    __GenerateVersionLog="$__LogDir/GenerateVersion.binlog"
+    $__DotNetCli $__MSBuildPath $__ProjectRoot/eng/CreateVersionFile.csproj /noconlog /bl:$__GenerateVersionLog /t:GenerateVersionSourceFile2 /p:GenerateVersionSourceFile=true /p:NativeVersionSourceFile="$__IntermediatesDir/version.cpp" /p:Configuration="$__BuildType" /p:Platform="$__BuildArch" $__UnprocessedBuildArgs
+    if [ $? != 0 ]; then
+        echo "Generating Version Source File FAILED"
+        exit 1
+    fi
+
     build_native "$__BuildArch" "$__IntermediatesDir" "$__ExtraCmakeArgs"
 fi
 
index 73db5193676f428334352842fc5a304bdd19e920..ed8e0e9851b93bba1cf700005e61a98411f78f4d 100755 (executable)
@@ -17,7 +17,7 @@ done
 scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
 
 # remove the options that build.sh can't handle and pass it to build-native.sh
-__args="$(echo $@ | sed 's/--test//g;s/--clang[0-9]\.[0-9]//g')"
+__args="$(echo $@ | sed 's/--test//g;s/--build-native//g;s/--clang[0-9]\.[0-9]//g')"
 
 # build managed components
 "$scriptroot/common/build.sh" $__args
index 17a66c285c454a131b6f63a40ba44d16f9953fc6..6bf5430eab27f11669ebb86b6cf7027c4e40f7ef 100644 (file)
 #   agentOs: [Windows_NT (default), Linux, OSX] Used in templates to define variables which are OS specific
 #   dockerImage: If defined, specifies docker image to run build steps in
 #   matrix: build matrix
-#   queueName: agent pool name
 #   enableTelemetry: send telemetry if build is not a PR or CI build
+#   queue YAML object - https://github.com/Microsoft/vsts-agent/blob/master/docs/preview/yamlgettingstarted-schema.md#queue
+#   variables YAML object - https://github.com/Microsoft/vsts-agent/blob/master/docs/preview/yamlgettingstarted-schema.md#phase
 
 parameters:
   phaseName: ''
   agentOs: Windows_NT
   dockerImage: ''
+  testOnly: false
+  dependsOn: ''
   enableTelemetry: true
   queue: {}
-  useEsrpSigning: true
+  variables: {}
 
 phases:
 - template: /eng/common/templates/phases/base.yml
   parameters:
+    name: ${{ parameters.phaseName }}
     agentOs: ${{ parameters.agentOs }}
-    buildConfig: $(_BuildConfig)
-    phaseName: ${{ parameters.phaseName }}
+    dependsOn: ${{ parameters.dependsOn }}
     enableTelemetry: ${{ parameters.enableTelemetry }}
-    helixType: build/product
-    ${{ if notIn(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'PullRequest') }}:
-      helixSource: official/dotnet/arcade/$(Build.SourceBranch)
-    ${{ if in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'PullRequest') }}:
-      helixSource: pr/dotnet/arcade/$(Build.SourceBranch)
-    phase:
-      queue: ${{ parameters.queue }}
-      variables: 
-        _DockerImageName: ${{ parameters.dockerImage }}
-        _PhaseName : ${{ parameters.phaseName }}
-        ${{ if notIn(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'PullRequest') }}:
-          _PublishBlobFeedUrl: https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json
-          _TeamName: DotNetCore
-          _UseEsrpSigning: ${{ parameters.useEsrpSigning }}
-        ${{ if notIn(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'PullRequest') }}:
-          _PublishArgs: /p:PB_PublishBlobFeedKey=$(dotnetfeed-storage-access-key-1) 
-            /p:PB_PublishBlobFeedUrl=$(_PublishBlobFeedUrl) 
-            /p:PB_PublishType=$(_PublishType) 
-        ${{ if in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'PullRequest') }}:
-          _PublishArgs: ''
+    queue: ${{ parameters.queue }}
 
-      steps:
-      - template: /eng/common/templates/steps/run-on-windows.yml
-        parameters:
-          agentOs: ${{ parameters.agentOs }} 
-          steps:
-          - template: /eng/common/templates/steps/build-reason.yml
-            parameters:
-              conditions: not IndividualCI,BatchedCI,PullRequest
-              steps:
-              - task: ms-vseng.MicroBuildTasks.30666190-6959-11e5-9f96-f56098202fef.MicroBuildSigningPlugin@1
-                displayName: Install MicroBuild plugin
-                inputs:
-                  signType: $(_SignType)
-                  zipSources: false
-                  esrpSigning: $(_UseEsrpSigning)
-                env:
-                  TeamName: $(_TeamName)
-                continueOnError: false
-                condition: and(succeeded(), in(variables._SignType, 'real', 'test'))
-              - task: AzureKeyVault@1
-                inputs:
-                  azureSubscription: 'DotNet-Engineering-Services_KeyVault'
-                  KeyVaultName: EngKeyVault
-                  SecretsFilter: 'dotnetfeed-storage-access-key-1'
-                condition: succeeded()
-          - script: $(Build.SourcesDirectory)\eng\cibuild.cmd
-              -configuration $(_BuildConfig) 
-              -architecture $(_BuildArch)
-              -prepareMachine 
-              /p:SignType=$(_SignType)
-              $(_PublishArgs)
-            name: Build_Test
-            displayName: Build / Test
-            env:
-              OfficialBuildId: $(BUILD.BUILDNUMBER)
-            condition: succeeded()
+    variables: 
+      ${{ insert }}: ${{ parameters.variables }}
+      _PortableLinuxBuild: CentOS_7_Build_$(_BuildConfig)
+      _DockerImageName: ${{ parameters.dockerImage }}
+      _PhaseName : ${{ parameters.phaseName }}
+      _HelixType: build/product
+      _HelixBuildConfig: $(_BuildConfig)
+      ${{ if notIn(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'PullRequest') }}:
+        _HelixSource: official/dotnet/arcade/$(Build.SourceBranch)
+        ${{ if eq(parameters.testOnly, 'true') }}:
+          _LinuxScript: $(Build.SourcesDirectory)/eng/citest.sh
+        ${{ if ne(parameters.testOnly, 'true') }}:
+          _LinuxScript: $(Build.SourcesDirectory)/eng/cibuild.sh
+      ${{ if in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'PullRequest') }}:
+        _HelixSource: pr/dotnet/arcade/$(Build.SourceBranch)
+        _LinuxScript: $(Build.SourcesDirectory)/eng/cibuild.sh
 
-      - ${{ if eq(parameters.agentOs, 'Linux') }}:
-        - script: $(Build.SourcesDirectory)/eng/docker-cibuild.sh 
-            --docker-image $(_DockerImageName)
-            --source-directory $(Build.SourcesDirectory)
-            --container-name diagnostics-$(Build.BuildId)
-            --configuration $(_BuildConfig) 
-            --architecture $(_BuildArch)
-            --prepareMachine 
-            /p:SignType=$(_SignType)
-            $(_PublishArgs)
-          name: Build_Test
-          displayName: Docker Build / Test
+    steps:
+    # Internal only build steps
+    - template: /eng/common/templates/steps/run-on-windows.yml
+      parameters:
+        agentOs: ${{ parameters.agentOs }} 
+        steps:
+        - script: $(Build.SourcesDirectory)\eng\cibuild.cmd
+            -configuration $(_BuildConfig) 
+            -architecture $(_BuildArch)
+            -prepareMachine 
+          displayName: Build / Test
           env:
             OfficialBuildId: $(BUILD.BUILDNUMBER)
           condition: succeeded()
 
-      - ${{ if eq(parameters.agentOs, 'Darwin') }}:
-        - script: $(Build.SourcesDirectory)/eng/cibuild.sh
-            --configuration $(_BuildConfig) 
-            --architecture $(_BuildArch)
-            --prepareMachine
-            /p:SignType=$(_SignType)
-            $(_PublishArgs)
-          name: Build_Test
-          displayName: Build / Test
-          env:
-            OfficialBuildId: $(BUILD.BUILDNUMBER)
+    - ${{ if eq(parameters.agentOs, 'Linux') }}:
+      - ${{ if eq(parameters.testOnly, 'true') }}:
+        - task: DownloadBuildArtifacts@0
+          displayName: Download Linux-x64 Artifacts
+          inputs:
+            artifactName: $(_PortableLinuxBuild)
+            downloadPath: '$(System.ArtifactsDirectory)'
           condition: succeeded()
 
-      - template: /eng/common/templates/steps/build-reason.yml
-        parameters:
-          conditions: not IndividualCI,BatchedCI,PullRequest
-          steps:
-          - task: CopyFiles@2
-            displayName: Gather Logs
-            inputs:
-              SourceFolder: '$(Build.SourcesDirectory)/artifacts'
-              Contents: '**/*log'
-              TargetFolder: '$(Build.StagingDirectory)/BuildLogs'
-            continueOnError: true
-            condition: always()
+        - task: CopyFiles@2
+          displayName: Place Linux-x64 Artifacts
+          inputs:
+            sourceFolder: '$(System.ArtifactsDirectory)/$(_PortableLinuxBuild)'
+            targetFolder: '$(Build.SourcesDirectory)/artifacts/$(_BuildConfig)/bin/Linux.x64'
+          condition: succeeded()
+
+      - script: $(Build.SourcesDirectory)/eng/docker-build.sh 
+          --docker-image $(_DockerImageName)
+          --source-directory $(Build.SourcesDirectory)
+          --container-name diagnostics-$(Build.BuildId)
+          $(_LinuxScript)
+          --configuration $(_BuildConfig) 
+          --architecture $(_BuildArch)
+          --prepareMachine 
+          /p:BUILD_BUILDNUMBER=$(BUILD.BUILDNUMBER)
+        displayName: Docker Build / Test
+        env:
+          OfficialBuildId: $(BUILD.BUILDNUMBER)
+        condition: succeeded()
+
+    - ${{ if eq(parameters.agentOs, 'Darwin') }}:
+      - script: $(Build.SourcesDirectory)/eng/cibuild.sh
+          --configuration $(_BuildConfig) 
+          --architecture $(_BuildArch)
+          --prepareMachine
+        displayName: Build / Test
+        env:
+          OfficialBuildId: $(BUILD.BUILDNUMBER)
+        condition: succeeded()
+    # Internal only build steps (until publishing artifacts in public CI is supported)
+    - template: /eng/common/templates/steps/build-reason.yml
+      parameters:
+        conditions: not IndividualCI,BatchedCI,PullRequest
+        steps:
+        - task: PublishBuildArtifacts@1
+          displayName: Upload Artifacts
+          inputs:
+            pathtoPublish: '$(Build.SourcesDirectory)/artifacts/$(_BuildConfig)/$(_PublishArtifacts)'
+            artifactName: $(_PhaseName)_$(Agent.JobName)
+          condition: and(succeeded(), ne(variables['_PublishArtifacts'], ''))
+
+        - task: CopyFiles@2
+          displayName: Gather Build Logs
+          inputs:
+            sourceFolder: '$(Build.SourcesDirectory)/artifacts/$(_BuildConfig)/log'
+            targetFolder: '$(Build.StagingDirectory)/BuildLogs'
+          continueOnError: true
+          condition: always()
+
+        - task: CopyFiles@2
+          displayName: Gather Test Logs
+          inputs:
+            sourceFolder: '$(Build.SourcesDirectory)/artifacts/$(_BuildConfig)/TestResults'
+            targetFolder: '$(Build.StagingDirectory)/BuildLogs'
+          continueOnError: true
+          condition: always()
 
-          - task: PublishBuildArtifacts@1
-            displayName: Publish Logs to VSTS
-            inputs:
-              PathtoPublish: '$(Build.StagingDirectory)/BuildLogs'
-              PublishLocation: Container
-              ${{ if eq(parameters.agentOs, 'Windows_NT') }}:
-                ArtifactName: Windows_NT_$(Agent.JobName)
-              ${{ if ne(parameters.agentOs, 'Windows_NT') }}:
-                ArtifactName: Linux_$(_PhaseName)_$(Agent.JobName)
-            continueOnError: true
-            condition: always()
+        - task: PublishBuildArtifacts@1
+          displayName: Publish Logs to VSTS
+          inputs:
+            pathtoPublish: '$(Build.StagingDirectory)/BuildLogs'
+            artifactName: Logs_$(_PhaseName)_$(Agent.JobName)
+          continueOnError: true
+          condition: always()
index 632885f06df89b34e3485c47250e0632a1e03741..1a064f68541e85404a9f1125df13dd39e8ae8bba 100755 (executable)
@@ -37,7 +37,7 @@ if [ "$__osname" == "Linux" ]; then
     fi
 fi
 
-"$scriptroot/build.sh" --restore --build --test --publish --pack --ci $@
+"$scriptroot/build.sh" --restore --build --build-native --test --publish --ci $@
 if [[ $? != 0 ]]; then
     exit 1
 fi
diff --git a/eng/cipack.cmd b/eng/cipack.cmd
new file mode 100644 (file)
index 0000000..b26c4a4
--- /dev/null
@@ -0,0 +1,3 @@
+@echo off
+powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0common\Build.ps1""" -restore -sign -pack %*"
+exit /b %ErrorLevel%
diff --git a/eng/citest.sh b/eng/citest.sh
new file mode 100755 (executable)
index 0000000..4057516
--- /dev/null
@@ -0,0 +1,44 @@
+#!/usr/bin/env bash
+# Copyright (c) .NET Foundation and contributors. All rights reserved.
+# Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+source="${BASH_SOURCE[0]}"
+
+# resolve $SOURCE until the file is no longer a symlink
+while [[ -h $source ]]; do
+  scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
+  source="$(readlink "$source")"
+
+  # if $source was a relative symlink, we need to resolve it relative to the path where 
+  # the symlink file was located
+  [[ $source != /* ]] && source="$scriptroot/$source"
+done
+
+scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
+
+# Fix any CI lab docker image problems
+
+__osname=$(uname -s)
+if [ "$__osname" == "Linux" ]; then
+    if [ -e /etc/os-release ]; then
+        source /etc/os-release
+        if [[ $ID == "ubuntu" ]]; then
+            if [[ $VERSION_ID == "18.04" ]]; then
+                # Fix the CI lab's ubuntu 18.04 docker image: install curl.
+                sudo apt-get update
+                sudo apt-get install -y curl
+            fi
+        fi
+    elif [ -e /etc/redhat-release ]; then
+        __redhatRelease=$(</etc/redhat-release)
+        if [[ $__redhatRelease == "CentOS release 6."* || $__redhatRelease == "Red Hat Enterprise Linux Server release 6."* ]]; then
+            source scl_source enable python27 devtoolset-2
+        fi
+    fi
+fi
+
+# Restore and build just the managed components (test infrastructure)
+"$scriptroot/build.sh" --restore --build --test --ci $@
+if [[ $? != 0 ]]; then
+    exit 1
+fi
index 8e137491469913202691f497fa2a32e7b613ae0d..346941ee2343173c1a2f452eb9011e825922bda1 100644 (file)
@@ -1,58 +1,71 @@
-# base.yml
-# Description: Expands a phase object, applying telemetry, docker info, etc...
-# Parameters:
-#   agentOs: [Windows_NT (default), Linux, OSX] Used in templates to define variables which are OS specific
-#   buildConfig: buildConfiguration property provided to telemetry
-#   dockerImage: If defined, specifies docker image to run build steps in
-#   enableTelemetry: send telemetry if build is not a PR or CI build
-#   fetchDepth: Limit fetching to the specified number of commits from the tip of each remote branch history
-#   helixSource: telemetry source to report
-#   helixType: telemetry type to report
-#   phaseName: name of phase
-#   phase: defined phase object
-
 parameters:
-  agentOs: Windows_NT
-  buildConfig: ''
+  # Optional: Clean sources before building
   clean: true
-  dockerImage: ''
-  enableTelemetry: ''
+
+  # Optional: Git fetch depth
   fetchDepth: ''
-  helixSource: 'undefined_defaulted_in_base.yml'
-  helixType: 'undefined_defaulted_in_base.yml'
-  phaseName: ''
-  phase: {}
+
+  # Optional: name of the phase (not specifying phase name may cause name collisions)
+  name: ''
+
+  # Phase dependencies
+  dependsOn: ''
+
+  # Required: A defined YAML queue
+  queue: {}
+
+  # Required: build steps
+  steps: []
+
+  # Optional: variables
+  variables: {}
+
+  ## Telemetry variables
+
+  # Required: determines whether to run cmd or sh telemetry files
+  agentOs: Windows_NT
+
+  # Optional: enable sending telemetry
+  #           if enabled, these "variables" must be specified in the variables object
+  #             _HelixBuildConfig - differentiate between Debug, Release, other
+  #             _HelixSource - Example: build/product
+  #             _HelixType - Example: official/dotnet/arcade/$(Build.SourceBranch)
+  enableTelemetry: false
 
 phases:
-- phase: ${{ parameters.phaseName }}
-  queue: ${{ parameters.phase.queue }}
-  ${{ if and(ne(parameters.phase.variables, ''), eq(parameters.dockerImage, '')) }}:
-    variables: ${{ parameters.phase.variables }}
-  ${{ if ne(parameters.dockerImage, '') }}:
-    variables:
-      _PREVIEW_VSTS_DOCKER_IMAGE: ${{ parameters.dockerImage }}
-      ${{ insert }}: ${{ parameters.phase.variables }}
+- phase: ${{ parameters.name }}
+
+  dependsOn: ${{ parameters.dependsOn }}
+
+  queue: ${{ parameters.queue }}
+
+  ${{ if ne(parameters.variables, '') }}:
+    variables: ${{ parameters.variables }}
+
   steps:
   - checkout: self
     clean: ${{ parameters.clean }}
     ${{ if ne(parameters.fetchDepth, '') }}:
       fetchDepth: ${{ parameters.fetchDepth }}
-  - template: /eng/common/templates/steps/build-reason.yml
-    parameters:
-      conditions: not IndividualCI,BatchedCI,PullRequest
-      steps:
-      - ${{ if eq(parameters.enableTelemetry, 'true') }}:
-        - template: /eng/common/templates/steps/telemetry.yml
-          parameters:
-            agentOs: ${{ parameters.agentOs }}
-            buildConfig: ${{ parameters.buildConfig }}
-            helixSource: ${{ parameters.helixSource }}
-            helixType: ${{ parameters.helixType }}
-            steps: ${{ parameters.phase.steps }}
-      - ${{ if not(eq(parameters.enableTelemetry, 'true')) }}:
-        - ${{ parameters.phase.steps }}
-  - template: /eng/common/templates/steps/build-reason.yml
-    parameters:
-      conditions: IndividualCI,BatchedCI,PullRequest
-      steps:
-      - ${{ parameters.phase.steps }}
+
+  - ${{ if eq(parameters.enableTelemetry, 'true') }}:
+    # Remove this condition once telemetry can be sent from public CI
+    - ${{ if notIn(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'PullRequest') }}:
+      - template: /eng/common/templates/steps/telemetry-start.yml
+        parameters:
+          agentOs: ${{ parameters.agentOs }}
+          buildConfig: ${{ parameters.variables._HelixBuildConfig }}
+          helixSource: ${{ parameters.variables._HelixSource }}
+          helixType: ${{ parameters.variables._HelixType }}
+
+  # Run provided build steps
+  - ${{ parameters.steps }}
+
+  - ${{ if eq(parameters.enableTelemetry, 'true') }}:
+    # Remove this condition once telemetry can be sent from public CI
+    - ${{ if notIn(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'PullRequest') }}:
+      - template: /eng/common/templates/steps/telemetry-end.yml
+        parameters:
+          agentOs: ${{ parameters.agentOs }}
+          helixSource: ${{ parameters.variables._HelixSource }}
+          helixType: ${{ parameters.variables._HelixType }}
diff --git a/eng/common/templates/steps/run-script-ifequalelse.yml b/eng/common/templates/steps/run-script-ifequalelse.yml
new file mode 100644 (file)
index 0000000..3d1242f
--- /dev/null
@@ -0,0 +1,33 @@
+parameters:
+  # if parameter1 equals parameter 2, run 'ifScript' command, else run 'elsescript' command
+  parameter1: ''
+  parameter2: ''
+  ifScript: ''
+  elseScript: ''
+
+  # name of script step
+  name: Script
+
+  # display name of script step
+  displayName: If-Equal-Else Script
+
+  # environment
+  env: {}
+
+  # conditional expression for step execution
+  condition: ''
+
+steps:
+- ${{ if and(ne(parameters.ifScript, ''), eq(parameters.parameter1, parameters.parameter2)) }}:
+  - script: ${{ parameters.ifScript }}
+    name: ${{ parameters.name }}
+    displayName: ${{ parameters.displayName }}
+    env: ${{ parameters.env }}
+    condition: ${{ parameters.condition }}
+
+- ${{ if and(ne(parameters.elseScript, ''), ne(parameters.parameter1, parameters.parameter2)) }}:
+  - script: ${{ parameters.elseScript }}
+    name: ${{ parameters.name }}
+    displayName: ${{ parameters.displayName }}
+    env: ${{ parameters.env }}
+    condition: ${{ parameters.condition }}
\ No newline at end of file
diff --git a/eng/common/templates/steps/telemetry-end.yml b/eng/common/templates/steps/telemetry-end.yml
new file mode 100644 (file)
index 0000000..6efd47d
--- /dev/null
@@ -0,0 +1,35 @@
+parameters:
+  agentOs: Windows_NT
+  helixSource: 'undefined_defaulted_in_telemetry.yml'
+  helixType: 'undefined_defaulted_in_telemetry.yml'
+
+steps:
+- template: /eng/common/templates/steps/run-on-unix.yml
+  parameters:
+    agentOs: ${{ parameters.agentOs }}
+    steps:
+      - bash: |
+          /bin/bash ./telemetry/build/end.sh
+        workingDirectory: $(Build.SourcesDirectory)/eng/common
+        displayName: Send Build End Telemetry
+        env:
+          # defined via VSTS variables in start-job.sh
+          Helix_JobToken: $(Helix_JobToken)
+          Helix_WorkItemId: $(Helix_WorkItemId)
+        condition: always()
+- template: /eng/common/templates/steps/run-on-windows.yml
+  parameters:
+    agentOs: ${{ parameters.agentOs }}
+    steps:
+      - powershell: |
+          ./telemetry/build/end.ps1
+          if ($LASTEXITCODE -ne 0) {
+            exit $LASTEXITCODE
+          }
+        workingDirectory: $(Build.SourcesDirectory)/eng/common
+        displayName: Send Build End Telemetry
+        env:
+          # defined via VSTS variables in start-job.ps1
+          Helix_JobToken: $(Helix_JobToken)
+          Helix_WorkItemId: $(Helix_WorkItemId)
+        condition: always()
\ No newline at end of file
diff --git a/eng/common/templates/steps/telemetry-start.yml b/eng/common/templates/steps/telemetry-start.yml
new file mode 100644 (file)
index 0000000..d258097
--- /dev/null
@@ -0,0 +1,80 @@
+parameters:
+  agentOs: Windows_NT
+  helixSource: 'undefined_defaulted_in_telemetry.yml'
+  helixType: 'undefined_defaulted_in_telemetry.yml'
+  buildConfig: ''
+
+steps:
+- template: /eng/common/templates/steps/run-on-unix.yml
+  parameters:
+    agentOs: ${{ parameters.agentOs }}
+    steps:
+      - task: AzureKeyVault@1
+        inputs:
+          azureSubscription: 'HelixProd_KeyVault'
+          KeyVaultName: HelixProdKV
+          SecretsFilter: 'HelixApiAccessToken'
+        condition: always()
+      - bash: |
+          /bin/bash ./telemetry/start-job.sh --source "$Source" --type "$Type" --build "$Build" --queue-id "$QueueId" --attempt "$Attempt" -p "operatingSystem=$OperatingSystem" -p "configuration=$Configuration"
+        workingDirectory: $(Build.SourcesDirectory)/eng/common
+        displayName: Send Job Start Telemetry
+        env:
+          HelixApiAccessToken: $(HelixApiAccessToken)
+          Source: ${{ parameters.helixSource }}
+          Type: ${{ parameters.helixType }}
+          Build: $(Build.BuildNumber)
+          QueueId: ${{ parameters.agentOs }}
+          Attempt: 1
+          OperatingSystem: ${{ parameters.agentOs }}
+          Configuration: ${{ parameters.buildConfig }}
+        condition: always()
+      - bash: |
+          /bin/bash ./telemetry/build/start.sh --build-uri "$BuildUri"
+        workingDirectory: $(Build.SourcesDirectory)/eng/common
+        displayName: Send Build Start Telemetry
+        env:
+          BuildUri: $(System.TaskDefinitionsUri)$(System.TeamProject)/_build/index?buildId=$(Build.BuildId)&_a=summary
+          # defined via VSTS variables in start-job.sh
+          Helix_JobToken: $(Helix_JobToken)
+        condition: always()
+
+- template: /eng/common/templates/steps/run-on-windows.yml
+  parameters:
+    agentOs: ${{ parameters.agentOs }}
+    steps:
+      - task: AzureKeyVault@1
+        inputs:
+          azureSubscription: 'HelixProd_KeyVault'
+          KeyVaultName: HelixProdKV
+          SecretsFilter: 'HelixApiAccessToken'
+        condition: always()
+      - powershell: |
+          ./telemetry/start-job.ps1 -Source $env:Source -Type $env:Type -Build $env:Build -QueueId $env:QueueId -Attempt $env:Attempt -Properties @{ operatingSystem=$env:OperatingSystem; configuration=$env:Configuration } -Verbose
+          if ($LASTEXITCODE -ne 0) {
+            exit $LASTEXITCODE
+          }
+        workingDirectory: $(Build.SourcesDirectory)/eng/common
+        displayName: Send Job Start Telemetry
+        env:
+          HelixApiAccessToken: $(HelixApiAccessToken)
+          Source: ${{ parameters.helixSource }}
+          Type: ${{ parameters.helixType }}
+          Build: $(Build.BuildNumber)
+          QueueId: ${{ parameters.agentOs }}
+          Attempt: 1
+          OperatingSystem: ${{ parameters.agentOs }}
+          Configuration: ${{ parameters.buildConfig }}
+        condition: always()
+      - powershell: |
+          ./telemetry/build/start.ps1 -BuildUri $env:BuildUri
+          if ($LASTEXITCODE -ne 0) {
+            exit $LASTEXITCODE
+          }
+        workingDirectory: $(Build.SourcesDirectory)/eng/common
+        displayName: Send Build Start Telemetry
+        env:
+          BuildUri: $(System.TaskDefinitionsUri)$(System.TeamProject)/_build/index?buildId=$(Build.BuildId)&_a=summary
+          # defined via VSTS variables in start-job.ps1
+          Helix_JobToken: $(Helix_JobToken)
+        condition: always()
\ No newline at end of file
diff --git a/eng/docker-build.sh b/eng/docker-build.sh
new file mode 100755 (executable)
index 0000000..88d4077
--- /dev/null
@@ -0,0 +1,75 @@
+#!/usr/bin/env bash
+# Copyright (c) .NET Foundation and contributors. All rights reserved.
+# Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+source_directory=
+docker_image=
+docker_container_name=
+
+while [ $# -ne 0 ]; do
+    name=$1
+    case $name in
+        -s|--source-directory)
+            shift
+            source_directory=$1
+            ;;
+        -i|--docker-image)
+            shift
+            docker_image=$1
+            ;;
+        -c|--container-name)
+            shift
+            docker_container_name=$1
+            ;;
+        *)
+            args="$args $1"
+            ;;
+    esac
+    shift
+done
+
+echo "Initialize Docker Container"
+docker_bin=$(which docker)
+$docker_bin --version
+
+# Get user id
+user_name=$(whoami)
+echo "user name: $user_name"
+user_id=$(id -u $user_name)
+echo "user id: $user_id"
+
+# Download image
+$docker_bin pull $docker_image
+
+# Create local network to avoid port conflicts when multiple agents run on same machine
+$docker_bin network create vsts_network_$docker_container_name
+
+# Create and start container
+docker_id="$($docker_bin create -it --rm --privileged --ulimit core=-1 \
+  --name vsts_container_$docker_container_name \
+  --network=vsts_network_$docker_container_name \
+  --volume $source_directory:$source_directory \
+  --workdir=$source_directory $docker_image bash --verbose)"
+$docker_bin start $docker_id
+
+# Create an user with the same uid in the container
+container_user_name=vsts_$user_name
+echo "container user name: $container_user_name"
+
+# Add sudo user with same uid that can run any sudo command without password
+$docker_bin exec $docker_id useradd -m -u $user_id $container_user_name
+$docker_bin exec $docker_id groupadd container_SUDO_user
+$docker_bin exec $docker_id usermod -a -G container_SUDO_user $container_user_name
+$docker_bin exec $docker_id su -c "$source_directory/eng/docker-init.sh"
+$docker_bin exec $docker_id su -c "echo '%container_SUDO_user ALL=(ALL:ALL) NOPASSWD:ALL' >> /etc/sudoers"
+
+echo "Execute $args"
+$docker_bin exec --workdir=$source_directory --user $container_user_name $docker_id $args
+lasterrorcode=$?
+
+echo "Cleanup Docker Container/Network"
+$docker_bin container stop $docker_id
+$docker_bin network rm vsts_network_$docker_container_name
+
+exit $lasterrorcode
+
diff --git a/eng/docker-cibuild.sh b/eng/docker-cibuild.sh
deleted file mode 100755 (executable)
index c06eb28..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/usr/bin/env bash
-# Copyright (c) .NET Foundation and contributors. All rights reserved.
-# Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-source_directory=
-docker_image=
-docker_container_name=
-
-while [ $# -ne 0 ]; do
-    name=$1
-    case $name in
-        -s|--source-directory)
-            shift
-            source_directory=$1
-            ;;
-        -i|--docker-image)
-            shift
-            docker_image=$1
-            ;;
-        -c|--container-name)
-            shift
-            docker_container_name=$1
-            ;;
-        *)
-            args="$args $1"
-            ;;
-    esac
-    shift
-done
-
-echo "Initialize Docker Container"
-docker_bin=$(which docker)
-$docker_bin --version
-
-# Get user id
-user_name=$(whoami)
-echo "user name: $user_name"
-user_id=$(id -u $user_name)
-echo "user id: $user_id"
-
-# Download image
-$docker_bin pull $docker_image
-
-# Create local network to avoid port conflicts when multiple agents run on same machine
-$docker_bin network create vsts_network_$docker_container_name
-
-# Create and start container
-docker_id="$($docker_bin create -it --rm --privileged --ulimit core=-1 \
-  --name vsts_container_$docker_container_name \
-  --network=vsts_network_$docker_container_name \
-  --volume $source_directory:$source_directory \
-  --workdir=$source_directory $docker_image bash --verbose)"
-$docker_bin start $docker_id
-
-# Create an user with the same uid in the container
-container_user_name=vsts_$user_name
-echo "container user name: $container_user_name"
-
-# Add sudo user with same uid that can run any sudo command without password
-$docker_bin exec $docker_id useradd -m -u $user_id $container_user_name
-$docker_bin exec $docker_id groupadd container_SUDO_user
-$docker_bin exec $docker_id usermod -a -G container_SUDO_user $container_user_name
-$docker_bin exec $docker_id su -c "$source_directory/eng/docker-init.sh"
-$docker_bin exec $docker_id su -c "echo '%container_SUDO_user ALL=(ALL:ALL) NOPASSWD:ALL' >> /etc/sudoers"
-
-echo "Execute cibuild.sh $args"
-$docker_bin exec --workdir=$source_directory --user $container_user_name $docker_id $source_directory/eng/cibuild.sh $args
-lasterrorcode=$?
-
-echo "Cleanup Docker Container/Network"
-$docker_bin container stop $docker_id
-$docker_bin network rm vsts_network_$docker_container_name
-
-exit $lasterrorcode
-
index afdd19006c0e923ac129b16ad182a7e4ec00ee7d..d952e22c5edd1c714809d7376130884cd871597e 100644 (file)
@@ -156,11 +156,7 @@ function(install_clr targetName)
 endfunction()
 
 function(_add_executable)
-    if(NOT WIN32)
-      add_executable(${ARGV} ${VERSION_FILE_PATH})
-    else()
-      add_executable(${ARGV})
-    endif(NOT WIN32)
+    add_executable(${ARGV})
     list(FIND CLR_CROSS_COMPONENTS_LIST ${ARGV0} INDEX)
     if (DEFINED CLR_CROSS_COMPONENTS_LIST AND ${INDEX} EQUAL -1)
      set_target_properties(${ARGV0} PROPERTIES EXCLUDE_FROM_ALL 1)
@@ -168,11 +164,7 @@ function(_add_executable)
 endfunction()
 
 function(_add_library)
-    if(NOT WIN32)
-      add_library(${ARGV} ${VERSION_FILE_PATH})
-    else()
-      add_library(${ARGV})
-    endif(NOT WIN32)
+    add_library(${ARGV})
     list(FIND CLR_CROSS_COMPONENTS_LIST ${ARGV0} INDEX)
     if (DEFINED CLR_CROSS_COMPONENTS_LIST AND ${INDEX} EQUAL -1)
      set_target_properties(${ARGV0} PROPERTIES EXCLUDE_FROM_ALL 1)
@@ -180,11 +172,19 @@ function(_add_library)
 endfunction()
 
 function(add_library_clr)
-    _add_library(${ARGV})
+    if(NOT WIN32)
+      _add_library(${ARGV} ${VERSION_FILE_PATH})
+    else()
+      _add_library(${ARGV})
+    endif(NOT WIN32)
 endfunction()
 
 function(add_executable_clr)
-    _add_executable(${ARGV})
+    if(NOT WIN32)
+      _add_executable(${ARGV} ${VERSION_FILE_PATH})
+    else()
+      _add_executable(${ARGV})
+    endif(NOT WIN32)
 endfunction()
 
 function(_install)
diff --git a/pack.cmd b/pack.cmd
deleted file mode 100644 (file)
index 421727f..0000000
--- a/pack.cmd
+++ /dev/null
@@ -1,3 +0,0 @@
-@echo off
-powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0eng\common\Build.ps1""" -pack %*"
-exit /b %ErrorLevel%
index a88c47e8b76e92d66d812c530511ed62728adbcb..93ed689def585bd6a9ce038bd17115c9990f5c86 100644 (file)
@@ -6,12 +6,68 @@
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <NoWarn>;1591;1701</NoWarn>
     <IsPackable>true</IsPackable>
-    <Description>Managed SOS Services</Description>
+    <Description>.NET Core SOS</Description>
+    <PackageId>SOS</PackageId>
     <PackageReleaseNotes>$(Description)</PackageReleaseNotes>
     <PackageTags>SOS</PackageTags>
+    <IncludeBuildOutput>false</IncludeBuildOutput>
   </PropertyGroup>
   
   <ItemGroup>
     <PackageReference Include="System.Reflection.Metadata" Version="$(SystemReflectionMetadataVersion)" />
   </ItemGroup>
+
+  <ItemGroup>
+    <_PackageFiles Include="$(ArtifactsBinDir)\SOS.NETCore\netcoreapp1.0\SOS.NETCore.dll">
+      <BuildAction>None</BuildAction>
+      <PackagePath>tools/win-x64</PackagePath>
+    </_PackageFiles>
+    <_PackageFiles Include="$(ArtifactsBinDir)\Windows_NT.x64\sos.dll">
+      <BuildAction>None</BuildAction>
+      <PackagePath>tools/win-x64</PackagePath>
+    </_PackageFiles>
+
+    <_PackageFiles Include="$(ArtifactsBinDir)\SOS.NETCore\netcoreapp1.0\SOS.NETCore.dll">
+      <BuildAction>None</BuildAction>
+      <PackagePath>tools/win-x86</PackagePath>
+    </_PackageFiles>
+    <_PackageFiles Include="$(ArtifactsBinDir)\Windows_NT.x86\sos.dll">
+      <BuildAction>None</BuildAction>
+      <PackagePath>tools/win-x86</PackagePath>
+    </_PackageFiles>
+
+    <_PackageFiles Include="$(ArtifactsBinDir)\SOS.NETCore\netcoreapp1.0\SOS.NETCore.dll">
+      <BuildAction>None</BuildAction>
+      <PackagePath>tools/linux-x64</PackagePath>
+    </_PackageFiles>
+    <_PackageFiles Include="$(ArtifactsBinDir)\Linux.x64\libsosplugin.so">
+      <BuildAction>None</BuildAction>
+      <PackagePath>tools/linux-x64</PackagePath>
+    </_PackageFiles>
+    <_PackageFiles Include="$(ArtifactsBinDir)\Linux.x64\libsos.so">
+      <BuildAction>None</BuildAction>
+      <PackagePath>tools/linux-x64</PackagePath>
+    </_PackageFiles>
+    <_PackageFiles Include="$(ArtifactsBinDir)\Linux.x64\sosdocsunix.txt">
+      <BuildAction>None</BuildAction>
+      <PackagePath>tools/linux-x64</PackagePath>
+    </_PackageFiles>
+
+    <_PackageFiles Include="$(ArtifactsBinDir)\SOS.NETCore\netcoreapp1.0\SOS.NETCore.dll">
+      <BuildAction>None</BuildAction>
+      <PackagePath>tools/osx-x64</PackagePath>
+    </_PackageFiles>
+    <_PackageFiles Include="$(ArtifactsBinDir)\OSX.x64\libsosplugin.dylib">
+      <BuildAction>None</BuildAction>
+      <PackagePath>tools/osx-x64</PackagePath>
+    </_PackageFiles>
+    <_PackageFiles Include="$(ArtifactsBinDir)\OSX.x64\libsos.dylib">
+      <BuildAction>None</BuildAction>
+      <PackagePath>tools/osx-x64</PackagePath>
+    </_PackageFiles>
+    <_PackageFiles Include="$(ArtifactsBinDir)\OSX.x64\sosdocsunix.txt">
+      <BuildAction>None</BuildAction>
+      <PackagePath>tools/osx-x64</PackagePath>
+    </_PackageFiles>
+  </ItemGroup>
 </Project>
index 1171ef9f5ab5c9466bfa7d02fe726d2c1ab843ef..f914a8b3dd78dead8032f6c71749a9bc4afd4f51 100644 (file)
@@ -2,6 +2,7 @@
 <Project Sdk="RoslynTools.RepoToolset">
   <PropertyGroup>
     <TargetFramework>netcoreapp2.0</TargetFramework>
+    <IsPackable>false</IsPackable>
     <NoWarn>;1591;1701</NoWarn>
     <DefineConstants>$(DefineConstants);CORE_CLR</DefineConstants>
   </PropertyGroup>
index b62cef4bdc1c5ceb34b9f2f47353d6d1c43ccccf..3445749554b529ac81fe3e5f9b1a77a1a61e3030 100644 (file)
@@ -23,7 +23,7 @@ Type "!help <functionname>" for detailed info on that function.
 
 Object Inspection                  Examining code and stacks
 -----------------------------      -----------------------------
-DumpObj (do)                       Threads
+DumpObj (do)                       Threads (clrthreads)
 DumpArray (da)                     ThreadState
 DumpAsync                          IP2MD
 DumpStackObjects (dso)             U
@@ -399,6 +399,7 @@ The arguments in detail:
 
 \\
 
+COMMAND: dso.
 COMMAND: dumpstackobjects.
 !DumpStackObjects [-verify] [top stack [bottom stack]]
 
@@ -719,6 +720,7 @@ The arguments in detail:
           the finalizer thread when it gets a chance to run.
 \\
 
+COMMAND: pe.
 COMMAND: printexception.
 !PrintException [-nested] [-lines] [-ccw] [<Exception object address>] [<CCW pointer>]
 
@@ -850,6 +852,7 @@ Possible thread states:
     Failed to Start
     Detached
 \\
+COMMAND: clrthreads.
 COMMAND: threads.
 !Threads [-live] [-special] 
 
index 1c0d49a24ec625a93e79c927286badf7304565ca..7b2a68a768542aba119c34137c179bc6556b65f9 100644 (file)
@@ -13,4 +13,4 @@ if(CLR_CMAKE_PLATFORM_UNIX)
     add_compile_options(-fPIC)
 endif(CLR_CMAKE_PLATFORM_UNIX)
 
-add_library_clr(dbgutil STATIC ${DBGUTIL_SOURCES})
+_add_library(dbgutil STATIC ${DBGUTIL_SOURCES})
index 8537f5642200510c9c10f420be373f51e083339f..3deae4b9c4df5bb863e43cd6d52b77f7fff75dc9 100644 (file)
@@ -12,4 +12,4 @@ set(DEBUGSHIM_SOURCES
   debugshim.cpp
 )
 
-add_library_clr(debugshim STATIC ${DEBUGSHIM_SOURCES})
+_add_library(debugshim STATIC ${DEBUGSHIM_SOURCES})
index cb3144fc2ec4a3f3886417604b632561c73945d2..a6585e5c22a8ef94869719543f2b405da3a67fda 100644 (file)
@@ -3,6 +3,7 @@
   <PropertyGroup>
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.0</TargetFramework>
+    <IsPackable>false</IsPackable>
     <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
     <NoWarn>;1591;1701</NoWarn>
   </PropertyGroup>
index b97d97d7e97ea4202033bb26c225ac91763ab41e..98b72b5c159ca4301657da88c17dfb00bbd0df2d 100644 (file)
@@ -118,7 +118,7 @@ set(SOURCES
     services.cpp
 )
 
-_add_library(sosplugin SHARED ${SOURCES})
+add_library_clr(sosplugin SHARED ${SOURCES})
 
 if(NOT ${LLDB_LIB} STREQUAL "")
    target_link_libraries(sosplugin ${LLDB_LIB})
diff --git a/src/inc/_version.h b/src/inc/_version.h
deleted file mode 100644 (file)
index 684aa96..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#ifndef VER_COMPANYNAME_STR
-#define VER_COMPANYNAME_STR         "Microsoft Corporation"
-#endif
-#ifndef VER_FILEDESCRIPTION_STR
-#define VER_FILEDESCRIPTION_STR     "build"
-#endif
-#ifndef VER_INTERNALNAME_STR
-#define VER_INTERNALNAME_STR        VER_FILEDESCRIPTION_STR
-#endif
-#ifndef VER_ORIGINALFILENAME_STR
-#define VER_ORIGINALFILENAME_STR    VER_FILEDESCRIPTION_STR
-#endif
-#ifndef VER_PRODUCTNAME_STR
-#define VER_PRODUCTNAME_STR         "Microsoft\xae .NET Framework"
-#endif
-#undef VER_PRODUCTVERSION
-#define VER_PRODUCTVERSION          4,6,26508,0
-#undef VER_PRODUCTVERSION_STR
-#define VER_PRODUCTVERSION_STR      "4.6.26508.0"
-#undef VER_FILEVERSION
-#define VER_FILEVERSION             4,6,26508,0
-#undef VER_FILEVERSION_STR
-#define VER_FILEVERSION_STR         "4.6.26508.0"
-#ifndef VER_LEGALCOPYRIGHT_STR
-#define VER_LEGALCOPYRIGHT_STR      "\xa9 Microsoft Corporation.  All rights reserved."
-#endif
-#ifndef VER_DEBUG
-#define VER_DEBUG                   VS_FF_DEBUG
-#endif
index a866bf8dca6c7c243454f4ceabda9d4e4cee77a8..b81173f8e17ce8ed497a3b25f41219aed2657b57 100644 (file)
@@ -200,7 +200,7 @@ set(SOURCES
   thread/thread.cpp
 )
 
-add_library(coreclrpal
+_add_library(coreclrpal
   STATIC
   ${SOURCES}
   ${ARCH_SOURCES}
index 2631a03feaf11b0cc7290cf5c2dfd16f0cb936a1..fd83b324da6358ef3535b41203cfc5a1e5931cae 100644 (file)
@@ -27,7 +27,7 @@ set(PALRT_SOURCES
     variant.cpp
 )
 
-add_library_clr(palrt
+_add_library(palrt
     STATIC
     ${PALRT_SOURCES}
 )