diff --git a/csharp/OnnxRuntime.CSharp.proj b/csharp/OnnxRuntime.CSharp.proj index 5e43756ced7b1..f58798f8362bd 100644 --- a/csharp/OnnxRuntime.CSharp.proj +++ b/csharp/OnnxRuntime.CSharp.proj @@ -20,6 +20,7 @@ CMake creates a target to this project true true None + false true @@ -81,8 +82,10 @@ CMake creates a target to this project - $([System.DateTime]::UtcNow.ToString(yyyyMMdd)) - $([System.DateTime]::UtcNow.ToString(hhmm)) + + + $([System.DateTime]::UtcNow.ToString(yyyyMMdd)) + $([System.DateTime]::UtcNow.ToString(hhmm)) @(MajorVersionNumber) $(PackageVersion)$(ReleaseVersionSuffix) $(PackageVersion) @@ -100,10 +103,10 @@ CMake creates a target to this project - - + + Properties="NoBuild=true;Platform=AnyCPU;PackageVersion=$(PackageVersion);OrtPackageId=$(OrtPackageId);IncludeMobileTargets=$(IncludeMobileTargets)"/> diff --git a/tools/ci_build/github/azure-pipelines/c-api-noopenmp-packaging-pipelines.yml b/tools/ci_build/github/azure-pipelines/c-api-noopenmp-packaging-pipelines.yml index 53d5d00b00500..2ad361c6ed1c1 100644 --- a/tools/ci_build/github/azure-pipelines/c-api-noopenmp-packaging-pipelines.yml +++ b/tools/ci_build/github/azure-pipelines/c-api-noopenmp-packaging-pipelines.yml @@ -706,6 +706,8 @@ stages: variables: breakCodesignValidationInjection: ${{ parameters.DoEsrp }} ReleaseVersionSuffix: $[stageDependencies.Setup.Set_Variables.outputs['Set_Release_Version_Suffix.ReleaseVersionSuffix']] + CurrentDate: $[format('{0:yyyyMMdd}', pipeline.startTime)] + CurrentTime: $[format('{0:HHmm}', pipeline.startTime)] steps: - checkout: self @@ -813,6 +815,10 @@ stages: platform: 'Any CPU' msbuildArguments: '-t:CreatePackage -p:OnnxRuntimeBuildDirectory="$(Build.BinariesDirectory)" -p:OrtPackageId=Microsoft.ML.OnnxRuntime.Gpu -p:IsReleaseBuild=${{ parameters.IsReleaseBuild }} -p:ReleaseVersionSuffix=$(ReleaseVersionSuffix)' workingDirectory: '$(Build.SourcesDirectory)\csharp' + env: + # check out csharp/OnnxRuntime.CSharp.proj for the usage of these variables + CurrentDate: $(CurrentDate) + CurrentTime: $(CurrentTime) - task: MSBuild@1 displayName: 'Build Nuget Packages Microsoft.ML.OnnxRuntime.Gpu-win' @@ -822,6 +828,11 @@ stages: platform: 'Any CPU' msbuildArguments: '-t:CreatePackage -p:OnnxRuntimeBuildDirectory="$(Build.BinariesDirectory)" -p:OrtPackageId=Microsoft.ML.OnnxRuntime.Gpu-win -p:IsReleaseBuild=${{ parameters.IsReleaseBuild }} -p:ReleaseVersionSuffix=$(ReleaseVersionSuffix)' workingDirectory: '$(Build.SourcesDirectory)\csharp' + env: + # check out csharp/OnnxRuntime.CSharp.proj for the usage of these variables + CurrentDate: $(CurrentDate) + CurrentTime: $(CurrentTime) + IsDependentPackage: 'True' - task: MSBuild@1 displayName: 'Build Nuget Packages Microsoft.ML.OnnxRuntime.Gpu-linux' @@ -831,6 +842,11 @@ stages: platform: 'Any CPU' msbuildArguments: '-t:CreatePackage -p:OnnxRuntimeBuildDirectory="$(Build.BinariesDirectory)" -p:OrtPackageId=Microsoft.ML.OnnxRuntime.Gpu-linux -p:IsReleaseBuild=${{ parameters.IsReleaseBuild }} -p:ReleaseVersionSuffix=$(ReleaseVersionSuffix)' workingDirectory: '$(Build.SourcesDirectory)\csharp' + env: + # check out csharp/OnnxRuntime.CSharp.proj for the usage of these variables + CurrentDate: $(CurrentDate) + CurrentTime: $(CurrentTime) + IsDependentPackage: 'True' - task: BatchScript@1 displayName: 'Add TensorRT header file to the native nuGet package'