提交 bb110d58 编写于 作者: B Brett V. Forsgren

consume dotnet arcade sdk

上级 d5f5bd00
# output location
artifacts/
packages/
/tests/scripts/current
.dotnet/
.packages/
./tools
# Patches that may have been generated by scripts.
# (These aren't generally useful to commit directly; if anything, they should be applied.)
......
jobs:
- job: Linux
pool:
vmImage: ubuntu-16.04
......@@ -6,21 +7,42 @@ jobs:
strategy:
maxParallel: 3
matrix:
dotnet_sdk:
_command: make
_args: Configuration=release
release_fcs:
_command: ./fcs/build.sh
_args: Build
coreclr_release:
_configuration: Release
_testKind: testcoreclr
steps:
- script: ./eng/cibuild.sh --configuration $(_configuration) --$(_testKind)
- task: PublishBuildArtifacts@1
displayName: Publish Build Logs
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/$(_configuration)'
ArtifactName: 'Linux $(_configuration) $(_testKind) build log'
publishLocation: Container
continueOnError: true
condition: not(succeeded())
- task: PublishBuildArtifacts@1
displayName: Publish Test Results
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/TestResults'
ArtifactName: 'Linux $(_configuration) $(_testKind)'
publishLocation: Container
continueOnError: true
condition: not(succeeded())
- job: Linux_FCS
pool:
vmImage: ubuntu-16.04
timeoutInMinutes: 90
steps:
- script: $(_command) $(_args)
- script: ./fcs/build.sh Build
- task: PublishBuildArtifacts@1
displayName: Publish Test Results
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/TestResults'
ArtifactName: 'Linux $(_command) $(_args)'
ArtifactName: 'Linux FCS test results'
publishLocation: Container
continueOnError: true
condition: failed()
condition: not(succeeded())
- job: MacOS
pool:
......@@ -29,56 +51,92 @@ jobs:
strategy:
maxParallel: 3
matrix:
dotnet_sdk:
_command: make
_args: Configuration=release
release_fcs:
_command: ./fcs/build.sh
_args: Build
coreclr_release:
_configuration: Release
_testKind: testcoreclr
steps:
- script: $(_command) $(_args)
- script: ./eng/cibuild.sh --configuration $(_configuration) --$(_testKind)
- task: PublishBuildArtifacts@1
displayName: Publish Build Logs
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/$(_configuration)'
ArtifactName: 'MacOS $(_configuration) $(_testKind) build log'
publishLocation: Container
continueOnError: true
condition: not(succeeded())
- task: PublishBuildArtifacts@1
displayName: Publish Test Results
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/TestResults'
ArtifactName: 'MacOS $(_command) $(_args)'
ArtifactName: 'MacOS $(_configuration) $(_testKind)'
publishLocation: Container
continueOnError: true
condition: failed()
condition: not(succeeded())
- job: MacOS_FCS
pool:
vmImage: macOS-10.13
timeoutInMinutes: 90
steps:
- script: ./fcs/build.sh Build
- task: PublishBuildArtifacts@1
displayName: Publish Test Results
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/TestResults'
ArtifactName: 'MacOS FCS test results'
publishLocation: Container
continueOnError: true
condition: not(succeeded())
- job: Windows
pool:
vmImage: vs2017-win2016
timeoutInMinutes: 120
strategy:
maxParallel: 7
maxParallel: 4
matrix:
ci_part1:
_command: build.cmd
_args: release ci_part1
ci_part2:
_command: build.cmd
_args: release ci_part2
ci_part3:
_command: build.cmd
_args: release ci_part3
ci_part4:
_command: build.cmd
_args: release ci_part4
debug_default:
_command: build.cmd
_args: debug
net40_no_vs:
_command: build.cmd
_args: release net40
release_fcs:
_command: fcs\build.cmd
_args: TestAndNuget
desktop_release:
_configuration: Release
_testKind: testDesktop
coreclr_release:
_configuration: Release
_testKind: testCoreclr
fsharpqa_release:
_configuration: Release
_testKind: testFSharpQA
vs_release:
_configuration: Release
_testKind: testVs
steps:
- script: eng\CIBuild.cmd -configuration $(_configuration) -$(_testKind)
- task: PublishBuildArtifacts@1
displayName: Publish Build Logs
inputs:
PathtoPublish: '$(Build.SourcesDirectory)\artifacts\log\$(_configuration)'
ArtifactName: 'Windows $(_configuration) $(_testKind) build log'
publishLocation: Container
continueOnError: true
condition: not(succeeded())
- task: PublishBuildArtifacts@1
displayName: Publish Test Results
inputs:
PathtoPublish: '$(Build.SourcesDirectory)\artifacts\TestResults'
ArtifactName: 'Windows $(_configuration) $(_testKind) test results'
publishLocation: Container
continueOnError: true
condition: not(succeeded())
- job: Windows_FCS
pool:
vmImage: vs2017-win2016
timeoutInMinutes: 120
steps:
- script: $(_command) $(_args)
- script: fcs\build.cmd TestAndNuget
- task: PublishBuildArtifacts@1
displayName: Publish Test Results
inputs:
PathtoPublish: '$(Build.SourcesDirectory)\artifacts\TestResults'
ArtifactName: 'Windows $(_command) $(_args)'
ArtifactName: 'Windows FCS test results'
publishLocation: Container
continueOnError: true
condition: failed()
condition: not(succeeded())
variables:
- name: PB_PublishBlobFeedUrl
value: https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json
- group: DotNet-Blob-Feed
- name: PB_PublishBlobFeedKey
value: $(dotnetfeed-storage-access-key-1)
- name: SignType
value: real
- name: VisualStudioDropName
value: Products/$(System.TeamProject)/$(Build.Repository.Name)/$(Build.SourceBranchName)/$(Build.BuildNumber)
jobs:
- job: Full_Signed
......@@ -13,124 +13,96 @@ jobs:
variables:
BuildConfiguration: 'Release'
steps:
# Install Signing Plugin
- task: ms-vseng.MicroBuildTasks.30666190-6959-11e5-9f96-f56098202fef.MicroBuildSigningPlugin@1
displayName: Install Signing Plugin
inputs:
signType: real
condition: and(succeeded(), in(variables['PB_SignType'], 'test', 'real'))
# Install Swix Plugin
- task: ms-vseng.MicroBuildTasks.32f78468-e895-4f47-962c-58a699361df8.MicroBuildSwixPlugin@1
displayName: Install Swix Plugin
esrpSigning: true
condition: and(succeeded(), ne(variables['SignType'], ''))
# Run build.cmd
- task: CmdLine@1
displayName: Run build.cmd
inputs:
filename: build.cmd
arguments: microbuild
# Build
- script: eng\CIBuild.cmd
-configuration $(BuildConfiguration)
-testAll
/p:OfficialBuildId=$(BUILD.BUILDNUMBER)
/p:VisualStudioDropName=$(VisualStudioDropName)
/p:DotNetSignType=$(SignType)
/p:DotNetPublishToBlobFeed=true
/p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1)
/p:DotNetPublishBlobFeedUrl=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json
/p:PublishToSymbolServer=true
/p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat)
/p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat)
displayName: Build
# Publish nightly package to MyGet
- task: PowerShell@1
displayName: Publish nightly package to MyGet
# Publish logs
- task: PublishBuildArtifacts@1
displayName: Publish Logs
inputs:
scriptName: 'setup\publish-assets.ps1'
arguments: '-binariesPath artifacts\bin -configuration $(BuildConfiguration) -branchName $(Build.SourceBranch) -apiKey $(FSharp.MyGetApiKey)'
condition: and(succeeded(), contains(variables['PB_PublishType'], 'myget'))
PathtoPublish: '$(Build.SourcesDirectory)\artifacts\log\$(BuildConfiguration)'
ArtifactName: 'Build Diagnostic Files'
publishLocation: Container
continueOnError: true
condition: succeededOrFailed()
# Package publish
- task: CmdLine@1
displayName: Restore package publishing
inputs:
filename: '.nuget\NuGet.exe'
arguments: 'restore packages.config -PackagesDirectory packages -Source https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json'
condition: and(succeeded(), contains(variables['PB_PublishType'], 'blob'))
- task: MSBuild@1
displayName: Publish packages to Azure Blob Storage
inputs:
solution: PublishToBlob.proj
msbuildArguments: '/t:Build /p:Configuration=$(BuildConfiguration) /p:ExpectedFeedUrl=$(PB_PublishBlobFeedUrl) /p:AccountKey=$(PB_PublishBlobFeedKey) /p:ManifestRepouri=$(Build.Repository.Uri) /p:ManifestBranch=$(Build.SourceBranch) /p:ManifestCommit=$(Build.SourceVersion) /p:ManifestBuildId=$(Build.BuildNumber) /bl:$(Build.SourcesDirectory)/artifacts/log/$(BuildConfiguration)/pub/publish.binlog'
condition: and(succeeded(), contains(variables['PB_PublishType'], 'blob'))
# Publish test results
- task: PublishBuildArtifacts@1
displayName: Publish publishing bin log
displayName: Publish Test Results
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/$(BuildConfiguration)/pub'
ArtifactName: 'Publish_bin_log'
PathtoPublish: '$(Build.SourcesDirectory)\artifacts\TestResults'
ArtifactName: 'Test Results'
publishLocation: Container
continueOnError: true
condition: and(succeeded(), contains(variables['PB_PublishType'], 'blob'))
- task: CopyFiles@2
displayName: Gather Asset Manifests
condition: succeededOrFailed()
# Upload VSTS Drop
- task: ms-vseng.MicroBuildTasks.4305a8de-ba66-4d8b-b2d1-0dc4ecbbf5e8.MicroBuildUploadVstsDropFolder@1
displayName: Upload VSTS Drop
inputs:
SourceFolder: '$(Build.SourcesDirectory)/artifacts/log/$(BuildConfiguration)/AssetManifest'
TargetFolder: '$(Build.StagingDirectory)/AssetManifests'
continueOnError: true
condition: and(succeeded(), contains(variables['PB_PublishType'], 'blob'))
DropName: $(VisualStudioDropName)
DropFolder: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(BuildConfiguration)\Insertion'
condition: succeeded()
# Publish an artifact that the RoslynInsertionTool is able to find by its name.
- task: PublishBuildArtifacts@1
displayName: Push Asset Manifests
displayName: Publish Artifact VSSetup
inputs:
PathtoPublish: '$(Build.StagingDirectory)/AssetManifests'
PublishLocation: Container
ArtifactName: AssetManifests
continueOnError: true
condition: and(succeeded(), contains(variables['PB_PublishType'], 'blob'))
PathtoPublish: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(BuildConfiguration)\Insertion'
ArtifactName: 'VSSetup'
condition: succeeded()
# Create static drop
# Archive NuGet packages to DevOps.
- task: PublishBuildArtifacts@1
displayName: Create static drop
displayName: Publish Artifact Packages
inputs:
PathtoPublish: 'artifacts'
ArtifactName: '$(Build.BuildNumber)'
publishLocation: FilePath
TargetPath: '$(DropRoot)\$(Build.DefinitionName)\$(Build.SourceBranchName)'
Parallel: true
ParallelCount: 64
condition: and(succeeded(), contains(variables['PB_PublishType'], 'drop'))
PathtoPublish: '$(Build.SourcesDirectory)\artifacts\packages\$(BuildConfiguration)'
ArtifactName: 'Packages'
condition: succeeded()
# Publish symbols
- task: PublishSymbols@1
displayName: Publish symbols
# Publish nightly package to MyGet
- task: PowerShell@1
displayName: Publish nightly package to MyGet
inputs:
SymbolsPath: '$(DropRoot)\$(Build.DefinitionName)\$(Build.SourceBranchName)\$(Build.BuildNumber)\Symbols'
SearchPattern: '**\*.dll;**\*.exe;**\*.pdb'
SymbolsFolder: '$(Build.SourcesDirectory)\artifacts\SymStore'
TreatNotIndexedAsWarning: true
SymbolsProduct: '$(Build.DefinitionName)'
SymbolsVersion: '$(Build.BuildNumber)'
continueOnError: true
condition: and(succeeded(), contains(variables['PB_PublishType'], 'symbols'))
scriptName: 'setup\publish-assets.ps1'
arguments: '-binariesPath artifacts\bin -configuration $(BuildConfiguration) -branchName $(Build.SourceBranch) -apiKey $(FSharp.MyGetApiKey)'
condition: succeeded()
# Upload VSTS Drop
- task: ms-vseng.MicroBuildTasks.4305a8de-ba66-4d8b-b2d1-0dc4ecbbf5e8.MicroBuildUploadVstsDropFolder@1
displayName: Upload VSTS Drop
# Package publish
- task: PublishBuildArtifacts@1
displayName: Push Asset Manifests
inputs:
DropFolder: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(BuildConfiguration)\Insertion'
condition: and(succeeded(), contains(variables['PB_PublishType'], 'vsts'))
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/$(BuildConfiguration)/AssetManifest'
ArtifactName: AssetManifests
continueOnError: true
condition: succeeded()
# Execute cleanup tasks
- task: ms-vseng.MicroBuildTasks.521a94ea-9e68-468a-8167-6dcf361ea776.MicroBuildCleanup@1
displayName: Execute cleanup tasks
condition: succeededOrFailed()
# Publish Artifact: MicroBuildOutputs
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: MicroBuildOutputs'
inputs:
PathtoPublish: '$(Build.StagingDirectory)\MicroBuild\Output'
ArtifactName: MicroBuildOutputs
publishLocation: Container
condition: and(succeeded(), contains(variables['PB_PublishType'], 'microbuild'))
# Publish Symbols to Symweb
- task: ms-vscs-artifact.build-tasks.artifactSymbolTask-1.artifactSymbolTask@0
displayName: Publish symbols to SymWeb
inputs:
symbolServiceURI: 'https://microsoft.artifacts.visualstudio.com/DefaultCollection'
sourcePath: '$(DropRoot)\$(Build.DefinitionName)\$(Build.SourceBranchName)\$(Build.BuildNumber)\SymStore'
usePat: false
condition: and(succeeded(), contains(variables['PB_PublishType'], 'symweb'))
- template: /eng/common/templates/job/publish-build-assets.yml
parameters:
dependsOn:
......
@echo off
powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0sdk-task.ps1""" -msbuildEngine dotnet -restore -projects PublishBuildAssets.proj -ci %*"
exit /b %ErrorLevel%
powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0eng\build.ps1""" -build -restore %*"
......@@ -34,97 +34,33 @@ Install
2. The command prompt must have Administrator rights (`Run as Administrator`).
On Windows you can build the F# compiler for .NET Framework as follows:
On Windows you can build the F# compiler and tools as follows:
build.cmd
Build.cmd
This is the same as
Desktop tests can be run with:
build.cmd net40
Build.cmd -test
There are various qualifiers:
Additional options are available via:
build.cmd release -- build release (the default)
build.cmd debug -- build debug instead of release
build.cmd net40 -- build .NET Framework compiler (the default)
build.cmd coreclr -- build .NET Core compiler
build.cmd vs -- build the Visual F# IDE Tools (see below)
build.cmd pcls -- build the PCL FSharp.Core libraries
build.cmd all -- build all
build.cmd proto -- force the rebuild of the Proto bootstrap compiler in addition to other things
build.cmd test -- build default targets, run suitable tests
build.cmd net40 test -- build net40, run suitable tests
build.cmd coreclr test -- build coreclr, run suitable tests
build.cmd vs test -- build Visual F# IDE Tools, run all tests (see below)
build.cmd all test -- build all, run all tests
build.cmd test-smoke -- build, run smoke tests
build.cmd test-net40-fsharp -- build, run tests\fsharp suite for .NET Framework
build.cmd test-net40-fsharpqa -- build, run tests\fsharpqa suite for .NET Framework
Build.cmd /?
After you build the first time you can open and use this solution:
.\FSharp.sln
or just build it directly:
msbuild FSharp.sln
.\VisualFSharp.sln
If you are just developing the core compiler and library then building ``FSharp.sln`` will be enough.
### Developing the F# Compiler (Linux)
For Linux/Mono, follow [these instructions](http://www.mono-project.com/docs/getting-started/install/linux/). Also you may need:
sudo apt-get install mono-complete make git
Then:
make
Then to replace your machine-wide installation:
sudo make install
Full testing is not yet enabled on Linux.
### Developing the F# Compiler (macOS)
### Developing the F# Compiler (Linux/macOS)
Install XCode command line tools (or homebrew equivalents) and Mono or Visual Studio for Mac.
For Linux/Mac:
Then:
./build.sh
make
Running tests:
Then to replace your machine-wide installation:
sudo make install
Full testing is not yet enabled on macOS.
### [Optional] Specifying the install path (Linux or macOS)
You can specify a custom installation path using the DESTDIR shell variable
DESTDIR=/my/path/to/fsharp make install
### Developing the F# Compiler (Linux or macOS - .NET Core)
Install [the latest .NET SDK](https://www.microsoft.com/net/download/). Then use
src/buildfromsource.sh
Outputs are placed in
BuildFromSource/Debug/...
BuildFromSource/Release/...
This uses an installed .NET SDK 2.0 to build the various duplicated project
Testing the .NET Core version of the F# compiler on macOS and Linux is TBD.
./build.sh -test
### Developing the Visual F# IDE Tools (Windows Only)
......@@ -132,15 +68,26 @@ To build and test Visual F# IDE Tools, install these requirements:
- Download [Visual Studio 2017](https://www.visualstudio.com/downloads/)
- Launch the Visual Studio Installer
- Under the "Windows" workloads, select ".NET desktop development"
- Select "F# desktop language support" under the optional components
- Under the "Other Toolsets" workloads, select "Visual Studio extension development"
- Under the **"Windows"** workload, select **".NET desktop development"**
- Select the optional component **"F# desktop language support"**
- Under the **"Mobile & Gaming"** workload, select **"Mobile development with .NET"**
- Under the **"Other Toolsets"** workload, select **"Visual Studio extension development"**
- On the **"Individual Components"** tab, select **".NET Framework 4.7.2 SDK"** and **".NET Framework 4.7.2 targeting pack"**
Steps to build:
build.cmd vs -- build the Visual F# IDE Tools in Release configuration (see below)
build.cmd vs debug -- build the Visual F# IDE Tools in Debug configuration (see below)
build.cmd vs test -- build Visual F# IDE Tools, run all tests (see below)
Build.cmd -- build all F# components under the default configuration (Debug)
Build.cmd -configuration Release -- build all F# components as Release
Build.cmd -testDesktop -- build and test all net46 tests
All test options:
-testDesktop -- test all net46 target frameworks
-testCoreClr -- test all netstandard and netcoreapp target frameworks
-testFSharpQA -- test all F# Cambridge tests
-testVs -- test all VS integration points
-testFcs -- test F# compiler service components
-testAll -- all of the above
Use ``VisualFSharp.sln`` if you're building the Visual F# IDE Tools.
......
<Project>
<Import Project="FSharpBuild.Directory.Build.targets" Condition = " '$(FSharpTestCompilerVersion)' == '' "/>
<Import Project="FSharpTests.Directory.Build.targets" Condition = " '$(FSharpTestCompilerVersion)' != '' "/>
<Import Project="CoordinateXlif.targets" Condition = " '$(FSharpBuildAssemblyFile)' != '' and '$(XliffTasksAssembly)' != '' "/>
</Project>
2.1.504
\ No newline at end of file
此差异已折叠。
<Project>
<Import Project="build\targets\AssemblyVersions.props" />
<Import Project="build\targets\PackageVersions.props" />
<Import Project="build\targets\GitHash.props" />
<Import Project="build\targets\CommonPackages.targets" />
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
<Import Project="eng\targets\Settings.props" />
<!-- directory locations -->
<PropertyGroup>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<RepoRoot>$(MSBuildThisFileDirectory)</RepoRoot>
<FSharpSourcesRoot>$(RepoRoot)src</FSharpSourcesRoot>
<ArtifactsDir>$(RepoRoot)artifacts</ArtifactsDir>
<ToolsRoot>$(ArtifactsDir)\toolset</ToolsRoot>
<ArtifactsBinDir>$(ArtifactsDir)\bin</ArtifactsBinDir>
<ArtifactsObjDir>$(ArtifactsDir)\obj</ArtifactsObjDir>
<ArtifactsPackagesDir>$(ArtifactsDir)\packages</ArtifactsPackagesDir>
<BaseOutputPath>$(ArtifactsBinDir)\$(MSBuildProjectName)</BaseOutputPath>
<BaseIntermediateOutputPath>$(ArtifactsObjDir)\$(MSBuildProjectName)</BaseIntermediateOutputPath>
<SymStoreDirectory>$(ArtifactsDir)\SymStore</SymStoreDirectory>
<ProtoOutputPath Condition="'$(OS)' != 'Unix'">$(ArtifactsBinDir)\fsc\Proto\net46</ProtoOutputPath>
<ProtoOutputPath Condition="'$(OS)' == 'Unix'">$(ArtifactsBinDir)/fsc/Proto/netcoreapp2.1</ProtoOutputPath>
<ProtoOutputPath Condition="'$(OS)' != 'Unix'">$(ArtifactsDir)\Bootstrap</ProtoOutputPath>
<ProtoOutputPath Condition="'$(OS)' == 'Unix'">$(ArtifactsDir)/fsc/Proto/netcoreapp2.1</ProtoOutputPath>
<ValueTupleImplicitPackageVersion>4.4.0</ValueTupleImplicitPackageVersion>
<WarningsAsErrors>1182;0025;$(WarningsAsErrors)</WarningsAsErrors>
</PropertyGroup>
......@@ -62,13 +51,8 @@
<!-- signing -->
<PropertyGroup>
<SkipSigning>false</SkipSigning>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>$(FSharpSourcesRoot)\fsharp\msft.pubkey</AssemblyOriginatorKeyFile>
<StrongNames>true</StrongNames>
<DelaySign>true</DelaySign>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
</PropertyGroup>
<PropertyGroup Condition="'$(MonoPackaging)' == 'true'">
<AssemblyOriginatorKeyFile>$(FSharpSourcesRoot)\fsharp\test.snk</AssemblyOriginatorKeyFile>
<DelaySign>false</DelaySign>
......@@ -83,6 +67,8 @@
<!-- other -->
<PropertyGroup>
<NoWarn Condition="'$(Language)' == 'F#'">$(NoWarn);FS2003</NoWarn><!-- warning when AssemblyInformationalVersion looks like '1.2.3-dev' -->
<NoCompilerStandardLib>true</NoCompilerStandardLib><!-- necessary for resource generation using csc.exe -->
<DebugType>portable</DebugType>
<MicroBuildAssemblyFileLanguage>fs</MicroBuildAssemblyFileLanguage>
<UseStandardResourceNames>false</UseStandardResourceNames>
......
<Project>
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
<Import Project="eng\targets\NuGet.targets" />
<Import Project="FSharp.Profiles.props" />
<PropertyGroup>
......@@ -13,6 +15,7 @@
during `net46`, but for purposes of restore needs to be present.
-->
<AssetTargetFallback>$(AssetTargetFallback);net462</AssetTargetFallback>
<NoWarn>$(NoWarn);NU1605;NU1701</NoWarn>
</PropertyGroup>
<PropertyGroup>
......@@ -34,9 +37,4 @@
</CreateItem>
</Target>
<Import Project="build\targets\NGenOrCrossGen.targets" />
<Import Project="build\targets\ConvertPortablePdbs.targets" />
<Import Project="build\targets\GenerateAssemblyAttributes.targets" />
<Import Project="build\targets\GenerateInternalsVisibleTo.targets" />
</Project>
......@@ -19,12 +19,12 @@
<PropertyGroup Condition="'$(FSharpTestCompilerVersion)' == 'coreclr'">
<DisableAutoSetFscCompilerPath>true</DisableAutoSetFscCompilerPath>
<FscToolPath>$(MSBuildThisFileDirectory)artifacts\toolset\dotnet</FscToolPath>
<FscToolPath>$([System.IO.Path]::GetDirectoryName('$(DOTNET_HOST_PATH)'))</FscToolPath>
<FscToolExe Condition="'$(OS)' != 'Unix'">dotnet.exe</FscToolExe>
<FscToolExe Condition="'$(OS)' == 'Unix'">dotnet</FscToolExe>
<DotnetFscCompilerPath>$(MSBuildThisFileDirectory)artifacts\bin\fsc\$(Configuration)\netcoreapp2.1\fsc.exe</DotnetFscCompilerPath>
<FsiToolPath>$(MSBuildThisFileDirectory)artifacts\toolset\dotnet</FsiToolPath>
<FsiToolPath>$([System.IO.Path]::GetDirectoryName('$(DOTNET_HOST_PATH)'))</FsiToolPath>
<FsiToolExe Condition="'$(OS)' != 'Unix'">dotnet.exe</FsiToolExe>
<FsiToolExe Condition="'$(OS)' == 'Unix'">dotnet</FsiToolExe>
<DotnetFsiCompilerPath>$(MSBuildThisFileDirectory)artifacts\bin\fsi\$(Configuration)\netcoreapp2.1\fsi.exe</DotnetFsiCompilerPath>
......
<Project>
<!--
This is for the internal orchestrated build scenarios and will likely never be run on a
developer's machine. The official build definition builds this file directly.
-->
<PropertyGroup>
<FeedTasksPackage>Microsoft.DotNet.Build.Tasks.Feed</FeedTasksPackage>
<!-- This version should be kept in sync with `packages.config` -->
<FeedTasksPackageVersion>2.2.0-beta.19066.1</FeedTasksPackageVersion>
</PropertyGroup>
<Import Project="$(MSBuildThisFileDirectory)packages\$(FeedTasksPackage).$(FeedTasksPackageVersion)\build\$(FeedTasksPackage).targets" />
<ItemGroup>
<!-- the string '-rtm-' is important, because that's the package with a per-build unique version number -->
<NuGetPackages Include="$(MSBuildThisFileDirectory)artifacts\packages\$(Configuration)\Microsoft.FSharp.Compiler.*-rtm-*.nupkg" />
</ItemGroup>
<PropertyGroup>
<ArtifactsLogDir>$(MSBuildThisFileDirectory)artifacts\log\$(Configuration)\</ArtifactsLogDir>
<Platform Condition="'$(Platform)' == ''">AnyCPU</Platform>
<PlatformName Condition="'$(PlatformName)' == ''">$(Platform)</PlatformName>
<AssetManifestFilePath>$(ArtifactsLogDir)AssetManifest\$(OS)-$(PlatformName).xml</AssetManifestFilePath>
</PropertyGroup>
<Target Name="Build">
<PushToBlobFeed ExpectedFeedUrl="$(ExpectedFeedUrl)"
AccountKey="$(AccountKey)"
ItemsToPush="@(NuGetPackages)"
ManifestBuildData="Location=$(ExpectedFeedUrl)"
ManifestRepoUri="$(ManifestRepoUri)"
ManifestBranch="$(ManifestBranch)"
ManifestBuildId="$(ManifestBuildId)"
ManifestCommit="$(ManifestCommit)"
AssetManifestPath="$(AssetManifestFilePath)" />
</Target>
</Project>
@echo off
powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0eng\build.ps1""" -restore %*"
@echo off
powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0eng\build.ps1""" -test %*"
此差异已折叠。
此差异已折叠。
#!/bin/sh
#!/usr/bin/env bash
make Configuration=release
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 )"
"$scriptroot/eng/build.sh" --build $@
{
"sign": [
{
"certificate": "Microsoft",
"strongName": "StrongName",
"values": [
"bin\\FSharp.Core\\*\\*\\FSharp.Core.dll",
"bin\\FSharp.Core\\*\\*\\*\\FSharp.Core.resources.dll",
"bin\\FSharp.Build\\*\\*\\FSharp.Build.dll",
"bin\\FSharp.Build\\*\\*\\*\\FSharp.Build.resources.dll",
"bin\\FSharp.Compiler.Private\\*\\*\\FSharp.Compiler.Private.dll",
"bin\\FSharp.Compiler.Private\\*\\*\\*\\FSharp.Compiler.Private.resources.dll",
"bin\\FSharp.Compiler.Server.Shared\\*\\*\\FSharp.Compiler.Server.Shared.dll",
"bin\\FSharp.Compiler.Interactive.Settings\\*\\*\\FSharp.Compiler.Interactive.Settings.dll",
"bin\\FSharp.Compiler.Interactive.Settings\\*\\*\\*\\FSharp.Compiler.Interactive.Settings.resources.dll",
"bin\\fsc\\*\\*\\fsc.exe",
"bin\\fsi\\*\\*\\fsi.exe",
"bin\\fsiAnyCpu\\*\\*\\fsiAnyCpu.exe",
"bin\\FSharp.VS.FSI\\*\\*\\FSharp.VS.FSI.dll",
"bin\\FSharp.VS.FSI\\*\\*\\*\\FSharp.VS.FSI.resources.dll",
"bin\\FSharp.LanguageService.Base\\*\\*\\FSharp.LanguageService.Base.dll",
"bin\\FSharp.LanguageService.Base\\*\\*\\*\\FSharp.LanguageService.Base.resources.dll",
"bin\\FSharp.LanguageService\\*\\*\\FSharp.LanguageService.dll",
"bin\\FSharp.LanguageService\\*\\*\\*\\FSharp.LanguageService.resources.dll",
"bin\\FSharp.UIResources\\*\\*\\FSharp.UIResources.dll",
"bin\\FSharp.UIResources\\*\\*\\*\\FSharp.UIResources.resources.dll",
"bin\\FSharp.Editor\\*\\*\\FSharp.Editor.dll",
"bin\\FSharp.Editor\\*\\*\\*\\FSharp.Editor.resources.dll",
"bin\\FSharp.PatternMatcher\\*\\*\\FSharp.PatternMatcher.dll",
"bin\\FSharp.PropertiesPages\\*\\*\\FSharp.ProjectSystem.PropertyPages.dll",
"bin\\FSharp.PropertiesPages\\*\\*\\*\\FSharp.ProjectSystem.PropertyPages.resources.dll",
"bin\\ProjectSystem\\*\\*\\FSharp.ProjectSystem.FSharp.dll",
"bin\\ProjectSystem\\*\\*\\*\\FSharp.ProjectSystem.FSharp.resources.dll",
"bin\\ProjectSystem.Base\\*\\*\\FSharp.ProjectSystem.Base.dll",
"bin\\ProjectSystem.Base\\*\\*\\*\\FSharp.ProjectSystem.Base.resources.dll"
]
},
{
"certificate": "VsixSHA2",
"strongName": null,
"values": [
"bin\\VisualFSharpFull\\*\\*\\VisualFSharpFull.vsix",
"bin\\VisualFSharpTemplates\\*\\*\\VisualFSharpTemplate.vsix",
"VSSetup\\*\\Insertion\\Microsoft.FSharp.Dependencies.vsix",
"VSSetup\\*\\Insertion\\Microsoft.FSharp.VSIX.Full.Resources.*.vsix"
]
},
{
"certificate": "NuGet",
"strongName": null,
"values": [
"packages\\*\\*.nupkg"
]
}
],
"exclude": [
"e_sqlite3.dll",
"FSharp.Core.UnitTests.dll",
"FSharp.Data.TypeProviders.dll",
"Microsoft.Build.dll",
"Microsoft.Build.Framework.dll",
"Microsoft.Build.Tasks.Core.dll",
"Microsoft.Build.Utilities.Core.dll",
"Newtonsoft.Json.dll",
"System.Collections.Immutable.dll",
"System.Reflection.Metadata.dll",
"System.ValueTuple.4.4.0.nupkg",
"System.ValueTuple.dll"
]
}
{
"sign": [
{
"certificate": "VsixSHA2",
"strongName": null,
"values": [
"Microsoft.FSharp.Compiler.vsix",
"Microsoft.FSharp.Compiler.Resources.*.vsix",
"Microsoft.FSharp.Dependencies.vsix",
"Microsoft.FSharp.IDE.vsix",
"Microsoft.FSharp.SDK.vsix"
]
}
],
"exclude": [
"fsc.exe",
"FSharp.Build.dll",
"FSharp.Build.resources.dll",
"FSharp.Core.dll",
"FSharp.Core.resources.dll",
"FSharp.Compiler.Private.dll",
"FSharp.Compiler.Private.resources.dll",
"FSharp.Compiler.Server.Shared.dll",
"FSharp.Compiler.Interactive.Settings.dll",
"FSharp.Compiler.Interactive.Settings.resources.dll",
"fsi.exe",
"fsiAnyCpu.exe",
"FSharp.Data.TypeProviders.dll",
"Microsoft.Build.dll",
"Microsoft.Build.Framework.dll",
"Microsoft.Build.Tasks.Core.dll",
"Microsoft.Build.Utilities.Core.dll",
"System.Collections.Immutable.dll",
"System.Reflection.Metadata.dll",
"System.ValueTuple.dll"
]
}
{
"sign": [
{
"certificate": "NuGet",
"strongName": null,
"values": [
"*.nupkg"
]
}
],
"exclude": [
"FSharp.Build.resources.dll",
"FSharp.Compiler.Interactive.Settings.resources.dll",
"FSharp.Compiler.Private.resources.dll",
"FSharp.Core.resources.dll",
"fsc.exe",
"FSharp.Build.dll",
"FSharp.Compiler.Interactive.Settings.dll",
"FSharp.Compiler.Private.dll",
"FSharp.Core.dll",
"FSharp.Core.UnitTests.dll",
"fsi.exe"
]
}
\ No newline at end of file
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove('FSharp.Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
</Project>
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove('FSharp.Directory.Build.targets', '$(MSBuildThisFileDirectory)../'))" />
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- necessary for package restore -->
<TargetFramework>net46</TargetFramework>
<SignToolExe>$(NuGetPackageRoot)RoslynTools.SignTool\$(RoslynToolsSignToolPackageVersion)\tools\SignTool.exe</SignToolExe>
<SignToolArgs>-msbuildPath "$(MSBuildBinPath)\msbuild.exe" -nugetPackagesPath "$(NuGetPackageRoot.TrimEnd('\'))" -config "$(ConfigFile)"</SignToolArgs>
<SignToolArgs Condition="'$(SignType)' == 'test'">-testSign $(SignToolArgs)</SignToolArgs>
<SignToolArgs Condition="'$(SignType)' == ''">-test $(SignToolArgs)</SignToolArgs>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="RoslynTools.SignTool" Version="$(RoslynToolsSignToolPackageVersion)" />
</ItemGroup>
<Target Name="ValidateArguments">
<Error Message="Configuration must be manually specified." Condition="'$(Configuration)' == ''" />
<Error Message="Configuration file must be manually specified." Condition="'$(ConfigFile)' == ''" />
<Error Message="BinaryBasePath must be manually specified." Condition="'$(BinaryBasePath)' == ''" />
</Target>
<Target Name="DoSigning"
DependsOnTargets="ValidateArguments">
<Exec Command='"$(SignToolExe)" $(SignToolArgs) "$(BinaryBasePath)"' />
</Target>
</Project>
<Project>
<!-- Version number computation -->
<PropertyGroup>
<!-- Put build number 0 and today's date if this was a local build -->
<BUILD_BUILDNUMBER Condition="'$(BUILD_BUILDNUMBER)' == ''">$([System.DateTime]::Now.ToString(yyyyMMdd.0))</BUILD_BUILDNUMBER>
<!-- Remove '.DRAFT' suffix if it exists -->
<BUILD_BUILDNUMBER>$(BUILD_BUILDNUMBER.Replace(".DRAFT", ""))</BUILD_BUILDNUMBER>
<!--
Given $(BUILD_BUILDNUMBER) = '20161225.1'
Then $(_Build_Year) = 2016
Then $(_Build_Month) = 12
Then $(_Build_Day) = 25
Then $(_Build_Number) = 1
Then $(Build_FileVersion) = 2016.12.25.1
-->
<_Build_Year>$(BUILD_BUILDNUMBER.Substring(0, 4))</_Build_Year>
<_Build_Month>$(BUILD_BUILDNUMBER.Substring(4, 2))</_Build_Month>
<_Build_Day>$(BUILD_BUILDNUMBER.Substring(6, 2))</_Build_Day>
<_Build_Number>$(BUILD_BUILDNUMBER.Substring(9))</_Build_Number>
<Build_FileVersion>$(_Build_Year).$(_Build_Month).$(_Build_Day).$(_Build_Number)</Build_FileVersion>
<FSLanguageVersion>4.5</FSLanguageVersion>
<FSCoreMajorVersion>$(FSLanguageVersion)</FSCoreMajorVersion>
<FSCorePackageVersion>$(FSCoreMajorVersion).4</FSCorePackageVersion>
<FSCoreVersion>$(FSCoreMajorVersion).0.0</FSCoreVersion>
<FSCoreUnitTestsPackageVersion>$(FSCorePackageVersion).0</FSCoreUnitTestsPackageVersion>
<FSPackageMajorVersion>10.2</FSPackageMajorVersion>
<FSPackageVersion>$(FSPackageMajorVersion).3</FSPackageVersion>
<FSProductVersion>$(FSPackageVersion).0</FSProductVersion>
<VSMajorVersion>15</VSMajorVersion>
<VSMinorVersion>9</VSMinorVersion>
<VSGeneralVersion>$(VSMajorVersion).0</VSGeneralVersion>
<VSAssemblyVersion>$(VSMajorVersion).$(VSMinorVersion).0.0</VSAssemblyVersion>
<!--
Given $(BUILD_BUILDNUMBER) = '20161225.1'
Given $(VSAssemblyVersion) = '15.4.0.0'
Then $(BuildTimeStamp_Date) = 161225
Then $(BuildTimeStamp_Number) = 01
Then $(BuildTimeStamp) = 16122501
Then $(VsixPackageVersion) = 15.4.20161225.1
Then $(NuGetPackageVersionSuffix) = 161225-01
-->
<BuildTimeStamp_Date>$(BUILD_BUILDNUMBER.Split('.')[0].Substring(2))</BuildTimeStamp_Date>
<BuildTimeStamp_Number>$(BUILD_BUILDNUMBER.Split('.')[1].PadLeft(2, '0'))</BuildTimeStamp_Number>
<BuildTimeStamp>$(BuildTimeStamp_Date)$(BuildTimeStamp_Number)</BuildTimeStamp>
<VsixPackageVersion Condition="'$(CI)' != ''">$(VSAssemblyVersion.Split('.')[0]).$(VSAssemblyVersion.Split('.')[1]).$(BUILD_BUILDNUMBER)</VsixPackageVersion>
<VsixPackageVersion Condition="'$(CI)' == ''">42.42.42.42</VsixPackageVersion>
<NuGetPackageVersionSuffix>$(BuildTimeStamp_Date)-$(BuildTimeStamp_Number)</NuGetPackageVersionSuffix>
</PropertyGroup>
<Target Name="GetVsixPackageVersion" Outputs="$(VsixPackageVersion)">
</Target>
</Project>
<Project>
<ItemGroup>
<PackageReference Include="XliffTasks" Version="$(XliffTasksPackageVersion)" PrivateAssets="All" />
</ItemGroup>
</Project>
<Project>
<ItemGroup>
<PackageReference Include="Pdb2Pdb" Version="$(Pdb2PdbPackageVersion)" PrivateAssets="all" />
</ItemGroup>
<Target Name="ConvertPortablePdbs"
AfterTargets="AfterBuild"
Condition="'$(OS)' != 'Unix' AND
'$(SkipPDBConversion)' != 'true' AND
Exists('$(TargetPath)') AND
('$(DebugType)' == 'portable' OR '$(DebugType)' == 'embedded') AND
$(TargetFramework.StartsWith('net')) AND
'$(Configuration)' != 'Proto'">
<PropertyGroup>
<ConvertedPdbsDirectory>$(SymStoreDirectory)\$(TargetFramework)</ConvertedPdbsDirectory>
<PdbConverterExe>$(NuGetPackageRoot)Pdb2Pdb\$(Pdb2PdbPackageVersion)\tools\Pdb2Pdb.exe</PdbConverterExe>
<PdbConverterArgs>"$(TargetPath)" /out "$(ConvertedPdbsDirectory)\$(TargetName).pdb" /srcsvrvar SRC_INDEX=public</PdbConverterArgs>
</PropertyGroup>
<MakeDir Directories="$(ConvertedPdbsDirectory)" />
<Exec Command='"$(PdbConverterExe)" $(PdbConverterArgs)' />
</Target>
<Target Name="CopyExtantFullPdbs"
AfterTargets="AfterBuild"
Condition="'$(OS)' != 'Unix' AND
Exists('$(TargetPath)') AND
'$(DebugType)' == 'full' AND
$(TargetFramework.StartsWith('net4')) AND
'$(Configuration)' != 'Proto'">
<PropertyGroup>
<PdbFileName>$(TargetDir)\$(TargetName).pdb</PdbFileName>
</PropertyGroup>
<MakeDir Directories="$(SymStoreDirectory)" />
<Copy SourceFiles="$(PdbFileName)" DestinationFolder="$(SymStoreDirectory)" />
</Target>
</Project>
<Project>
<PropertyGroup>
<!-- we generate our own custom assembly info -->
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<Target Name="PrepareGenerateAssemblyLevelAttributes">
<PropertyGroup>
<GeneratedFSharpAssemblyLevelAttributesFile>$(IntermediateOutputPath)$(MSBuildProjectName).AssemblyLevelAttributes$(DefaultLanguageSourceExtension)</GeneratedFSharpAssemblyLevelAttributesFile>
<!-- The compiler that currently ships with the SDK doesn't like the Git hash being embedded into the AssemblyInformationalVersionAttribute. -->
<NoWarn Condition="'$(Language)' == 'F#' AND '$(Configuration)' == 'Proto'">$(NoWarn);2003</NoWarn>
</PropertyGroup>
</Target>
<Target Name="GenerateAssemblyLevelAttributes"
Inputs="$(MSBuildThisFileFullPath);$(MSBuildProjectFile)"
Outputs="$(GeneratedFSharpAssemblyLevelAttributesFile)"
DependsOnTargets="PrepareGenerateAssemblyLevelAttributes;PrepareForBuild"
BeforeTargets="CoreCompile">
<WriteCodeFragment AssemblyAttributes="@(AssemblyLevelAttribute)"
Language="$(Language)"
OutputFile="$(GeneratedFSharpAssemblyLevelAttributesFile)"
Condition="'@(AssemblyLevelAttribute)' != ''">
<Output TaskParameter="OutputFile" ItemName="Compile" Condition="'$(Language)' != 'F#'" />
<Output TaskParameter="OutputFile" ItemName="CompileBefore" Condition="'$(Language)' == 'F#'" />
<Output TaskParameter="OutputFile" ItemName="FileWrites" />
</WriteCodeFragment>
</Target>
<Target Name="PrepareGenerateAssemblyFileVersion"
Condition="'$(Language)' != '' AND '$(GenerateAssemblyVersionAttribute)' != 'false'">
<PropertyGroup>
<MicroBuildAssemblyVersion Condition="'$(MicroBuildAssemblyVersion)' == ''">$(FSCoreVersion)</MicroBuildAssemblyVersion>
<!-- certain delivered F# VS assemblies use a specific MicroBuildAssemblyVersion, otherwise use FSCoreVersion -->
<MicroBuildAssemblyVersion Condition="'$(UseFSharpProductVersion)' == 'true'">$(FSProductVersion)</MicroBuildAssemblyVersion>
<!-- certain delivered F# VS assemblies use a specific MicroBuildAssemblyVersion, otherwise use FSCoreVersion -->
<MicroBuildAssemblyVersion Condition="'$(UseVsMicroBuildAssemblyVersion)' == 'true'">$(VSAssemblyVersion)</MicroBuildAssemblyVersion>
<GeneratedFSharpAssemblyVersionFile>$(IntermediateOutputPath)$(MSBuildProjectName).AssemblyVersion$(DefaultLanguageSourceExtension)</GeneratedFSharpAssemblyVersionFile>
</PropertyGroup>
<PropertyGroup>
<!-- xbuild and older versions of msbuild don't have F# support for WriteCodeFragment -->
<_UseWriteCodeFragmentHack Condition="'$(OS)' == 'Unix' and '$(Language)' == 'F#'">true</_UseWriteCodeFragmentHack>
</PropertyGroup>
<ItemGroup>
<_AssemblyVersionAttributes Include="System.Reflection.AssemblyCompanyAttribute">
<_Parameter1>Microsoft Corporation</_Parameter1>
</_AssemblyVersionAttributes>
<_AssemblyVersionAttributes Include="System.Reflection.AssemblyCopyrightAttribute">
<_Parameter1>&#169; Microsoft Corporation. All Rights Reserved.</_Parameter1>
</_AssemblyVersionAttributes>
<_AssemblyVersionAttributes Include="System.Reflection.AssemblyDescriptionAttribute">
<_Parameter1>$(AssemblyName)</_Parameter1>
</_AssemblyVersionAttributes>
<_AssemblyVersionAttributes Include="System.Reflection.AssemblyFileVersionAttribute">
<_Parameter1>$(Build_FileVersion)</_Parameter1>
</_AssemblyVersionAttributes>
<_AssemblyVersionAttributes Include="System.Reflection.AssemblyInformationalVersionAttribute">
<_Parameter1>$(MicroBuildAssemblyVersion). Commit Hash: $(GitHeadSha).</_Parameter1>
</_AssemblyVersionAttributes>
<_AssemblyVersionAttributes Include="System.Reflection.AssemblyProductAttribute">
<_Parameter1>Microsoft&#174; F#</_Parameter1>
</_AssemblyVersionAttributes>
<_AssemblyVersionAttributes Include="System.Reflection.AssemblyTitleAttribute">
<_Parameter1>$(AssemblyName)</_Parameter1>
</_AssemblyVersionAttributes>
<_AssemblyVersionAttributes Include="System.Reflection.AssemblyVersionAttribute">
<_Parameter1>$(MicroBuildAssemblyVersion)</_Parameter1>
</_AssemblyVersionAttributes>
</ItemGroup>
</Target>
<Target Name="GenerateAssemblyFileVersion"
Inputs="$(MSBuildThisFileFullPath);$(MSBuildProjectFile)"
Outputs="$(GeneratedFSharpAssemblyVersionFile)"
DependsOnTargets="PrepareGenerateAssemblyFileVersion;PrepareForBuild"
BeforeTargets="CoreCompile">
<WriteCodeFragment AssemblyAttributes="@(_AssemblyVersionAttributes)"
Language="$(Language)"
OutputFile="$(GeneratedFSharpAssemblyVersionFile)"
Condition="'$(_UseWriteCodeFragmentHack)' != 'true'">
<!-- For FSharp.Core, assembly version must be inserted after all Core files, as it defines F# basic types (strings) -->
<Output TaskParameter="OutputFile" ItemName="Compile" Condition="'$(Language)' != 'F#' or '$(AssemblyName)' == 'FSharp.Core'" />
<!-- For other assemblies, this must be inserted before all source files, to keep exe's EntryPoints (if any) as the last source file -->
<Output TaskParameter="OutputFile" ItemName="CompileBefore" Condition="'$(Language)' == 'F#' and '$(AssemblyName)' != 'FSharp.Core'" />
<Output TaskParameter="OutputFile" ItemName="FileWrites" />
</WriteCodeFragment>
<ItemGroup Condition="'$(_UseWriteCodeFragmentHack)' == 'true'">
<_LinesToWrite Include="// &lt;auto-generated&gt;" />
<_LinesToWrite Include="namespace FSharp" />
<_LinesToWrite Include="open System" />
<_LinesToWrite Include="open System.Reflection" />
<_LinesToWrite Include="[&lt;assembly: %(_AssemblyVersionAttributes.Identity)(&quot;%(_AssemblyVersionAttributes._Parameter1)&quot;)&gt;]" />
<_LinesToWrite Include="do()" />
<Compile Include="$(GeneratedFSharpAssemblyVersionFile)" Condition="'$(Language)' != 'F#' or '$(AssemblyName)' == 'FSharp.Core'" />
<CompileBefore Include="$(GeneratedFSharpAssemblyVersionFile)" Condition="'$(Language)' == 'F#' and '$(AssemblyName)' != 'FSharp.Core'" />
<FileWrites Include="$(GeneratedFSharpAssemblyVersionFile)" />
</ItemGroup>
<WriteLinesToFile File="$(GeneratedFSharpAssemblyVersionFile)"
Lines="@(_LinesToWrite)"
Overwrite="true"
Encoding="Unicode"
Condition="'$(_UseWriteCodeFragmentHack)' == 'true' and !Exists('$(GeneratedFSharpAssemblyVersionFile)')" />
</Target>
</Project>
<Project>
<PropertyGroup>
<GeneratedFSharpInternalsVisibleToFile>$(IntermediateOutputPath)$(MSBuildProjectName).InternalsVisibleTo$(DefaultLanguageSourceExtension)</GeneratedFSharpInternalsVisibleToFile>
</PropertyGroup>
<ItemDefinitionGroup>
<InternalsVisibleTo>
<Visible>false</Visible>
</InternalsVisibleTo>
</ItemDefinitionGroup>
<Target Name="PrepareFSharpGenerateInternalsVisibleToFile"
Condition="'@(InternalsVisibleTo)' != ''">
<PropertyGroup Condition="'$(MonoPackaging)' != 'true'">
<_PublicKey>002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293</_PublicKey>
</PropertyGroup>
<PropertyGroup Condition="'$(MonoPackaging)' == 'true'">
<_PublicKey>002400000480000094000000060200000024000052534131000400000100010077d32e043d184cf8cebf177201ec6fad091581a3a639a0534f1c4ebb3ab847a6b6636990224a04cf4bd1aec51ecec44cf0c8922eb5bb2ee65ec3fb9baa87e141042c96ce414f98af33508c7e24dab5b068aa802f6693881537ee0efcb5d3f1c9aaf8215ac42e92ba9a5a02574d6890d07464cb2f338b043b1c4ffe98efe069ee</_PublicKey>
</PropertyGroup>
<ItemGroup>
<_InternalsVisibleToAttribute Include="System.Runtime.CompilerServices.InternalsVisibleToAttribute">
<_Parameter1 Condition="'%(InternalsVisibleTo.Key)' != ''">%(InternalsVisibleTo.Identity), PublicKey=%(InternalsVisibleTo.Key)</_Parameter1>
<_Parameter1 Condition="'%(InternalsVisibleTo.Key)' == ''">%(InternalsVisibleTo.Identity), PublicKey=$(_PublicKey)</_Parameter1>
</_InternalsVisibleToAttribute>
</ItemGroup>
</Target>
<Target Name="GenerateFSharpInternalsVisibleToFile"
Inputs="$(MSBuildProjectFile)"
Outputs="$(GeneratedFSharpInternalsVisibleToFile)"
DependsOnTargets="PrepareFSharpGenerateInternalsVisibleToFile;PrepareForBuild"
Condition="'@(InternalsVisibleTo)' != ''"
BeforeTargets="CoreCompile">
<PropertyGroup>
<!-- xbuild and older versions of msbuild don't have F# support for WriteCodeFragment -->
<_UseWriteCodeFragmentHack Condition="'$(OS)' == 'Unix' and '$(Language)' == 'F#'">true</_UseWriteCodeFragmentHack>
</PropertyGroup>
<!--
Using WriteCodeFragment
-->
<WriteCodeFragment AssemblyAttributes="@(_InternalsVisibleToAttribute)"
Language="$(Language)"
OutputFile="$(GeneratedFSharpInternalsVisibleToFile)"
Condition="'$(_UseWriteCodeFragmentHack)' != 'true'">
<Output TaskParameter="OutputFile" ItemName="CompileBefore" Condition="'$(Language)' == 'F#'" />
<Output TaskParameter="OutputFile" ItemName="Compile" Condition="'$(Language)' != 'F#'" />
<Output TaskParameter="OutputFile" ItemName="FileWrites" />
</WriteCodeFragment>
<!--
Using WriteLinesToFile
-->
<Message Text="Using `WriteLinesToFile` hack; writing to $(GeneratedFSharpInternalsVisibleToFile)" Condition="'$(_UseWriteCodeFragmentHack)' == 'true'" />
<ItemGroup Condition="'$(_UseWriteCodeFragmentHack)' == 'true'">
<_LinesToWrite Include="// &lt;auto-generated&gt;" />
<_LinesToWrite Include="namespace FSharp" />
<_LinesToWrite Include="open System" />
<_LinesToWrite Include="open System.Reflection" />
<_LinesToWrite Include="[&lt;assembly: %(_InternalsVisibleToAttribute.Identity)(&quot;%(_InternalsVisibleToAttribute._Parameter1)&quot;)&gt;]" />
<_LinesToWrite Include="do()" />
<Compile Include="$(GeneratedFSharpInternalsVisibleToFile)" Condition="'$(Language)' != 'F#' or '$(AssemblyName)' == 'FSharp.Core'" />
<CompileBefore Include="$(GeneratedFSharpInternalsVisibleToFile)" Condition="'$(Language)' == 'F#' and '$(AssemblyName)' != 'FSharp.Core'" />
<FileWrites Include="$(GeneratedFSharpInternalsVisibleToFile)" />
</ItemGroup>
<WriteLinesToFile File="$(GeneratedFSharpInternalsVisibleToFile)"
Lines="@(_LinesToWrite)"
Overwrite="true"
Encoding="Unicode"
Condition="'$(_UseWriteCodeFragmentHack)' == 'true' and !Exists('$(GeneratedFSharpInternalsVisibleToFile)')" />
</Target>
</Project>
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<!--
Copied from RepoToolset. Might be slightly modified to adjust for the current F# build system specifics if necessary.
-->
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
Defines the following properties:
GitHeadSha
-->
<PropertyGroup>
<RepoRoot Condition="'$(RepoRoot)' == ''">$(MSBuildThisFileDirectory)..\..\</RepoRoot>
</PropertyGroup>
<Choose>
<When Condition="'$(BUILD_SOURCEVERSION)' != ''">
<PropertyGroup>
<GitHeadSha>$(BUILD_SOURCEVERSION)</GitHeadSha>
</PropertyGroup>
</When>
<When Condition="'$(BUILD_SOURCEVERSION)' == '' and '$(GIT_COMMIT)' != ''">
<PropertyGroup>
<GitHeadSha>$(GIT_COMMIT)</GitHeadSha>
</PropertyGroup>
</When>
<When Condition="'$(CI)' != '1'">
<PropertyGroup>
<GitHeadSha>&lt;developer build&gt;</GitHeadSha>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<GitHeadSha></GitHeadSha>
<_DotGitDir>$(RepoRoot).git</_DotGitDir>
<_HeadFileContent Condition="Exists('$(_DotGitDir)/HEAD')">$([System.IO.File]::ReadAllText('$(_DotGitDir)/HEAD').Trim())</_HeadFileContent>
<_RefPath Condition="$(_HeadFileContent.StartsWith('ref: '))">$(_DotGitDir)/$(_HeadFileContent.Substring(5))</_RefPath>
<GitHeadSha Condition="'$(_RefPath)' != '' and Exists('$(_RefPath)')">$([System.IO.File]::ReadAllText('$(_RefPath)').Trim())</GitHeadSha>
<GitHeadSha Condition="'$(_HeadFileContent)' != '' and '$(_RefPath)' == ''">$(_HeadFileContent)</GitHeadSha>
</PropertyGroup>
</Otherwise>
</Choose>
</Project>
<Project>
<Target Name="NGenWindowsBinaries"
AfterTargets="AfterBuild"
DependsOnTargets="CheckAdministratorPrivilege"
Condition="'$(OS)' != 'Unix' AND
$(TargetFramework.StartsWith('net4')) AND
'$(NGenBinary)' == 'true' AND
Exists('$(TargetPath)') ">
<PropertyGroup>
<PathToNGen64>$(windir)\Microsoft.NET\Framework64\v4.0.30319\ngen.exe</PathToNGen64>
<PathToNGen32>$(windir)\Microsoft.NET\Framework\v4.0.30319\ngen.exe</PathToNGen32>
</PropertyGroup>
<!--
NGen for both 32 and 64 bit product.
If compiling use the app config file, if present.
-->
<Exec Command='"$(PathToNGen64)" install "$(TargetPath)" /ExeConfig:$(TargetPath)' Condition = "Exists('$(PathToNGen64)') AND Exists('$(TargetPath).config') AND '$(IsAdministrator)' == 'true' AND '$(PlatformTarget)' != 'x86'"/>
<Exec Command='"$(PathToNGen32)" install "$(TargetPath)" /ExeConfig:$(TargetPath)' Condition = "Exists('$(PathToNGen32)') AND Exists('$(TargetPath).config') AND '$(IsAdministrator)' == 'true'"/>
<Exec Command='"$(PathToNGen64)" install "$(TargetPath)"' Condition = " Exists('$(PathToNGen64)') AND (!Exists('$(TargetPath).config')) AND '$(IsAdministrator)' == 'true' AND '$(PlatformTarget)' != 'x86' "/>
<Exec Command='"$(PathToNGen32)" install "$(TargetPath)"' Condition = " Exists('$(PathToNGen32)') AND (!Exists('$(TargetPath).config')) AND '$(IsAdministrator)' == 'true' "/>
</Target>
<!-- Amazingly the net session command returns 0 if in an administrator session and > 0 if not -->
<Target Name="CheckAdministratorPrivilege" Condition="'$(OS)' != 'Unix'">
<Exec Command="NET SESSION" ConsoleToMSBuild="false" ContinueOnError="true">
<Output TaskParameter="ExitCode" PropertyName="ErrorCode"/>
</Exec>
<PropertyGroup>
<IsAdministrator Condition = " '$(ErrorCode)' == '0' ">true</IsAdministrator>
<IsAdministrator Condition = " '$(ErrorCode)' != '0' ">false</IsAdministrator>
</PropertyGroup>
</Target>
</Project>
#
# This script controls the F# build process. This encompasess everything from build, testing to
# publishing of NuGet packages. The intent is to structure it to allow for a simple flow of logic
# between the following phases:
#
# - restore
# - build
# - sign
# - pack
# - test
# - publish
#
# Each of these phases has a separate command which can be executed independently. For instance
# it's fine to call `build.ps1 -build -testDesktop` followed by repeated calls to
# `.\build.ps1 -testDesktop`.
[CmdletBinding(PositionalBinding=$false)]
param (
[string][Alias('c')]$configuration = "Debug",
[string][Alias('v')]$verbosity = "m",
[string]$msbuildEngine = "vs",
# Actions
[switch][Alias('r')]$restore,
[switch][Alias('b')]$build,
[switch]$rebuild,
[switch]$sign,
[switch]$pack,
[switch]$publish,
[switch]$launch,
[switch]$help,
# Options
[switch][Alias('proto')]$bootstrap,
[string]$bootstrapConfiguration = "Proto",
[string]$bootstrapTfm = "net46",
[switch][Alias('bl')]$binaryLog,
[switch]$ci,
[switch]$official,
[switch]$procdump,
[switch]$deployExtensions,
[switch]$prepareMachine,
[switch]$useGlobalNuGetCache = $true,
[switch]$warnAsError = $true,
[switch][Alias('test')]$testDesktop,
[switch]$testCoreClr,
[switch]$testFSharpQA,
[switch]$testVs,
[switch]$testAll,
[parameter(ValueFromRemainingArguments=$true)][string[]]$properties)
Set-StrictMode -version 2.0
$ErrorActionPreference = "Stop"
function Print-Usage() {
Write-Host "Common settings:"
Write-Host " -configuration <value> Build configuration: 'Debug' or 'Release' (short: -c)"
Write-Host " -verbosity <value> Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]"
Write-Host " -deployExtensions Deploy built vsixes"
Write-Host " -binaryLog Create MSBuild binary log (short: -bl)"
Write-Host ""
Write-Host "Actions:"
Write-Host " -restore Restore packages (short: -r)"
Write-Host " -build Build main solution (short: -b)"
Write-Host " -rebuild Rebuild main solution"
Write-Host " -pack Build NuGet packages, VS insertion manifests and installer"
Write-Host " -sign Sign our binaries"
Write-Host " -publish Publish build artifacts (e.g. symbols)"
Write-Host " -launch Launch Visual Studio in developer hive"
Write-Host " -help Print help and exit"
Write-Host ""
Write-Host "Test actions"
Write-Host " -testAll Run all tests"
Write-Host " -testDesktop Run tests against full .NET Framework"
Write-Host " -testCoreClr Run tests against CoreCLR"
Write-Host " -testFSharpQA Run F# Cambridge tests"
Write-Host " -testVs Run F# editor unit tests"
Write-Host ""
Write-Host "Advanced settings:"
Write-Host " -ci Set when running on CI server"
Write-Host " -official Set when building an official build"
Write-Host " -bootstrap Build using a bootstrap compiler"
Write-Host " -msbuildEngine <value> Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)."
Write-Host " -procdump Monitor test runs with procdump"
Write-Host " -prepareMachine Prepare machine for CI run, clean up processes after build"
Write-Host " -useGlobalNuGetCache Use global NuGet cache."
Write-Host ""
Write-Host "Command line arguments starting with '/p:' are passed through to MSBuild."
}
# Process the command line arguments and establish defaults for the values which are not
# specified.
function Process-Arguments() {
if ($help -or (($properties -ne $null) -and ($properties.Contains("/help") -or $properties.Contains("/?")))) {
Print-Usage
exit 0
}
if ($testAll) {
$script:testDesktop = $True
$script:testCoreClr = $True
$script:testFSharpQA = $True
$script:testVs = $True
}
foreach ($property in $properties) {
if (!$property.StartsWith("/p:", "InvariantCultureIgnoreCase")) {
Write-Host "Invalid argument: $property"
Print-Usage
exit 1
}
}
}
function Update-Arguments() {
if (-Not (Test-Path "$ArtifactsDir\Bootstrap\fsc.exe")) {
$script:bootstrap = $True
}
}
function BuildSolution() {
# VisualFSharp.sln can't be built with dotnet due to WPF, WinForms and VSIX build task dependencies
$solution = "VisualFSharp.sln"
Write-Host "$($solution):"
$bl = if ($binaryLog) { "/bl:" + (Join-Path $LogDir "Build.binlog") } else { "" }
$projects = Join-Path $RepoRoot $solution
$officialBuildId = if ($official) { $env:BUILD_BUILDNUMBER } else { "" }
$toolsetBuildProj = InitializeToolset
$quietRestore = !$ci
$testTargetFrameworks = if ($testCoreClr) { "netcoreapp2.1" } else { "" }
# Do not set the property to true explicitly, since that would override value projects might set.
$suppressExtensionDeployment = if (!$deployExtensions) { "/p:DeployExtension=false" } else { "" }
MSBuild $toolsetBuildProj `
$bl `
/p:Configuration=$configuration `
/p:Projects=$projects `
/p:RepoRoot=$RepoRoot `
/p:Restore=$restore `
/p:Build=$build `
/p:Rebuild=$rebuild `
/p:Pack=$pack `
/p:Sign=$sign `
/p:Publish=$publish `
/p:ContinuousIntegrationBuild=$ci `
/p:OfficialBuildId=$officialBuildId `
/p:BootstrapBuildPath=$bootstrapDir `
/p:QuietRestore=$quietRestore `
/p:QuietRestoreBinaryLog=$binaryLog `
/p:TestTargetFrameworks=$testTargetFrameworks `
$suppressExtensionDeployment `
@properties
}
function TestAndAddToPath([string] $testPath) {
if (Test-Path $testPath) {
$env:PATH = "$testPath;$env:PATH"
Write-Host "Added [$testPath] to the path."
}
}
function UpdatePath() {
# add highest framework dir
$subdir = ""
foreach ($child in Get-ChildItem "$env:WINDIR\Microsoft.NET\Framework\v4.0.?????") {
$subdir = $child
}
TestAndAddToPath $subdir
# add windows SDK dir for ildasm.exe
foreach ($child in Get-ChildItem "${env:ProgramFiles(x86)}\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.?.? Tools") {
$subdir = $child
}
TestAndAddToPath $subdir
TestAndAddToPath "$ArtifactsDir\bin\fsc\$configuration\net46"
TestAndAddToPath "$ArtifactsDir\bin\fsiAnyCpu\$configuration\net46"
}
function VerifyAssemblyVersions() {
$fsiPath = Join-Path $ArtifactsDir "bin\fsi\$configuration\net46\fsi.exe"
# desktop fsi isn't always built
if (Test-Path $fsiPath) {
$asmVerCheckPath = "$RepoRoot\scripts"
Exec-Console $fsiPath """$asmVerCheckPath\AssemblyVersionCheck.fsx"" -- ""$ArtifactsDir"""
}
}
function TestUsingNUnit([string] $testProject, [string] $targetFramework) {
$dotnetPath = InitializeDotNetCli
$dotnetExe = Join-Path $dotnetPath "dotnet.exe"
$projectName = [System.IO.Path]::GetFileNameWithoutExtension($testProject)
$testLogPath = "$ArtifactsDir\TestResults\$configuration\${projectName}_$targetFramework.xml"
$testBinLogPath = "$LogDir\${projectName}_$targetFramework.binlog"
$args = "test $testProject --no-restore --no-build -c $configuration -f $targetFramework -v n --test-adapter-path . --logger ""nunit;LogFilePath=$testLogPath"" /bl:$testBinLogPath"
Exec-Console $dotnetExe $args
}
function Prepare-TempDir() {
Copy-Item (Join-Path $RepoRoot "tests\Resources\Directory.Build.props") $TempDir
Copy-Item (Join-Path $RepoRoot "tests\Resources\Directory.Build.targets") $TempDir
}
try {
Process-Arguments
. (Join-Path $PSScriptRoot "build-utils.ps1")
Update-Arguments
Push-Location $RepoRoot
if ($ci) {
Prepare-TempDir
}
if ($bootstrap) {
$bootstrapDir = Make-BootstrapBuild
}
if ($restore -or $build -or $rebuild -or $pack -or $sign -or $publish) {
BuildSolution
}
if ($build) {
VerifyAssemblyVersions
}
$desktopTargetFramework = "net46"
$coreclrTargetFramework = "netcoreapp2.0"
if ($testDesktop) {
TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.UnitTests\FSharp.Compiler.UnitTests.fsproj" -targetFramework $desktopTargetFramework
TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Build.UnitTests\FSharp.Build.UnitTests.fsproj" -targetFramework $desktopTargetFramework
TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj" -targetFramework $desktopTargetFramework
TestUsingNUnit -testProject "$RepoRoot\tests\fsharp\FSharpSuite.Tests.fsproj" -targetFramework $desktopTargetFramework
}
if ($testCoreClr) {
TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.UnitTests\FSharp.Compiler.UnitTests.fsproj" -targetFramework $coreclrTargetFramework
TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Build.UnitTests\FSharp.Build.UnitTests.fsproj" -targetFramework $coreclrTargetFramework
TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj" -targetFramework $coreclrTargetFramework
TestUsingNUnit -testProject "$RepoRoot\tests\fsharp\FSharpSuite.Tests.fsproj" -targetFramework $coreclrTargetFramework
}
if ($testFSharpQA) {
Push-Location "$RepoRoot\tests\fsharpqa\source"
$resultsRoot = "$ArtifactsDir\TestResults\$configuration"
$resultsLog = "test-net40-fsharpqa-results.log"
$errorLog = "test-net40-fsharpqa-errors.log"
$failLog = "test-net40-fsharpqa-errors"
$perlExe = "$env:USERPROFILE\.nuget\packages\StrawberryPerl64\5.22.2.1\Tools\perl\bin\perl.exe"
Create-Directory $resultsRoot
UpdatePath
$env:HOSTED_COMPILER = 1
$env:CSC_PIPE = "$env:USERPROFILE\.nuget\packages\Microsoft.Net.Compilers\2.7.0\tools\csc.exe"
$env:FSCOREDLLPATH = "$ArtifactsDir\bin\fsc\$configuration\net46\FSharp.Core.dll"
$env:LINK_EXE = "$RepoRoot\tests\fsharpqa\testenv\bin\link\link.exe"
$env:OSARCH = $env:PROCESSOR_ARCHITECTURE
Exec-Console $perlExe """$RepoRoot\tests\fsharpqa\testenv\bin\runall.pl"" -resultsroot ""$resultsRoot"" -results $resultsLog -log $errorLog -fail $failLog -cleanup:no -procs:$env:NUMBER_OF_PROCESSORS"
Pop-Location
}
if ($testVs) {
Write-Host "Environment Variables"
Get-Childitem Env:
TestUsingNUnit -testProject "$RepoRoot\vsintegration\tests\GetTypesVS.UnitTests\GetTypesVS.UnitTests.fsproj" -targetFramework $desktopTargetFramework
TestUsingNUnit -testProject "$RepoRoot\vsintegration\tests\UnitTests\VisualFSharp.UnitTests.fsproj" -targetFramework $desktopTargetFramework
}
ExitWithExitCode 0
}
catch {
Write-Host $_
Write-Host $_.Exception
Write-Host $_.ScriptStackTrace
ExitWithExitCode 1
}
finally {
Pop-Location
}
@echo off
powershell -noprofile -executionPolicy RemoteSigned -file "%~dp0\Build.ps1" -ci -restore -build -bootstrap -pack -sign -publish -binaryLog %*
<?xml version="1.0" encoding="utf-8"?>
<Dependencies>
<ProductDependencies>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19170.12">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>9ba7a4ced36358fc130b762d25a83fa370c296c9</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>
<Project>
<PropertyGroup>
<!-- opt-out properties -->
<UsingToolXUnit>false</UsingToolXUnit>
<!-- opt-in properties -->
<UsingToolNetFrameworkReferenceAssemblies>true</UsingToolNetFrameworkReferenceAssemblies>
<UsingToolNuGetRepack>true</UsingToolNuGetRepack>
<UsingToolSourceLink>true</UsingToolSourceLink>
<UsingToolSymbolUploader>true</UsingToolSymbolUploader>
<UsingToolVSSDK>true</UsingToolVSSDK>
</PropertyGroup>
<!-- Version number computation -->
<PropertyGroup>
<PreReleaseVersionLabel>beta</PreReleaseVersionLabel>
<FSCoreMajorVersion>4.5</FSCoreMajorVersion>
<FSCorePackageVersion>$(FSCoreMajorVersion).5</FSCorePackageVersion>
<FSCoreVersion>$(FSCoreMajorVersion).0</FSCoreVersion>
<FSCoreVersion Condition="'$(OfficialBuildId)' == ''">$(FSCoreVersion).0</FSCoreVersion><!-- PR builds should specify a 4-part version number -->
<FSPackageMajorVersion>10.2</FSPackageMajorVersion>
<FSPackageVersion>$(FSPackageMajorVersion).3</FSPackageVersion>
<FSProductVersion>$(FSPackageVersion)</FSProductVersion>
<FSProductVersion Condition="'$(OfficialBuildId)' == ''">$(FSProductVersion).0</FSProductVersion><!-- PR builds should specify a 4-part version number -->
<VSMajorVersion>15</VSMajorVersion>
<VSMinorVersion>9</VSMinorVersion>
<VSGeneralVersion>$(VSMajorVersion).0</VSGeneralVersion>
<VSAssemblyVersion>$(VSMajorVersion).$(VSMinorVersion).0</VSAssemblyVersion>
<VSAssemblyVersion Condition="'$(OfficialBuildId)' == ''">$(VSAssemblyVersion).0</VSAssemblyVersion><!-- PR builds should specify a 4-part version number -->
</PropertyGroup>
<!-- version number assignment -->
<PropertyGroup>
<VersionPrefix>$(FSCoreVersion)</VersionPrefix>
<VersionPrefix Condition="'$(UseFSharpProductVersion)' == 'true'">$(FSProductVersion)</VersionPrefix>
<VersionPrefix Condition="'$(UseVsMicroBuildAssemblyVersion)' == 'true'">$(VSAssemblyVersion)</VersionPrefix>
<VsixVersionPrefix>$(VSMajorVersion).$(VSMinorVersion).0</VsixVersionPrefix>
<AssemblyVersion Condition="'$(OfficialBuildId)' == ''">$(VersionPrefix)</AssemblyVersion><!-- PR builds should explicitly specify a version number -->
</PropertyGroup>
<PropertyGroup>
<!-- default package sources -->
......@@ -13,14 +56,14 @@
https://api.nuget.org/v3/index.json;
https://dotnet.myget.org/F/roslyn/api/v3/index.json;
https://dotnet.myget.org/F/symreader-converter/api/v3/index.json;
https://myget.org/F/vs-devcore/api/v3/index.json;
https://myget.org/F/vs-editor/api/v3/index.json;
https://vside.myget.org/F/vssdk/api/v3/index.json;
https://vside.myget.org/F/vs-impl/api/v3/index.json;
</RestoreSources>
<!-- synchronized build package sources -->
<RestoreSources Condition="'$(PB_RestoreSource)' != ''">$(PB_RestoreSource);$(RestoreSources)</RestoreSources>
<DotNetPackageVersionPropsPath>$(MSBuildThisFileDirectory)..\..\artifacts\dependencyUptake\PackageVersions.props</DotNetPackageVersionPropsPath>
<!-- version numbers from files -->
<RoslynPackageVersion>$([System.IO.File]::ReadAllText('$(MSBuildThisFileDirectory)..\..\RoslynPackageVersion.txt').Trim())</RoslynPackageVersion>
<RoslynPackageVersion>$([System.IO.File]::ReadAllText('$(MSBuildThisFileDirectory)..\RoslynPackageVersion.txt').Trim())</RoslynPackageVersion>
<!-- System.* packages -->
<SystemCollectionsImmutablePackageVersion>1.5.0</SystemCollectionsImmutablePackageVersion>
......@@ -66,14 +109,14 @@
<!-- Visual Studio packages -->
<EnvDTE80PackageVersion>8.0.1</EnvDTE80PackageVersion>
<MicrosoftVisualFSharpMicrosoftVisualStudioShellUIInternalPackageVersion>14.0.25420</MicrosoftVisualFSharpMicrosoftVisualStudioShellUIInternalPackageVersion>
<MicrosoftVisualStudioCoreUtilityPackageVersion>15.6.27740</MicrosoftVisualStudioCoreUtilityPackageVersion>
<MicrosoftVisualStudioCoreUtilityPackageVersion>15.8.525</MicrosoftVisualStudioCoreUtilityPackageVersion>
<MicrosoftVisualStudioComponentModelHostPackageVersion>15.0.26201-alpha</MicrosoftVisualStudioComponentModelHostPackageVersion>
<MicrosoftVisualStudioDesignerInterfacesPackageVersion>1.1.4322</MicrosoftVisualStudioDesignerInterfacesPackageVersion>
<MicrosoftVisualStudioEditorPackageVersion>15.0.26201</MicrosoftVisualStudioEditorPackageVersion>
<MicrosoftVisualStudioEditorPackageVersion>15.8.525</MicrosoftVisualStudioEditorPackageVersion>
<MicrosoftVisualStudioImagingPackageVersion>15.0.26201</MicrosoftVisualStudioImagingPackageVersion>
<MicrosoftVisualStudioLanguageStandardClassificationPackageVersion>15.6.27740</MicrosoftVisualStudioLanguageStandardClassificationPackageVersion>
<MicrosoftVisualStudioLanguagePackageVersion>15.6.27740</MicrosoftVisualStudioLanguagePackageVersion>
<MicrosoftVisualStudioLanguageIntellisensePackageVersion>15.6.27740</MicrosoftVisualStudioLanguageIntellisensePackageVersion>
<MicrosoftVisualStudioLanguageStandardClassificationPackageVersion>15.8.525</MicrosoftVisualStudioLanguageStandardClassificationPackageVersion>
<MicrosoftVisualStudioLanguagePackageVersion>15.8.525</MicrosoftVisualStudioLanguagePackageVersion>
<MicrosoftVisualStudioLanguageIntellisensePackageVersion>15.8.525</MicrosoftVisualStudioLanguageIntellisensePackageVersion>
<MicrosoftVisualStudioManagedInterfacesPackageVersion>8.0.50727</MicrosoftVisualStudioManagedInterfacesPackageVersion>
<MicrosoftVisualStudioOLEInteropPackageVersion>7.10.6071</MicrosoftVisualStudioOLEInteropPackageVersion>
<MicrosoftVisualStudioPackageLanguageService150PackageVersion>15.0.26201</MicrosoftVisualStudioPackageLanguageService150PackageVersion>
......@@ -82,7 +125,7 @@
<MicrosoftVisualStudioShell140PackageVersion>14.3.25407</MicrosoftVisualStudioShell140PackageVersion>
<MicrosoftVisualStudioShell150PackageVersion>15.0.26201</MicrosoftVisualStudioShell150PackageVersion>
<MicrosoftVisualStudioShellDesignPackageVersion>15.0.26201</MicrosoftVisualStudioShellDesignPackageVersion>
<MicrosoftVisualStudioShellFrameworkPackageVersion>15.0.26201</MicrosoftVisualStudioShellFrameworkPackageVersion>
<MicrosoftVisualStudioShellFrameworkPackageVersion>15.9.28307</MicrosoftVisualStudioShellFrameworkPackageVersion>
<MicrosoftVisualStudioShellImmutable100PackageVersion>10.0.30319</MicrosoftVisualStudioShellImmutable100PackageVersion>
<MicrosoftVisualStudioShellImmutable110PackageVersion>11.0.50727</MicrosoftVisualStudioShellImmutable110PackageVersion>
<MicrosoftVisualStudioShellImmutable150PackageVersion>15.0.25123-Dev15Preview</MicrosoftVisualStudioShellImmutable150PackageVersion>
......@@ -92,18 +135,18 @@
<MicrosoftVisualStudioShellInterop100PackageVersion>10.0.30319</MicrosoftVisualStudioShellInterop100PackageVersion>
<MicrosoftVisualStudioShellInterop110PackageVersion>11.0.61030</MicrosoftVisualStudioShellInterop110PackageVersion>
<MicrosoftVisualStudioShellInterop120PackageVersion>12.0.30110</MicrosoftVisualStudioShellInterop120PackageVersion>
<MicrosoftVisualStudioTextDataPackageVersion>15.6.27740</MicrosoftVisualStudioTextDataPackageVersion>
<MicrosoftVisualStudioTextDataPackageVersion>15.8.525</MicrosoftVisualStudioTextDataPackageVersion>
<MicrosoftVisualStudioTextManagerInteropPackageVersion>7.10.6071</MicrosoftVisualStudioTextManagerInteropPackageVersion>
<MicrosoftVisualStudioTextManagerInterop80PackageVersion>8.0.50727</MicrosoftVisualStudioTextManagerInterop80PackageVersion>
<MicrosoftVisualStudioTextManagerInterop100PackageVersion>10.0.30319</MicrosoftVisualStudioTextManagerInterop100PackageVersion>
<MicrosoftVisualStudioTextManagerInterop120PackageVersion>12.0.30112</MicrosoftVisualStudioTextManagerInterop120PackageVersion>
<MicrosoftVisualStudioTextUIPackageVersion>15.6.27740</MicrosoftVisualStudioTextUIPackageVersion>
<MicrosoftVisualStudioTextUIWpfPackageVersion>15.6.27740</MicrosoftVisualStudioTextUIWpfPackageVersion>
<MicrosoftVisualStudioThreadingPackageVersion>15.3.23</MicrosoftVisualStudioThreadingPackageVersion>
<MicrosoftVisualStudioTextUIPackageVersion>15.8.525</MicrosoftVisualStudioTextUIPackageVersion>
<MicrosoftVisualStudioTextUIWpfPackageVersion>15.8.525</MicrosoftVisualStudioTextUIWpfPackageVersion>
<MicrosoftVisualStudioThreadingPackageVersion>15.8.209</MicrosoftVisualStudioThreadingPackageVersion>
<MicrosoftVisualStudioUtilitiesPackageVersion>15.0.26201</MicrosoftVisualStudioUtilitiesPackageVersion>
<MicrosoftVisualStudioValidationPackageVersion>15.3.15</MicrosoftVisualStudioValidationPackageVersion>
<MicrosoftVisualStudioWCFReferenceInteropPackageVersion>9.0.30729</MicrosoftVisualStudioWCFReferenceInteropPackageVersion>
<MicrosoftVSSDKBuildToolsPackageVersion>15.6.170</MicrosoftVSSDKBuildToolsPackageVersion>
<MicrosoftVSSDKBuildToolsVersion>15.7.109</MicrosoftVSSDKBuildToolsVersion>
<VSSDKDebuggerVisualizersPackageVersion>12.0.4</VSSDKDebuggerVisualizersPackageVersion>
<VSSDKVSLangProjPackageVersion>7.0.4</VSSDKVSLangProjPackageVersion>
<VSSDKVSLangProj8PackageVersion>8.0.4</VSSDKVSLangProj8PackageVersion>
......@@ -114,13 +157,10 @@
<MicroBuildCorePackageVersion>0.2.0</MicroBuildCorePackageVersion>
<MicroBuildCoreSentinelPackageVersion>1.0.0</MicroBuildCoreSentinelPackageVersion>
<MicroBuildPluginsSwixBuildPackageVersion>1.0.147</MicroBuildPluginsSwixBuildPackageVersion>
<MicrosoftPortableFSharpCorePackageVersion>10.1.0</MicrosoftPortableFSharpCorePackageVersion>
<MicrosoftVisualFSharpCoreRedistPackageVersion>1.0.0</MicrosoftVisualFSharpCoreRedistPackageVersion>
<!-- other packages -->
<FsCheckPackageVersion>3.0.0-alpha4</FsCheckPackageVersion>
<MicrosoftCompositionPackageVersion>1.0.30</MicrosoftCompositionPackageVersion>
<Pdb2PdbPackageVersion>1.1.0-beta1-63314-01</Pdb2PdbPackageVersion>
<MicrosoftMSXMLPackageVersion>8.0.0-alpha</MicrosoftMSXMLPackageVersion>
<MicrosoftNetCompilersPackageVersion>2.7.0</MicrosoftNetCompilersPackageVersion>
<MicrosoftNETCoreILDAsmPackageVersion>2.0.3</MicrosoftNETCoreILDAsmPackageVersion>
......@@ -128,16 +168,13 @@
<MicrosoftVisualFSharpTypeProvidersRedistPackageVersion>1.0.0</MicrosoftVisualFSharpTypeProvidersRedistPackageVersion>
<MicrosoftWin32RegistryPackageVersion>4.3.0</MicrosoftWin32RegistryPackageVersion>
<NewtonsoftJsonPackageVersion>9.0.1</NewtonsoftJsonPackageVersion>
<NUnitPackageVersion>3.10.1</NUnitPackageVersion>
<NUnit3TestAdapterPackageVersion>3.10.0</NUnit3TestAdapterPackageVersion>
<NUnitLitePackageVersion>3.10.1</NUnitLitePackageVersion>
<NUnitPackageVersion>3.11.0</NUnitPackageVersion>
<NUnit3TestAdapterPackageVersion>3.11.2</NUnit3TestAdapterPackageVersion>
<NUnitLitePackageVersion>3.11.0</NUnitLitePackageVersion>
<NunitXmlTestLoggerPackageVersion>2.1.36</NunitXmlTestLoggerPackageVersion>
<RoslynToolsSignToolPackageVersion>1.0.0-beta2-dev3</RoslynToolsSignToolPackageVersion>
<StrawberryPerl64PackageVersion>5.22.2.1</StrawberryPerl64PackageVersion>
<XliffTasksPackageVersion>0.2.0-beta-000081</XliffTasksPackageVersion>
</PropertyGroup>
<!-- dependency uptake version overrides -->
<Import Project="$(DotNetPackageVersionPropsPath)" Condition="'$(DotNetPackageVersionPropsPath)' != '' AND Exists('$(DotNetPackageVersionPropsPath)')" />
</Project>
# Collection of powershell build utility functions that we use across our scripts.
Set-StrictMode -version 2.0
$ErrorActionPreference="Stop"
# Import Arcade functions
. (Join-Path $PSScriptRoot "common\tools.ps1")
$VSSetupDir = Join-Path $ArtifactsDir "VSSetup\$configuration"
$PackagesDir = Join-Path $ArtifactsDir "packages\$configuration"
$binaryLog = if (Test-Path variable:binaryLog) { $binaryLog } else { $false }
$nodeReuse = if (Test-Path variable:nodeReuse) { $nodeReuse } else { $false }
$bootstrapDir = if (Test-Path variable:bootstrapDir) { $bootstrapDir } else { "" }
$bootstrapConfiguration = if (Test-Path variable:bootstrapConfiguration) { $bootstrapConfiguration } else { "Proto" }
$bootstrapTrm = if (Test-Path variable:bootstrapTfm) { $bootstrapConfiguration } else { "net46" }
$properties = if (Test-Path variable:properties) { $properties } else { @() }
function GetProjectOutputBinary([string]$fileName, [string]$projectName = "", [string]$configuration = $script:configuration, [string]$tfm = "net46", [string]$rid = "", [bool]$published = $false) {
$projectName = if ($projectName -ne "") { $projectName } else { [System.IO.Path]::GetFileNameWithoutExtension($fileName) }
$publishDir = if ($published) { "publish\" } else { "" }
$ridDir = if ($rid -ne "") { "$rid\" } else { "" }
return Join-Path $ArtifactsDir "bin\$projectName\$configuration\$tfm\$ridDir$publishDir$fileName"
}
# Handy function for executing a command in powershell and throwing if it
# fails.
#
# Use this when the full command is known at script authoring time and
# doesn't require any dynamic argument build up. Example:
#
# Exec-Block { & $msbuild Test.proj }
#
# Original sample came from: http://jameskovacs.com/2010/02/25/the-exec-problem/
function Exec-Block([scriptblock]$cmd) {
& $cmd
# Need to check both of these cases for errors as they represent different items
# - $?: did the powershell script block throw an error
# - $lastexitcode: did a windows command executed by the script block end in error
if ((-not $?) -or ($lastexitcode -ne 0)) {
throw "Command failed to execute: $cmd"
}
}
function Exec-CommandCore([string]$command, [string]$commandArgs, [switch]$useConsole = $true) {
if ($useConsole) {
$exitCode = Exec-Process $command $commandArgs
if ($exitCode -ne 0) {
throw "Command failed to execute with exit code $($exitCode): $command $commandArgs"
}
return
}
$startInfo = New-Object System.Diagnostics.ProcessStartInfo
$startInfo.FileName = $command
$startInfo.Arguments = $commandArgs
$startInfo.UseShellExecute = $false
$startInfo.WorkingDirectory = Get-Location
$startInfo.RedirectStandardOutput = $true
$startInfo.CreateNoWindow = $true
$process = New-Object System.Diagnostics.Process
$process.StartInfo = $startInfo
$process.Start() | Out-Null
$finished = $false
try {
# The OutputDataReceived event doesn't fire as events are sent by the
# process in powershell. Possibly due to subtlties of how Powershell
# manages the thread pool that I'm not aware of. Using blocking
# reading here as an alternative which is fine since this blocks
# on completion already.
$out = $process.StandardOutput
while (-not $out.EndOfStream) {
$line = $out.ReadLine()
Write-Output $line
}
while (-not $process.WaitForExit(100)) {
# Non-blocking loop done to allow ctr-c interrupts
}
$finished = $true
if ($process.ExitCode -ne 0) {
throw "Command failed to execute with exit code $($process.ExitCode): $command $commandArgs"
}
}
finally {
# If we didn't finish then an error occured or the user hit ctrl-c. Either
# way kill the process
if (-not $finished) {
$process.Kill()
}
}
}
# Handy function for executing a windows command which needs to go through
# windows command line parsing.
#
# Use this when the command arguments are stored in a variable. Particularly
# when the variable needs reparsing by the windows command line. Example:
#
# $args = "/p:ManualBuild=true Test.proj"
# Exec-Command $msbuild $args
#
function Exec-Command([string]$command, [string]$commandArgs) {
Exec-CommandCore -command $command -commandArgs $commandargs -useConsole:$false
}
# Functions exactly like Exec-Command but lets the process re-use the current
# console. This means items like colored output will function correctly.
#
# In general this command should be used in place of
# Exec-Command $msbuild $args | Out-Host
#
function Exec-Console([string]$command, [string]$commandArgs) {
Exec-CommandCore -command $command -commandArgs $commandargs -useConsole:$true
}
# Handy function for executing a powershell script in a clean environment with
# arguments. Prefer this over & sourcing a script as it will both use a clean
# environment and do proper error checking
function Exec-Script([string]$script, [string]$scriptArgs = "") {
Exec-Command "powershell" "-noprofile -executionPolicy RemoteSigned -file `"$script`" $scriptArgs"
}
# Ensure the proper .NET Core SDK is available. Returns the location to the dotnet.exe.
function Ensure-DotnetSdk() {
return Join-Path (InitializeDotNetCli -install:$true) "dotnet.exe"
}
function Get-VersionCore([string]$name, [string]$versionFile) {
$name = $name.Replace(".", "")
$name = $name.Replace("-", "")
$nodeName = "$($name)Version"
$x = [xml](Get-Content -raw $versionFile)
$node = $x.SelectSingleNode("//Project/PropertyGroup/$nodeName")
if ($node -ne $null) {
return $node.InnerText
}
throw "Cannot find package $name in $versionFile"
}
# Return the version of the NuGet package as used in this repo
function Get-PackageVersion([string]$name) {
return Get-VersionCore $name (Join-Path $EngRoot "Versions.props")
}
# Locate the directory where our NuGet packages will be deployed. Needs to be kept in sync
# with the logic in Version.props
function Get-PackagesDir() {
$d = $null
if ($env:NUGET_PACKAGES -ne $null) {
$d = $env:NUGET_PACKAGES
}
else {
$d = Join-Path $env:UserProfile ".nuget\packages\"
}
Create-Directory $d
return $d
}
# Locate the directory of a specific NuGet package which is restored via our main
# toolset values.
function Get-PackageDir([string]$name, [string]$version = "") {
if ($version -eq "") {
$version = Get-PackageVersion $name
}
$p = Get-PackagesDir
$p = Join-Path $p $name.ToLowerInvariant()
$p = Join-Path $p $version
return $p
}
function Run-MSBuild([string]$projectFilePath, [string]$buildArgs = "", [string]$logFileName = "", [switch]$parallel = $true, [switch]$summary = $true, [switch]$warnAsError = $true, [string]$configuration = $script:configuration) {
# Because we override the C#/VB toolset to build against our LKG package, it is important
# that we do not reuse MSBuild nodes from other jobs/builds on the machine. Otherwise,
# we'll run into issues such as https://github.com/dotnet/roslyn/issues/6211.
# MSBuildAdditionalCommandLineArgs=
$args = "/p:TreatWarningsAsErrors=true /nologo /nodeReuse:false /p:Configuration=$configuration ";
if ($warnAsError) {
$args += " /warnaserror"
}
if ($summary) {
$args += " /consoleloggerparameters:Verbosity=minimal;summary"
} else {
$args += " /consoleloggerparameters:Verbosity=minimal"
}
if ($parallel) {
$args += " /m"
}
if ($binaryLog) {
if ($logFileName -eq "") {
$logFileName = [IO.Path]::GetFileNameWithoutExtension($projectFilePath)
}
$logFileName = [IO.Path]::ChangeExtension($logFileName, ".binlog")
$logFilePath = Join-Path $LogDir $logFileName
$args += " /bl:$logFilePath"
}
if ($official) {
$args += " /p:OfficialBuildId=" + $env:BUILD_BUILDNUMBER
}
if ($ci) {
$args += " /p:ContinuousIntegrationBuild=true"
}
if ($bootstrapDir -ne "") {
$args += " /p:BootstrapBuildPath=$bootstrapDir"
}
$args += " $buildArgs"
$args += " $projectFilePath"
$args += " $properties"
$buildTool = InitializeBuildTool
Exec-Console $buildTool.Path "$($buildTool.Command) $args"
}
# Create a bootstrap build of the compiler. Returns the directory where the bootstrap build
# is located.
#
# Important to not set $script:bootstrapDir here yet as we're actually in the process of
# building the bootstrap.
function Make-BootstrapBuild() {
Write-Host "Building bootstrap compiler"
$dir = Join-Path $ArtifactsDir "Bootstrap"
Remove-Item -re $dir -ErrorAction SilentlyContinue
Create-Directory $dir
# prepare FsLex and Fsyacc
Run-MSBuild "$RepoRoot\src\buildtools\buildtools.proj" "/restore /t:Build" -logFileName "BuildTools" -configuration $bootstrapConfiguration
Copy-Item "$ArtifactsDir\bin\fslex\$bootstrapConfiguration\netcoreapp2.0\*" -Destination $dir
Copy-Item "$ArtifactsDir\bin\fsyacc\$bootstrapConfiguration\netcoreapp2.0\*" -Destination $dir
# prepare compiler
$projectPath = "$RepoRoot\proto.proj"
Run-MSBuild $projectPath "/restore /t:Build" -logFileName "Bootstrap" -configuration $bootstrapConfiguration
Copy-Item "$ArtifactsDir\bin\fsc\$bootstrapConfiguration\$bootstrapTfm\*" -Destination $dir
Write-Host "Cleaning Bootstrap compiler artifacts"
Run-MSBuild $projectPath "/t:Clean" -logFileName "BootstrapClean" -configuration $bootstrapConfiguration
return $dir
}
#!/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.
# Stop script if unbound variable found (use ${var:-} if intentional)
set -u
usage()
{
echo "Common settings:"
echo " --configuration <value> Build configuration: 'Debug' or 'Release' (short: -c)"
echo " --verbosity <value> Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] (short: -v)"
echo " --binaryLog Create MSBuild binary log (short: -bl)"
echo ""
echo "Actions:"
echo " --restore Restore projects required to build (short: -r)"
echo " --build Build all projects (short: -b)"
echo " --rebuild Rebuild all projects"
echo " --pack Build nuget packages"
echo " --publish Publish build artifacts"
echo " --help Print help and exit"
echo ""
echo "Test actions:"
echo " --testcoreclr Run unit tests on .NET Core (short: --test, -t)"
echo ""
echo "Advanced settings:"
echo " --ci Building in CI"
echo " --docker Run in a docker container if applicable"
echo " --skipAnalyzers Do not run analyzers during build operations"
echo " --prepareMachine Prepare machine for CI run, clean up processes after build"
echo ""
echo "Command line arguments starting with '/p:' are passed through to MSBuild."
}
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 )"
restore=false
build=false
rebuild=false
pack=false
publish=false
test_core_clr=false
configuration="Debug"
verbosity='minimal'
binary_log=false
ci=false
skip_analyzers=false
prepare_machine=false
properties=""
docker=false
args=""
if [[ $# = 0 ]]
then
usage
exit 1
fi
while [[ $# > 0 ]]; do
opt="$(echo "$1" | awk '{print tolower($0)}')"
case "$opt" in
--help|-h)
usage
exit 0
;;
--configuration|-c)
configuration=$2
args="$args $1"
shift
;;
--verbosity|-v)
verbosity=$2
args="$args $1"
shift
;;
--binarylog|-bl)
binary_log=true
;;
--restore|-r)
restore=true
;;
--build|-b)
build=true
;;
--rebuild)
rebuild=true
;;
--pack)
pack=true
;;
--publish)
publish=true
;;
--testcoreclr|--test|-t)
test_core_clr=true
;;
--ci)
ci=true
;;
--skipanalyzers)
skip_analyzers=true
;;
--preparemachine)
prepare_machine=true
;;
--docker)
docker=true
shift
continue
;;
/p:*)
properties="$properties $1"
;;
*)
echo "Invalid argument: $1"
usage
exit 1
;;
esac
args="$args $1"
shift
done
# Import Arcade functions
. "$scriptroot/common/tools.sh"
function TestUsingNUnit() {
testproject=""
targetframework=""
while [[ $# > 0 ]]; do
opt="$(echo "$1" | awk '{print tolower($0)}')"
case "$opt" in
--testproject)
testproject=$2
shift
;;
--targetframework)
targetframework=$2
shift
;;
*)
echo "Invalid argument: $1"
exit 1
;;
esac
shift
done
if [[ "$testproject" == "" || "$targetframework" == "" ]]; then
echo "--testproject and --targetframework must be specified"
exit 1
fi
projectname=$(basename -- "$testproject")
projectname="${projectname%.*}"
testlogpath="$artifacts_dir/TestResults/$configuration/${projectname}_$targetframework.xml"
args="test \"$testproject\" --no-restore --no-build -c $configuration -f $targetframework --test-adapter-path . --logger \"nunit;LogFilePath=$testlogpath\""
"$DOTNET_INSTALL_DIR/dotnet" $args
}
function BuildSolution {
local solution="FSharp.sln"
echo "$solution:"
InitializeToolset
local toolset_build_proj=$_InitializeToolset
local bl=""
if [[ "$binary_log" = true ]]; then
bl="/bl:\"$log_dir/Build.binlog\""
fi
local projects="$repo_root/$solution"
# https://github.com/dotnet/roslyn/issues/23736
local enable_analyzers=!$skip_analyzers
UNAME="$(uname)"
if [[ "$UNAME" == "Darwin" ]]; then
enable_analyzers=false
fi
# NuGet often exceeds the limit of open files on Mac and Linux
# https://github.com/NuGet/Home/issues/2163
if [[ "$UNAME" == "Darwin" || "$UNAME" == "Linux" ]]; then
ulimit -n 6500
fi
local quiet_restore=""
if [[ "$ci" != true ]]; then
quiet_restore=true
fi
# build bootstrap tools
bootstrap_config=Proto
MSBuild "$repo_root/src/buildtools/buildtools.proj" \
/restore \
/p:Configuration=$bootstrap_config \
/t:Build
bootstrap_dir=$artifacts_dir/Bootstrap
mkdir -p "$bootstrap_dir"
cp $artifacts_dir/bin/fslex/$bootstrap_config/netcoreapp2.0/* $bootstrap_dir
cp $artifacts_dir/bin/fsyacc/$bootstrap_config/netcoreapp2.0/* $bootstrap_dir
# do real build
MSBuild $toolset_build_proj \
$bl \
/p:Configuration=$configuration \
/p:Projects="$projects" \
/p:RepoRoot="$repo_root" \
/p:Restore=$restore \
/p:Build=$build \
/p:Rebuild=$rebuild \
/p:Pack=$pack \
/p:Publish=$publish \
/p:UseRoslynAnalyzers=$enable_analyzers \
/p:ContinuousIntegrationBuild=$ci \
/p:QuietRestore=$quiet_restore \
/p:QuietRestoreBinaryLog="$binary_log" \
$properties
}
InitializeDotNetCli $restore
BuildSolution
if [[ "$test_core_clr" == true ]]; then
TestUsingNUnit --testproject "$repo_root/tests/FSharp.Compiler.UnitTests/FSharp.Compiler.UnitTests.fsproj" --targetframework netcoreapp2.0
TestUsingNUnit --testproject "$repo_root/tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj" --targetframework netcoreapp2.0
TestUsingNUnit --testproject "$repo_root/tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj" --targetframework netcoreapp2.0
fi
ExitWithExitCode 0
#!/usr/bin/env bash
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)"
echo "Building this commit:"
git show --no-patch --pretty=raw HEAD
. "$scriptroot/build.sh" --ci --restore --build --pack --publish --binaryLog "$@"
......@@ -10,25 +10,57 @@
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>
<Import Project="$(MSBuildThisFileDirectory)MicrosoftDotNetBuildTasksFeedVersion.props" />
<Import Project="$(MSBuildThisFileDirectory)DefaultVersions.props" Condition="Exists('$(MSBuildThisFileDirectory)DefaultVersions.props')" />
<!--
This won't be necessary once we solve this issue:
https://github.com/dotnet/arcade/issues/2266
-->
<Import Project="$(MSBuildThisFileDirectory)ArtifactsCategory.props" Condition="Exists('$(MSBuildThisFileDirectory)ArtifactsCategory.props')" />
<Import Project="$(NuGetPackageRoot)microsoft.dotnet.build.tasks.feed\$(MicrosoftDotNetBuildTasksFeedVersion)\build\Microsoft.DotNet.Build.Tasks.Feed.targets" />
<Target Name="PublishToFeed">
<Error Condition="'$(TargetStaticFeed)' == ''" Text="TargetStaticFeed: Target feed for publishing assets wasn't provided." />
<Error Condition="'$(ArtifactsCategory)' == ''" Text="ArtifactsCategory: The artifacts' category produced by the build wasn't provided." />
<Error Condition="'$(AccountKeyToStaticFeed)' == ''" Text="AccountKeyToStaticFeed: Account key for target feed wasn't provided." />
<Error Condition="'$(FullPathAssetManifest)' == ''" Text="Full path to asset manifest wasn't provided." />
<Error Condition="'$(FullPathBlobBasePath)' == '' AND '$(FullPathPackageBasePath)' == ''" Text="A valid full path to BlobBasePath of PackageBasePath is required." />
<Error Condition="'$(ManifestsBasePath)' == ''" Text="Full path to asset manifests directory wasn't provided." />
<Error Condition="'$(BlobBasePath)' == '' AND '$(PackageBasePath)' == ''" Text="A valid full path to BlobBasePath of PackageBasePath is required." />
<ItemGroup>
<!-- Include all manifests found in the manifest folder. -->
<ManifestFiles Include="$(ManifestsBasePath)*.xml" />
</ItemGroup>
<Error Condition="'@(ManifestFiles)' == ''" Text="No manifest file was found in the provided path: $(ManifestsBasePath)" />
<!--
For now the type of packages being published will be informed for the whole build.
Eventually this will be specified on a per package basis:
TODO: https://github.com/dotnet/arcade/issues/2266
-->
<PropertyGroup>
<TargetStaticFeed Condition="'$(ArtifactsCategory.ToUpper())' == '.NETCORE'">https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json</TargetStaticFeed>
<TargetStaticFeed Condition="'$(ArtifactsCategory.ToUpper())' == '.NETCOREVALIDATION'">https://dotnetfeed.blob.core.windows.net/arcade-validation/index.json</TargetStaticFeed>
</PropertyGroup>
<Error
Condition="'$(TargetStaticFeed)' == ''"
Text="'$(ArtifactsCategory)' wasn't recognized as a valid artifact category. Valid categories are: '.NetCore' and '.NetCoreValidation'" />
<!-- Iterate publishing assets from each manifest file. -->
<PushArtifactsInManifestToFeed
ExpectedFeedUrl="$(TargetStaticFeed)"
AccountKey="$(AccountKeyToStaticFeed)"
BARBuildId="$(BARBuildId)"
MaestroApiEndpoint="$(MaestroApiEndpoint)"
BuildAssetRegistryToken="$(BuildAssetRegistryToken)"
Overwrite="$(OverrideAssetsWithSameName)"
PassIfExistingItemIdentical="$(PassIfExistingItemIdentical)"
MaxClients="$(MaxParallelUploads)"
UploadTimeoutInMinutes="$(MaxUploadTimeoutInMinutes)"
AssetManifestPath="$(FullPathAssetManifest)"
BlobAssetsBasePath="$(FullPathBlobBasePath)"
PackageAssetsBasePath="$(FullPathPackageBasePath)" />
AssetManifestPath="%(ManifestFiles.Identity)"
BlobAssetsBasePath="$(BlobBasePath)"
PackageAssetsBasePath="$(PackageBasePath)" />
</Target>
<ItemGroup>
......
......@@ -11,7 +11,7 @@ Param(
[switch][Alias('b')]$build,
[switch] $rebuild,
[switch] $deploy,
[switch] $test,
[switch][Alias('t')]$test,
[switch] $integrationTest,
[switch] $performanceTest,
[switch] $sign,
......@@ -40,10 +40,10 @@ function Print-Usage() {
Write-Host " -rebuild Rebuild solution"
Write-Host " -deploy Deploy built VSIXes"
Write-Host " -deployDeps Deploy dependencies (e.g. VSIXes for integration tests)"
Write-Host " -test Run all unit tests in the solution"
Write-Host " -pack Package build outputs into NuGet packages and Willow components"
Write-Host " -test Run all unit tests in the solution (short: -t)"
Write-Host " -integrationTest Run all integration tests in the solution"
Write-Host " -performanceTest Run all performance tests in the solution"
Write-Host " -pack Package build outputs into NuGet packages and Willow components"
Write-Host " -sign Sign build outputs"
Write-Host " -publish Publish artifacts (e.g. symbols)"
Write-Host ""
......@@ -51,9 +51,11 @@ function Print-Usage() {
Write-Host "Advanced settings:"
Write-Host " -projects <value> Semi-colon delimited list of sln/proj's to build. Globbing is supported (*.sln)"
Write-Host " -ci Set when running on CI server"
Write-Host " -prepareMachine Prepare machine for CI run"
Write-Host " -prepareMachine Prepare machine for CI run, clean up processes after build"
Write-Host " -warnAsError <value> Sets warnaserror msbuild parameter ('true' or 'false')"
Write-Host " -msbuildEngine <value> Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)."
Write-Host ""
Write-Host "Command line arguments not listed above are passed thru to msbuild."
Write-Host "The above arguments can be shortened as much as to be unambiguous (e.g. -co for configuration, -t for test, etc.)."
}
......@@ -99,12 +101,11 @@ function Build {
/p:PerformanceTest=$performanceTest `
/p:Sign=$sign `
/p:Publish=$publish `
/p:ContinuousIntegrationBuild=$ci `
@properties
}
try {
if ($help -or (($properties -ne $null) -and ($properties.Contains("/help") -or $properties.Contains("/?")))) {
if ($help -or (($null -ne $properties) -and ($properties.Contains("/help") -or $properties.Contains("/?")))) {
Print-Usage
exit 0
}
......
......@@ -10,20 +10,24 @@ set -e
usage()
{
echo "Common settings:"
echo " --configuration <value> Build configuration: 'Debug' or 'Release' (short: --c)"
echo " --configuration <value> Build configuration: 'Debug' or 'Release' (short: -c)"
echo " --verbosity <value> Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] (short: -v)"
echo " --binaryLog Create MSBuild binary log (short: -bl)"
echo " --help Print help and exit (short: -h)"
echo ""
echo "Actions:"
echo " --restore Restore dependencies (short: -r)"
echo " --build Build all projects (short: -b)"
echo " --rebuild Rebuild all projects"
echo " --test Run all unit tests (short: -t)"
echo " --build Build solution (short: -b)"
echo " --rebuild Rebuild solution"
echo " --test Run all unit tests in the solution (short: -t)"
echo " --integrationTest Run all integration tests in the solution"
echo " --performanceTest Run all performance tests in the solution"
echo " --pack Package build outputs into NuGet packages and Willow components"
echo " --sign Sign build outputs"
echo " --publish Publish artifacts (e.g. symbols)"
echo " --pack Package build outputs into NuGet packages and Willow components"
echo " --help Print help and exit (short: -h)"
echo ""
echo "Advanced settings:"
echo " --projects <value> Project or solution file(s) to build"
echo " --ci Set when running on CI server"
......@@ -32,6 +36,7 @@ usage()
echo " --warnAsError <value> Sets warnaserror msbuild parameter ('true' or 'false')"
echo ""
echo "Command line arguments starting with '/p:' are passed through to MSBuild."
echo "Arguments can also be passed in with a single hyphen."
}
source="${BASH_SOURCE[0]}"
......@@ -50,10 +55,10 @@ restore=false
build=false
rebuild=false
test=false
pack=false
publish=false
integration_test=false
performance_test=false
pack=false
publish=false
sign=false
public=false
ci=false
......@@ -66,78 +71,82 @@ projects=''
configuration='Debug'
prepare_machine=false
verbosity='minimal'
properties=''
while [[ $# > 0 ]]; do
opt="$(echo "$1" | awk '{print tolower($0)}')"
opt="$(echo "${1/#--/-}" | awk '{print tolower($0)}')"
case "$opt" in
--help|-h)
-help|-h)
usage
exit 0
;;
--configuration|-c)
-configuration|-c)
configuration=$2
shift
;;
--verbosity|-v)
-verbosity|-v)
verbosity=$2
shift
;;
--binarylog|-bl)
-binarylog|-bl)
binary_log=true
;;
--restore|-r)
-restore|-r)
restore=true
;;
--build|-b)
-build|-b)
build=true
;;
--rebuild)
-rebuild)
rebuild=true
;;
--pack)
-pack)
pack=true
;;
--test|-t)
-test|-t)
test=true
;;
--integrationtest)
-integrationtest)
integration_test=true
;;
--performancetest)
-performancetest)
performance_test=true
;;
--sign)
-sign)
sign=true
;;
--publish)
-publish)
publish=true
;;
--preparemachine)
-preparemachine)
prepare_machine=true
;;
--projects)
-projects)
projects=$2
shift
;;
--ci)
-ci)
ci=true
;;
--warnaserror)
-warnaserror)
warn_as_error=$2
shift
;;
--nodereuse)
-nodereuse)
node_reuse=$2
shift
;;
/p:*)
-p:*|/p:*)
properties="$properties $1"
;;
-m:*|/m:*)
properties="$properties $1"
;;
/m:*)
-bl:*|/bl:*)
properties="$properties $1"
;;
/bl:*)
-dl:*|/dl:*)
properties="$properties $1"
;;
*)
......@@ -191,7 +200,6 @@ function Build {
/p:PerformanceTest=$performance_test \
/p:Sign=$sign \
/p:Publish=$publish \
/p:ContinuousIntegrationBuild=$ci \
$properties
ExitWithExitCode 0
......
文件模式从 100755 更改为 100644
文件模式从 100755 更改为 100644
文件模式从 100755 更改为 100644
文件模式从 100755 更改为 100644
文件模式从 100755 更改为 100644
......@@ -19,7 +19,7 @@ function InstallDarcCli ($darcVersion) {
# Until we can anonymously query the BAR API for the latest arcade-services
# build applied to the PROD channel, this is hardcoded.
if (-not $darcVersion) {
$darcVersion = '1.1.0-beta.19057.9'
$darcVersion = '1.1.0-beta.19151.3'
}
$arcadeServicesSource = 'https://dotnetfeed.blob.core.windows.net/dotnet-arcade/index.json'
......
#!/usr/bin/env bash
source="${BASH_SOURCE[0]}"
darcVersion="1.1.0-beta.19151.3"
while [[ $# > 0 ]]; do
opt="$(echo "$1" | awk '{print tolower($0)}')"
case "$opt" in
--darcversion)
darcVersion=$2
shift
;;
*)
echo "Invalid argument: $1"
usage
exit 1
;;
esac
shift
done
# resolve $source until the file is no longer a symlink
while [[ -h "$source" ]]; do
......@@ -27,12 +45,11 @@ function InstallDarcCli {
echo $($dotnet_root/dotnet tool uninstall $darc_cli_package_name -g)
fi
ReadGlobalVersion "Microsoft.DotNet.Arcade.Sdk"
local toolset_version=$_ReadGlobalVersion
local arcadeServicesSource="https://dotnetfeed.blob.core.windows.net/dotnet-arcade/index.json"
echo "Installing Darc CLI version $toolset_version..."
echo "You may need to restart your command shell if this is the first dotnet tool you have installed."
echo $($dotnet_root/dotnet tool install $darc_cli_package_name --version $toolset_version -v $verbosity -g)
echo $($dotnet_root/dotnet tool install $darc_cli_package_name --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity -g)
}
InstallDarcCli
Param(
[Parameter(Mandatory=$true)][string] $barToken, # Token generated at https://maestro-prod.westus2.cloudapp.azure.com/Account/Tokens
[Parameter(Mandatory=$true)][string] $gitHubPat, # GitHub personal access token from https://github.com/settings/tokens (no auth scopes needed)
[Parameter(Mandatory=$true)][string] $azdoPat, # Azure Dev Ops tokens from https://dev.azure.com/dnceng/_details/security/tokens (code read scope needed)
[Parameter(Mandatory=$true)][string] $outputFolder, # Where the graphviz.txt file will be created
[string] $darcVersion = '1.1.0-beta.19169.5', # darc's version
[string] $graphvizVersion = '2.38', # GraphViz version
[switch] $includeToolset # Whether the graph should include toolset dependencies or not. i.e. arcade, optimization. For more about
# toolset dependencies see https://github.com/dotnet/arcade/blob/master/Documentation/Darc.md#toolset-vs-product-dependencies
)
$ErrorActionPreference = "Stop"
. $PSScriptRoot\tools.ps1
Import-Module -Name (Join-Path $PSScriptRoot "native\CommonLibrary.psm1")
function CheckExitCode ([string]$stage)
{
$exitCode = $LASTEXITCODE
if ($exitCode -ne 0) {
Write-Host "Something failed in stage: '$stage'. Check for errors above. Exiting now..."
ExitWithExitCode $exitCode
}
}
try {
Push-Location $PSScriptRoot
Write-Host "Installing darc..."
. .\darc-init.ps1 -darcVersion $darcVersion
CheckExitCode "Running darc-init"
$engCommonBaseDir = Join-Path $PSScriptRoot "native\"
$graphvizInstallDir = CommonLibrary\Get-NativeInstallDirectory
$nativeToolBaseUri = "https://netcorenativeassets.blob.core.windows.net/resource-packages/external"
$installBin = Join-Path $graphvizInstallDir "bin"
Write-Host "Installing dot..."
.\native\install-tool.ps1 -ToolName graphviz -InstallPath $installBin -BaseUri $nativeToolBaseUri -CommonLibraryDirectory $engCommonBaseDir -Version $graphvizVersion -Verbose
$darcExe = "$env:USERPROFILE\.dotnet\tools"
$darcExe = Resolve-Path "$darcExe\darc.exe"
Create-Directory $outputFolder
# Generate 3 graph descriptions:
# 1. Flat with coherency information
# 2. Graphviz (dot) file
# 3. Standard dependency graph
$graphVizFilePath = "$outputFolder\graphviz.txt"
$graphVizImageFilePath = "$outputFolder\graph.png"
$normalGraphFilePath = "$outputFolder\graph-full.txt"
$flatGraphFilePath = "$outputFolder\graph-flat.txt"
$baseOptions = "get-dependency-graph --github-pat $gitHubPat --azdev-pat $azdoPat --password $barToken"
if ($includeToolset) {
Write-Host "Toolsets will be included in the graph..."
$baseOptions += " --include-toolset"
}
Write-Host "Generating standard dependency graph..."
Invoke-Expression "& `"$darcExe`" $baseOptions --output-file $normalGraphFilePath"
CheckExitCode "Generating normal dependency graph"
Write-Host "Generating flat dependency graph and graphviz file..."
Invoke-Expression "& `"$darcExe`" $baseOptions --flat --coherency --graphviz $graphVizFilePath --output-file $flatGraphFilePath"
CheckExitCode "Generating flat and graphviz dependency graph"
Write-Host "Generating graph image $graphVizFilePath"
$dotFilePath = Join-Path $installBin "graphviz\$graphvizVersion\release\bin\dot.exe"
Invoke-Expression "& `"$dotFilePath`" -Tpng -o'$graphVizImageFilePath' `"$graphVizFilePath`""
CheckExitCode "Generating graphviz image"
Write-Host "'$graphVizFilePath', '$flatGraphFilePath', '$normalGraphFilePath' and '$graphVizImageFilePath' created!"
}
catch {
if (!$includeToolset) {
Write-Host "This might be a toolset repo which includes only toolset dependencies. " -NoNewline -ForegroundColor Yellow
Write-Host "Since -includeToolset is not set there is no graph to create. Include -includeToolset and try again..." -ForegroundColor Yellow
}
Write-Host $_
Write-Host $_.Exception
Write-Host $_.ScriptStackTrace
ExitWithExitCode 1
} finally {
Pop-Location
}
\ No newline at end of file
......@@ -98,10 +98,20 @@ try {
Write-Verbose "Executing '$LocalInstallerCommand'"
Invoke-Expression "$LocalInstallerCommand"
if ($LASTEXITCODE -Ne "0") {
Write-Error "Execution failed"
exit 1
$errMsg = "$ToolName installation failed"
if ((Get-Variable 'DoNotAbortNativeToolsInstallationOnFailure' -ErrorAction 'SilentlyContinue') -and $DoNotAbortNativeToolsInstallationOnFailure) {
Write-Warning $errMsg
$toolInstallationFailure = $true
} else {
Write-Error $errMsg
exit 1
}
}
}
if ((Get-Variable 'toolInstallationFailure' -ErrorAction 'SilentlyContinue') -and $toolInstallationFailure) {
exit 1
}
}
else {
Write-Host "No native tools defined in global.json"
......
文件模式从 100755 更改为 100644
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
</Project>
<?xml version="1.0" encoding="utf-8"?>
<!-- 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 Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<ImportDirectoryBuildTargets>false</ImportDirectoryBuildTargets>
</PropertyGroup>
<ItemGroup>
<!-- Clear references, the SDK may add some depending on UsuingToolXxx settings, but we only want to restore the following -->
<PackageReference Remove="@(PackageReference)"/>
<PackageReference Include="Microsoft.DotNet.IBCMerge" Version="$(MicrosoftDotNetIBCMergeVersion)" Condition="'$(UsingToolIbcOptimization)' == 'true'" />
<PackageReference Include="Drop.App" Version="$(DropAppVersion)" ExcludeAssets="all" Condition="'$(UsingToolVisualStudioIbcTraining)' == 'true'"/>
</ItemGroup>
<PropertyGroup>
<RestoreSources>
https://devdiv.pkgs.visualstudio.com/_packaging/8f470c7e-ac49-4afe-a6ee-cf784e438b93/nuget/v3/index.json;
https://devdiv.pkgs.visualstudio.com/_packaging/VS/nuget/v3/index.json;
</RestoreSources>
</PropertyGroup>
<!-- Repository extensibility point -->
<Import Project="$(RepositoryEngineeringDir)InternalTools.props" Condition="Exists('$(RepositoryEngineeringDir)InternalTools.props')" />
</Project>
文件模式从 100755 更改为 100644
文件模式从 100755 更改为 100644
文件模式从 100755 更改为 100644
此差异已折叠。
parameters:
# Optional: dependencies of the job
dependsOn: ''
# Optional: A defined YAML pool - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#pool
pool: {}
# Optional: Include toolset dependencies in the generated graph files
includeToolset: false
jobs:
- job: Generate_Graph_Files
dependsOn: ${{ parameters.dependsOn }}
displayName: Generate Graph Files
pool: ${{ parameters.pool }}
variables:
# Publish-Build-Assets provides: MaestroAccessToken, BotAccount-dotnet-maestro-bot-PAT
# DotNet-AllOrgs-Darc-Pats provides: dn-bot-devdiv-dnceng-rw-code-pat
- group: Publish-Build-Assets
- group: DotNet-AllOrgs-Darc-Pats
- name: _GraphArguments
value: -gitHubPat $(BotAccount-dotnet-maestro-bot-PAT)
-azdoPat $(dn-bot-devdiv-dnceng-rw-code-pat)
-barToken $(MaestroAccessToken)
-outputFolder '$(Build.StagingDirectory)/GraphFiles/'
- ${{ if ne(parameters.includeToolset, 'false') }}:
- name: _GraphArguments
value: ${{ variables._GraphArguments }} -includeToolset
steps:
- task: PowerShell@2
displayName: Generate Graph Files
inputs:
filePath: eng\common\generate-graph-files.ps1
arguments: $(_GraphArguments)
continueOnError: true
- task: PublishBuildArtifacts@1
displayName: Publish Graph to Artifacts
inputs:
PathtoPublish: '$(Build.StagingDirectory)/GraphFiles'
PublishLocation: Container
ArtifactName: GraphFiles
continueOnError: true
condition: always()
此差异已折叠。
此差异已折叠。
......@@ -28,12 +28,15 @@ phases:
SecretsFilter: 'MaestroAccessToken'
condition: ${{ parameters.condition }}
continueOnError: ${{ parameters.continueOnError }}
- script: eng\common\publishbuildassets.cmd
-configuration $(_BuildConfig)
/p:ManifestsPath='$(Build.StagingDirectory)/Download/AssetManifests'
/p:BuildAssetRegistryToken=$(MaestroAccessToken)
/p:MaestroApiEndpoint=https://maestro-prod.westus2.cloudapp.azure.com
- task: PowerShell@2
displayName: Publish Build Assets
inputs:
filePath: eng\common\sdk-task.ps1
arguments: -task PublishBuildAssets -restore -msbuildEngine dotnet
/p:ManifestsPath='$(Build.StagingDirectory)/Download/AssetManifests'
/p:BuildAssetRegistryToken=$(MaestroAccessToken)
/p:MaestroApiEndpoint=https://maestro-prod.westus2.cloudapp.azure.com
/p:Configuration=$(_BuildConfig)
condition: ${{ parameters.condition }}
continueOnError: ${{ parameters.continueOnError }}
- task: PublishBuildArtifacts@1
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
@echo off
%~dp0..\artifacts\bin\fsi\Release\net46\fsi.exe %~dp0VerifyAllTranslations.fsx -- %~dp0
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册