Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
d72b6c55
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,发现更多精彩内容 >>
未验证
提交
d72b6c55
编写于
8月 20, 2018
作者:
J
Jared Parsons
提交者:
GitHub
8月 20, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #29379 from jaredpar/fix-doc
Update unix contributing docs
上级
233957b9
2248fdd5
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
81 addition
and
8 deletion
+81
-8
docs/contributing/Building, Debugging, and Testing on Unix.md
.../contributing/Building, Debugging, and Testing on Unix.md
+81
-8
未找到文件。
docs/contributing/Building, Debugging, and Testing on Unix.md
浏览文件 @
d72b6c55
# Getting the Code
# Building, Debugging and Testing on Unix
This guide is meant to help developers setup an environment for debugging / contributing to Roslyn from Linux.
Particularly for developers who aren't experienced with .NET Core development on Linux.
## Working with the code
1.
Install the
[
.NET Core SDK
](
https://www.microsoft.com/net/download/core
)
1.
Install the
[
.NET Core SDK
](
https://www.microsoft.com/net/download/core
)
1.
Clone
https://github.com/dotnet/roslyn
1.
Clone
git@github.com:dotnet/roslyn.git
1.
Run
`
dotnet restore CrossPlatform.sln
`
1.
Run
`
./build.sh --restore
`
1.
Run
`
dotnet build CrossPlatform.sln
`
1.
Run
`
./build.sh --build
`
# Running Tests
## Running Tests
The unit tests can be executed by running
`./build.sh --test`
After building run
`build\scrits\test.sh`
in order to run the unit tests.
## GitHub
The best way to clone and push is to use SSH. On Windows you typically use HTTPS and this is not directly compatible
with two factor authentication (requires a PAT). The SSH setup is much simpler and GitHub has a great HOWTO for
getting this setup.
# Contributing
https://help.github.com/articles/connecting-to-github-with-ssh/
Please see
[
Contributing Code
](
https://github.com/dotnet/roslyn/blob/master/CONTRIBUTING.md
)
for details on contributing changes back to the code.
## Debugging test failures
The best way to debug is using lldb with the SOS plugin. This is the same SOS as used in WinDbg and if you're familiar
with it then lldb debugging will be pretty straight forward.
Here are the CoreCLR guidelines for Linux debugging:
-
https://github.com/dotnet/coreclr/blob/master/Documentation/botr/xplat-minidump-generation.md
-
https://github.com/dotnet/coreclr/blob/master/Documentation/building/debugging-instructions.md#debugging-core-dumps-with-lldb.
Corrections:
-
LLDB and createdump must be run as root
-
`dotnet tool install -g dotnet-symbol`
must be run from
`$HOME`
Furthermore the version of SOS that comes with the runtime will likely not work with the lldb you have. In order to
use SOS you will need to build it by hand
1.
Clone git@github.com:dotnet/diagnostics.git
1.
Run
`./build.sh`
This will produce libsosplugin.so that can be used in lldb. Once it's built you can start lldb with the following
command line (replace
`/home/jaredpar`
as appropriate):
```
bash
>
sudo
lldb
-o
"plugin load /home/jaredpar/code/diagnostics/artifacts/Debug/bin/Linux.x64/libsosplugin.so"
/home/jaredpar/code/roslyn/Binaries/Tools/dotnet/dotnet
```
From there you should be able to attach to running processes or load up coredumps.
## Ubuntu 18.04
The recommended OS for developing Roslyn is Ubuntu 18.04. This guide was written using Ubuntu 18.04 but should be
applicable to most Linux enviroments. Ubuntu 18.04 was chosen here due to it's support for enhanced VMs in Hyper-V.
This makes it easier to use from a Windows machine.
### Hyper-V
When using Hyper-V to develop you will want to enable enhanced mode. This allows for the VM to be full screen, have
clipboard access and support additional devices. Ubuntu 18.04 is the first Linux OS supported in this mode. The
mileage with other distros may vary.
Enhanced mode support is still fairly new and does require a few manual steps. They are all covered in this
blog post:
https://blogs.technet.microsoft.com/virtualization/2018/02/28/sneak-peek-taking-a-spin-with-enhanced-linux-vms/
Following the steps on that blog post will get you to a point where you can the features you are looking for. There are
a couple of deviations from the instructions there:
-
There is no longer a config-user.sh script
-
cd into
`ubuntu/18.04`
instead of
`ubuntu/16.04`
### Source Link
Many of the repositories that need to be built use source link and it crashes on Ubuntu 18.04 due to dependency changes.
To disable source link add the following to the
`Directory.Build.props`
file in the root of the repository.
```
xml
<EnableSourceControlManagerQueries>
false
</EnableSourceControlManagerQueries>
<EnableSourceLink>
false
</EnableSourceLink>
<DeterministicSourcePaths>
false
</DeterministicSourcePaths>
```
### Prerequisites
Make sure to install the following via
`apt install`
-
clang
-
lldb
-
cmake
-
xrdp
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录