Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
bcbc3a0a
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,发现更多精彩内容 >>
提交
bcbc3a0a
编写于
8月 17, 2015
作者:
A
Andrew Arnott
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Allow collection of C#/VB command line without actually invoking the compiler
上级
15c1320f
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
41 addition
and
5 deletion
+41
-5
src/Compilers/Core/MSBuildTask/ManagedCompiler.cs
src/Compilers/Core/MSBuildTask/ManagedCompiler.cs
+29
-0
src/Compilers/Core/MSBuildTask/Microsoft.CSharp.Core.targets
src/Compilers/Core/MSBuildTask/Microsoft.CSharp.Core.targets
+6
-2
src/Compilers/Core/MSBuildTask/Microsoft.VisualBasic.Core.targets
...ilers/Core/MSBuildTask/Microsoft.VisualBasic.Core.targets
+6
-3
未找到文件。
src/Compilers/Core/MSBuildTask/ManagedCompiler.cs
浏览文件 @
bcbc3a0a
...
...
@@ -72,6 +72,13 @@ public int CodePage
get
{
return
_store
.
GetOrDefault
(
nameof
(
CodePage
),
0
);
}
}
[
Output
]
public
string
CommandLineInvocation
{
set
{
_store
[
nameof
(
CommandLineInvocation
)]
=
value
;
}
get
{
return
_store
.
GetOrDefault
(
nameof
(
CommandLineInvocation
),
string
.
Empty
);
}
}
public
string
DebugType
{
set
{
_store
[
nameof
(
DebugType
)]
=
value
;
}
...
...
@@ -187,6 +194,12 @@ public bool Prefer32Bit
get
{
return
_store
.
GetOrDefault
(
nameof
(
Prefer32Bit
),
false
);
}
}
public
bool
ProvideCommandLineInvocation
{
set
{
_store
[
nameof
(
ProvideCommandLineInvocation
)]
=
value
;
}
get
{
return
_store
.
GetOrDefault
(
nameof
(
ProvideCommandLineInvocation
),
false
);
}
}
public
ITaskItem
[]
References
{
set
{
_store
[
nameof
(
References
)]
=
value
;
}
...
...
@@ -211,6 +224,12 @@ public ITaskItem[] ResponseFiles
get
{
return
(
ITaskItem
[])
_store
[
nameof
(
ResponseFiles
)];
}
}
public
bool
SkipCompilerExecution
{
set
{
_store
[
nameof
(
SkipCompilerExecution
)]
=
value
;
}
get
{
return
_store
.
GetOrDefault
(
nameof
(
SkipCompilerExecution
),
false
);
}
}
public
ITaskItem
[]
Sources
{
set
...
...
@@ -312,6 +331,16 @@ protected override Encoding StandardOutputEncoding
protected
override
int
ExecuteTool
(
string
pathToTool
,
string
responseFileCommands
,
string
commandLineCommands
)
{
if
(
ProvideCommandLineInvocation
)
{
CommandLineInvocation
=
GenerateResponseFileContents
();
}
if
(
SkipCompilerExecution
)
{
return
0
;
}
if
(!
UseSharedCompilation
||
!
String
.
IsNullOrEmpty
(
this
.
ToolPath
))
{
return
base
.
ExecuteTool
(
pathToTool
,
responseFileCommands
,
commandLineCommands
);
...
...
src/Compilers/Core/MSBuildTask/Microsoft.CSharp.Core.targets
浏览文件 @
bcbc3a0a
...
...
@@ -19,7 +19,7 @@
@(_DebugSymbolsIntermediatePath);
$(NonExistentFile);
@(CustomAdditionalCompileOutputs)"
Returns=""
Returns="
$(CscCommandLineInvocation)
"
DependsOnTargets="$(CoreCompileDependsOn)"
>
<!-- These two compiler warnings are raised when a reference is bound to a different version
...
...
@@ -105,10 +105,12 @@
Platform="$(PlatformTarget)"
Prefer32Bit="$(Prefer32Bit)"
PreferredUILang="$(PreferredUILang)"
ProvideCommandLineInvocation="$(ProvideCommandLineInvocation)"
References="@(ReferencePath)"
ReportAnalyzer="$(ReportAnalyzer)"
Resources="@(_CoreCompileResourceInputs);@(CompiledLicenseFile)"
ResponseFiles="$(CompilerResponseFile)"
SkipCompilerExecution="$(SkipCompilerExecution)"
Sources="@(Compile)"
SubsystemVersion="$(SubsystemVersion)"
TargetType="$(OutputType)"
...
...
@@ -125,7 +127,9 @@
Win32Icon="$(ApplicationIcon)"
Win32Manifest="$(Win32Manifest)"
Win32Resource="$(Win32Resource)"
/>
>
<Output TaskParameter="CommandLineInvocation" PropertyName="CscCommandLineInvocation" />
</Csc>
<ItemGroup>
<_CoreCompileResourceInputs Remove="@(_CoreCompileResourceInputs)" />
...
...
src/Compilers/Core/MSBuildTask/Microsoft.VisualBasic.Core.targets
浏览文件 @
bcbc3a0a
...
...
@@ -19,7 +19,7 @@
@(_DebugSymbolsIntermediatePath);
$(NonExistentFile);
@(CustomAdditionalCompileOutputs)"
Returns=""
Returns="
$(VbcCommandLineInvocation)
"
DependsOnTargets="$(CoreCompileDependsOn)"
>
<PropertyGroup>
...
...
@@ -97,6 +97,7 @@
Platform="$(PlatformTarget)"
Prefer32Bit="$(Prefer32Bit)"
PreferredUILang="$(PreferredUILang)"
ProvideCommandLineInvocation="$(ProvideCommandLineInvocation)"
References="@(ReferencePath)"
RemoveIntegerChecks="$(RemoveIntegerChecks)"
ReportAnalyzer="$(ReportAnalyzer)"
...
...
@@ -104,6 +105,7 @@
ResponseFiles="$(CompilerResponseFile)"
RootNamespace="$(RootNamespace)"
SdkPath="$(FrameworkPathOverride)"
SkipCompilerExecution="$(SkipCompilerExecution)"
Sources="@(Compile)"
SubsystemVersion="$(SubsystemVersion)"
TargetCompactFramework="$(TargetCompactFramework)"
...
...
@@ -123,8 +125,9 @@
Win32Manifest="$(Win32Manifest)"
Win32Resource="$(Win32Resource)"
VBRuntime="$(VBRuntime)"
/>
>
<Output TaskParameter="CommandLineInvocation" PropertyName="CscCommandLineInvocation" />
</Vbc>
<ItemGroup>
<_CoreCompileResourceInputs Remove="@(_CoreCompileResourceInputs)" />
</ItemGroup>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录