Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
07a0b0c1
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,发现更多精彩内容 >>
提交
07a0b0c1
编写于
5月 14, 2015
作者:
A
Andy Gocke
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add a test for the failing issue with msbuild
上级
0c35b901
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
172 addition
and
0 deletion
+172
-0
src/Compilers/Core/VBCSCompilerTests/CompilerServerTests.cs
src/Compilers/Core/VBCSCompilerTests/CompilerServerTests.cs
+172
-0
未找到文件。
src/Compilers/Core/VBCSCompilerTests/CompilerServerTests.cs
浏览文件 @
07a0b0c1
...
...
@@ -2222,5 +2222,177 @@ public void ReportAnalyzerMSBuild()
Assert
.
True
(
result
.
ExitCode
!=
0
);
Assert
.
Contains
(
"/reportanalyzer"
,
result
.
Output
);
}
[
Fact
(
Skip
=
"failing msbuild"
)]
public
void
SolutionWithPunctuation
()
{
var
testDir
=
_tempDirectory
.
CreateDirectory
(
@"SLN;!@(foo)'^1"
);
var
slnFile
=
testDir
.
CreateFile
(
"Console;!@(foo)'^(Application1.sln"
).
WriteAllText
(
@"
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2005
Project(""{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"") = ""Cons.ole;!@(foo)'^(Application1"", ""Console;!@(foo)'^(Application1\Cons.ole;!@(foo)'^(Application1.csproj"", ""{770F2381-8C39-49E9-8C96-0538FA4349A7}""
EndProject
Project(""{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"") = ""Class;!@(foo)'^(Library1"", ""Class;!@(foo)'^(Library1\Class;!@(foo)'^(Library1.csproj"", ""{0B4B78CC-C752-43C2-BE9A-319D20216129}""
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{770F2381-8C39-49E9-8C96-0538FA4349A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{770F2381-8C39-49E9-8C96-0538FA4349A7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{770F2381-8C39-49E9-8C96-0538FA4349A7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{770F2381-8C39-49E9-8C96-0538FA4349A7}.Release|Any CPU.Build.0 = Release|Any CPU
{0B4B78CC-C752-43C2-BE9A-319D20216129}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0B4B78CC-C752-43C2-BE9A-319D20216129}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0B4B78CC-C752-43C2-BE9A-319D20216129}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0B4B78CC-C752-43C2-BE9A-319D20216129}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
"
);
var
appDir
=
testDir
.
CreateDirectory
(
@"Console;!@(foo)'^(Application1"
);
var
appProjFile
=
appDir
.
CreateFile
(
@"Cons.ole;!@(foo)'^(Application1.csproj"
).
WriteAllText
(
@"
<Project DefaultTargets=""Build"" ToolsVersion=""3.5"" xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
<UsingTask TaskName=""Microsoft.CodeAnalysis.BuildTasks.Csc"" AssemblyFile="""
+
_buildTaskDll
+
@""" />
<PropertyGroup>
<Configuration Condition="" '$(Configuration)' == '' "">Debug</Configuration>
<Platform Condition="" '$(Platform)' == '' "">AnyCPU</Platform>
<ProductVersion>8.0.50510</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{770F2381-8C39-49E9-8C96-0538FA4349A7}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Console____foo____Application1</RootNamespace>
<AssemblyName>Console%3b!%40%28foo%29%27^%28Application1</AssemblyName>
</PropertyGroup>
<PropertyGroup Condition="" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include=""System"" />
<Reference Include=""System.Data"" />
<Reference Include=""System.Xml"" />
</ItemGroup>
<ItemGroup>
<Compile Include=""Program.cs"" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include=""..\Class%3b!%40%28foo%29%27^%28Library1\Class%3b!%40%28foo%29%27^%28Library1.csproj"">
<Project>{0B4B78CC-C752-43C2-BE9A-319D20216129}</Project>
<Name>Class%3b!%40%28foo%29%27^%28Library1</Name>
</ProjectReference>
</ItemGroup>
<Import Project=""$(MSBuildBinPath)\Microsoft.CSharp.targets"" />
</Project>
"
);
var
appProgramFile
=
appDir
.
CreateFile
(
"Program.cs"
).
WriteAllText
(
@"
using System;
using System.Collections.Generic;
using System.Text;
namespace Console____foo____Application1
{
class Program
{
static void Main(string[] args)
{
Class____foo____Library1.Class1 foo = new Class____foo____Library1.Class1();
}
}
}"
);
var
libraryDir
=
testDir
.
CreateDirectory
(
@"Class;!@(foo)'^(Library1"
);
var
libraryProjFile
=
libraryDir
.
CreateFile
(
"Class;!@(foo)'^(Library1.csproj"
).
WriteAllText
(
@"
<Project DefaultTargets=""Build"" ToolsVersion=""3.5"" xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
<UsingTask TaskName=""Microsoft.CodeAnalysis.BuildTasks.Csc"" AssemblyFile="""
+
_buildTaskDll
+
@""" />
<PropertyGroup>
<Configuration Condition="" '$(Configuration)' == '' "">Debug</Configuration>
<Platform Condition="" '$(Platform)' == '' "">AnyCPU</Platform>
<ProductVersion>8.0.50510</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{0B4B78CC-C752-43C2-BE9A-319D20216129}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Class____foo____Library1</RootNamespace>
<AssemblyName>Class%3b!%40%28foo%29%27^%28Library1</AssemblyName>
</PropertyGroup>
<PropertyGroup Condition="" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include=""System"" />
<Reference Include=""System.Data"" />
<Reference Include=""System.Xml"" />
</ItemGroup>
<ItemGroup>
<Compile Include=""Class1.cs"" />
</ItemGroup>
<Import Project=""$(MSBuildBinPath)\Microsoft.CSharp.targets"" />
<!-- The old OM, which is what this solution is being built under, doesn't understand
BeforeTargets, so this test was failing, because _AssignManagedMetadata was set
up as a BeforeTarget for Build. Copied here so that build will return the correct
information again. -->
<Target Name=""BeforeBuild"">
<ItemGroup>
<BuiltTargetPath Include=""$(TargetPath)"">
<ManagedAssembly>$(ManagedAssembly)</ManagedAssembly>
</BuiltTargetPath>
</ItemGroup>
</Target>
</Project>
"
);
var
libraryClassFile
=
libraryDir
.
CreateFile
(
"Class1.cs"
).
WriteAllText
(
@"
namespace Class____foo____Library1
{
public class Class1
{
}
}
"
);
var
result
=
RunCommandLineCompiler
(
MSBuildExecutable
,
""
,
testDir
.
Path
);
Assert
.
Equal
(
0
,
result
.
ExitCode
);
Assert
.
Equal
(
""
,
result
.
Errors
);
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录