Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
ab50fff9
R
roslyn
项目概览
lwm1986
/
roslyn
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
roslyn
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ab50fff9
编写于
5月 30, 2016
作者:
T
Tomas Matousek
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update x-plat toolset to dotnet 1.0.0-preview2-002733
上级
b46b99f9
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
78 addition
and
38 deletion
+78
-38
Makefile
Makefile
+15
-5
build/MSBuildToolset/build-toolset.ps1
build/MSBuildToolset/build-toolset.ps1
+46
-15
build/MSBuildToolset/project.json
build/MSBuildToolset/project.json
+8
-14
docs/infrastructure/unix-toolset.md
docs/infrastructure/unix-toolset.md
+9
-4
未找到文件。
Makefile
浏览文件 @
ab50fff9
...
...
@@ -2,20 +2,24 @@ SHELL = /usr/bin/env bash
OS_NAME
=
$(
shell
uname
-s
)
BUILD_CONFIGURATION
=
Debug
BINARIES_PATH
=
$(
shell
pwd
)
/Binaries
SCRIPTS_PATH
=
$(
shell
pwd
)
/build/scripts
TOOLSET_PATH
=
$(BINARIES_PATH)
/toolset
RESTORE_SEMAPHORE_PATH
=
$(TOOLSET_PATH)
/restore.semaphore
BOOTSTRAP_PATH
=
$(BINARIES_PATH)
/Bootstrap
BUILD_LOG_PATH
=
HOME_DIR
=
$(
shell
cd
~
&&
pwd
)
DOTNET_VERSION
=
1.0.0-preview2-002733
MSBUILD_ADDITIONALARGS
:=
/v:m /fl /fileloggerparameters:Verbosity
=
normal /p:Configuration
=
$(BUILD_CONFIGURATION)
ifeq
($(OS_NAME),Linux)
MSBUILD_ADDITIONALARGS
:=
$(MSBUILD_ADDITIONALARGS)
/p:BaseNuGetRuntimeIdentifier
=
ubuntu.14.04
ROSLYN_TOOLSET_NAME
=
roslyn.linux.7
ROSLYN_TOOLSET_NAME
=
roslyn.linux.8
DOTNET_PLATFORM
=
ubuntu-x64
else
ifeq
($(OS_NAME),Darwin)
MSBUILD_ADDITIONALARGS
:=
$(MSBUILD_ADDITIONALARGS)
/p:BaseNuGetRuntimeIdentifier
=
osx.10.10
ROSLYN_TOOLSET_NAME
=
roslyn.mac.6
ROSLYN_TOOLSET_NAME
=
roslyn.mac.8
DOTNET_PLATFORM
=
osx-x64
endif
ifneq
($(BUILD_LOG_PATH),)
...
...
@@ -69,9 +73,15 @@ toolset: $(ROSLYN_TOOLSET_PATH)
$(ROSLYN_TOOLSET_PATH)
:
| $(TOOLSET_PATH)
@
pushd
$(TOOLSET_PATH)
;
\
curl
-O
https://dotnetci.blob.core.windows.net/roslyn/
$(ROSLYN_TOOLSET_NAME)
.tar.bz2
&&
\
tar
-jxf
$(ROSLYN_TOOLSET_NAME)
.tar.bz2
&&
\
chmod
+x
$(ROSLYN_TOOLSET_NAME)
/corerun
curl
-O
https://dotnetci.blob.core.windows.net/roslyn/
$(ROSLYN_TOOLSET_NAME)
.zip
&&
\
curl
-O
https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/
$(DOTNET_VERSION)
/dotnet-dev-
$(DOTNET_PLATFORM)
.
$(DOTNET_VERSION)
.tar.gz
&&
\
mkdir
-p
$(ROSLYN_TOOLSET_NAME)
/dotnet-cli
&&
\
$(SCRIPTS_PATH)
/unzip.sh
$(ROSLYN_TOOLSET_NAME)
.zip
$(ROSLYN_TOOLSET_NAME)
&&
\
tar
-zxf
dotnet-dev-
$(DOTNET_PLATFORM)
.
$(DOTNET_VERSION)
.tar.gz
-C
$(ROSLYN_TOOLSET_NAME)
/dotnet-cli
&&
\
chmod
+x
$(ROSLYN_TOOLSET_NAME)
/corerun
&&
\
chmod
+x
$(ROSLYN_TOOLSET_NAME)
/RoslynRestore
&&
\
chmod
+x
$(ROSLYN_TOOLSET_NAME)
/csc
&&
\
chmod
+x
$(ROSLYN_TOOLSET_NAME)
/vbc
$(TOOLSET_PATH)
:
mkdir
-p
$(TOOLSET_PATH)
build/MSBuildToolset/build-toolset.ps1
浏览文件 @
ab50fff9
# Builds the toolset for use in unix msbuild-coreclr
param
(
[
string
]
$NuGetTaskDir
=
"
$PSScriptRoot
\..\..\..\NuGet.BuildTasks\src\Microsoft.NuGet.Build.Tasks\bin\Debug"
[
string
]
$NuGetTaskDir
,
[
string
]
$RoslynDropDir
,
[
string
]
$DotNetPath
=
"dotnet"
)
function
ZipFiles
(
$sourceDir
,
$zipPath
)
{
If
(
Test-Path
$zipPath
)
{
Remove-Item
$zipPath
}
Add-Type
-Assembly
System.IO.Compression.FileSystem
[
System.IO.Compression.ZipFile
]::
CreateFromDirectory
(
$sourceDir
,
$zipPath
,
[
System.IO.Compression.CompressionLevel
]::
Optimal
,
$false
)
}
$Error
ActionPreference
=
"Stop"
try
{
pushd
$PSScriptRoot
dotnet
restore
dotnet
build
&
$DotNetPath
restore
$
dnxcoreDir
=
"
$PSScriptRoot
\bin\Debug\dnxcore5
0"
$
outputRoot
=
"
$PSScriptRoot
\bin\Debug\netcoreapp1.
0"
foreach
(
$TargetRuntime
in
(
"ubuntu.14.04-x64"
,
"osx.10.10-x64"
))
{
dotnet
publish
-r
$TargetRuntime
&
$DotNetPath
publish
-r
$TargetRuntime
$publishDir
=
"
$
dnxcoreDir
\
$TargetRuntime
\publish"
$publishDir
=
"
$
outputRoot
\
$TargetRuntime
\publish"
# Fix up AssignLinkMetadata
# TODO(https://github.com/Microsoft/msbuild/issues/544)
...
...
@@ -35,46 +47,65 @@ try
Copy-Item
-Force
"
$NuGetTaskDir
\*"
$NuGetExtensionsDir
# Copy the portable targets
write-host
"Copy portable targets"
Copy-Item
-Force
-Recurse
(
Join-Path
([
Environment
]::
GetFolderPath
(
"ProgramFilesX86"
))
"MSBuild\Microsoft\Portable"
)
"
$extensionsMSDir
"
# Copy over the portable build task
# TODO(https://github.com/dotnet/roslyn/issues/9640)
# Copy from a NuGet package instead of a build
foreach
(
$item
in
(
"Microsoft.Build.Tasks.CodeAnalysis.dll"
,
"Microsoft.CSharp.Core.targets"
,
"Microsoft.VisualBasic.Core.targets"
))
# Copy from a NuGet package instead of a build.
# Overwrite dlls pulled in by the references listed in project.json
# (we want a specific toolset compiler version).
write-host
"Copy portable build task"
foreach
(
$item
in
(
"CodeAnalysisBuildTask\Microsoft.Build.Tasks.CodeAnalysis.dll"
,
"CodeAnalysisBuildTask\Microsoft.CSharp.Core.targets"
,
"CodeAnalysisBuildTask\Microsoft.VisualBasic.Core.targets"
,
"System.Reflection.Metadata.dll"
,
"System.Collections.Immutable.dll"
,
"Microsoft.CodeAnalysis.dll"
,
"Microsoft.CodeAnalysis.CSharp.dll"
,
"Microsoft.CodeAnalysis.VisualBasic.dll"
,
"csccore\csc.exe"
,
"vbccore\vbc.exe"
))
{
Copy-Item
(
Join-Path
$
PSScriptRoot
\..\..\Binaries\Debug\CodeAnalysisBuildTask
$item
)
$publishDir
Copy-Item
(
Join-Path
$
RoslynDropDir
"20160525.2"
$item
)
$publishDir
}
# Copy over the reference assemblies
$frameworkRefsDir
=
"
$publishDir
\reference-assemblies\Framework"
mkdir
-Force
"
$frameworkRefsDir
\.NETFramework"
write-host
"Copy .NETFramework/v4.5 reference assemblies"
Copy-Item
-Force
-Recurse
(
Join-Path
([
Environment
]::
GetFolderPath
(
"ProgramFilesX86"
))
"Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5"
)
"
$frameworkRefsDir
\.NETFramework"
write-host
"Copy .NETPortable reference assemblies"
Copy-Item
-Force
-Recurse
(
Join-Path
([
Environment
]::
GetFolderPath
(
"ProgramFilesX86"
))
"Reference Assemblies\Microsoft\Framework\.NETPortable"
)
$frameworkRefsDir
# Bug: https://github.com/Microsoft/msbuild/issues/522
# Reference assembly has a bad name, fixup
pushd
"
$publishDir
\reference-assemblies\Framework\.NETFramework\v4.5"
Move-Item
System.XML.dll
System.Xml.dll
popd
# TODO(https://github.com/dotnet/roslyn/issues/9641)
# Portable CSharp targets have ref with wrong case
write-host
"Copy portable targets files"
foreach
(
$version
in
(
"v4.5"
,
"v5.0"
))
{
$file
=
"
$extensionsMSDir
\Portable\
$version
\Microsoft.Portable.CSharp.targets"
(
Get-Content
$file
)
|
%
{
$_
-replace
'Microsoft.CSharp.Targets'
,
'Microsoft.CSharp.targets'
}
|
Out-File
$file
}
# Copy the helper scripts for csc/vbc
write-host
"Copy helper scripts for csc"
Copy-Item
-Force
"
$PSScriptRoot
\..\..\src\Compilers\CSharp\CscCore\csc"
$publishDir
write-host
"Copy helper scripts for vbc"
Copy-Item
-Force
"
$PSScriptRoot
\..\..\src\Compilers\VisualBasic\VbcCore\vbc"
$publishDir
Move-Item
$publishDir
$toolsetPackageZip
=
(
Join-Path
$outputRoot
"
$TargetRuntime
.zip"
)
Write-Host
"Zipping
$publishDir
to
$toolsetPackageZip
"
ZipFiles
$publishDir
$toolsetPackageZip
}
popd
...
...
build/MSBuildToolset/project.json
浏览文件 @
ab50fff9
...
...
@@ -6,29 +6,23 @@
},
"dependencies"
:
{
"Microsoft.Build.Framework"
:
"0.1.0-preview-00017"
,
"Microsoft.Build.Tasks.Core"
:
"0.1.0-preview-00017"
,
"Microsoft.Build.Utilities.Core"
:
"0.1.0-preview-00017"
,
"Microsoft.Build.Targets"
:
"0.1.0-preview-00017"
,
"Microsoft.Build"
:
"0.1.0-preview-00017"
,
"Microsoft.Net.Compilers.netcore"
:
"1.2.0-beta1-20160202-02"
,
"Microsoft.Net.Compilers.Targets.netcore"
:
"0.1.4-dev"
,
"Microsoft.NETCore.Platforms"
:
"1.0.1-rc3-24126-00"
,
"Microsoft.Build.Framework"
:
"0.1.0-preview-00023-160527"
,
"Microsoft.Build.Tasks.Core"
:
"0.1.0-preview-00023-160527"
,
"Microsoft.Build.Utilities.Core"
:
"0.1.0-preview-00023-160527"
,
"Microsoft.Build.Targets"
:
"0.1.0-preview-00023-160527"
,
"Microsoft.Build"
:
"0.1.0-preview-00023-160527"
,
"MSBuild"
:
"0.1.0-preview-00023-160527"
,
"Microsoft.NETCore.TestHost"
:
"1.0.0-rc3-24126-00"
,
"NETStandard.Library"
:
"1.0.0-rc3-24126-00"
,
"MSBuild"
:
"0.1.0-preview-00017"
,
"System.Security.Cryptography.X509Certificates"
:
"4.0.0-rc3-24126-00"
,
"System.Diagnostics.Process"
:
"4.1.0-rc3-24126-00"
,
"Microsoft.NETCore.App"
:
"1.0.0-rc3-004312"
,
"Newtonsoft.Json"
:
"7.0.1"
},
"frameworks"
:
{
"NETCoreApp1.0"
:
{
"imports"
:
"portable-net452"
"imports"
:
[
"portable-net452"
,
"dotnet"
]
}
},
"runtimes"
:
{
"win7-x64"
:
{
},
"ubuntu.14.04-x64"
:
{
},
"osx.10.10-x64"
:
{
}
}
...
...
docs/infrastructure/unix-toolset.md
浏览文件 @
ab50fff9
...
...
@@ -17,8 +17,13 @@ To build the toolset do the following:
-
If necessary, make modifications to the dependencies in the
`build/MSBuildToolset/project.json`
file to bring in anything new.
-
Run the
`build/MSBuildToolset/build-toolset.ps1`
file.
-
In the
`build/MSBuildToolset/bin/Debug/dnxcore50`
directory:
-
Rename and bzip the
`osx.10.10-x64/publish`
directory as roslyn.mac.
`<version number>`
-
Rename and bzip the
`ubuntu.14.04-x65/publish`
directory as roslyn.linux.
`<version number>`
-
Upload the file to the Azure in the dotnetci storage account in the roslyn container.
-
The script produces two zip files in bin
\D
ebug
\n
etcoreapp1.0 subdirectory:
-
Rename
`osx.10.10-x64.zip`
to roslyn.mac.
`<version number>.zip`
-
Rename
`ubuntu.14.04-x64.zip`
to roslyn.linux.
`<version number>.zip`
-
Upload the files to the Azure in the dotnetci storage account in the roslyn container:
```
azcopy /Pattern:*.zip /Source:build\MSBuildToolset\bin\Debug\netcoreapp1.0 /Dest:https://dotnetci.blob.core.windows.net/roslyn /DestKey:<<key>>
```
-
Send a PR to change
[
Makefile
](
https://github.com/dotnet/roslyn/blob/master/Makefile
)
to use the new toolset.
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录