Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
9cdaba30
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,发现更多精彩内容 >>
提交
9cdaba30
编写于
10月 04, 2018
作者:
D
Dustin Campbell
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add failing test for issue #29122
上级
0b90e960
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
269 addition
and
0 deletion
+269
-0
src/Workspaces/CoreTestUtilities/Resources/Issue29122/Proj1/ClassLibrary1.vbproj
...Utilities/Resources/Issue29122/Proj1/ClassLibrary1.vbproj
+85
-0
src/Workspaces/CoreTestUtilities/Resources/Issue29122/Proj2/ClassLibrary2.vbproj
...Utilities/Resources/Issue29122/Proj2/ClassLibrary2.vbproj
+93
-0
src/Workspaces/CoreTestUtilities/Resources/Issue29122/TestVB2.sln
...spaces/CoreTestUtilities/Resources/Issue29122/TestVB2.sln
+39
-0
src/Workspaces/CoreTestUtilities/Roslyn.Services.UnitTests.Utilities.csproj
...eTestUtilities/Roslyn.Services.UnitTests.Utilities.csproj
+3
-0
src/Workspaces/CoreTestUtilities/TestFiles/Resources.cs
src/Workspaces/CoreTestUtilities/TestFiles/Resources.cs
+3
-0
src/Workspaces/CoreTestUtilities/WorkspaceTestBase.cs
src/Workspaces/CoreTestUtilities/WorkspaceTestBase.cs
+7
-0
src/Workspaces/MSBuildTest/MSBuildWorkspaceTests.cs
src/Workspaces/MSBuildTest/MSBuildWorkspaceTests.cs
+39
-0
未找到文件。
src/Workspaces/CoreTestUtilities/Resources/Issue29122/Proj1/ClassLibrary1.vbproj
0 → 100644
浏览文件 @
9cdaba30
<?xml version="1.0" encoding="utf-8"?>
<Project
ToolsVersion=
"15.0"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<PropertyGroup>
<Configuration
Condition=
" '$(Configuration)' == '' "
>
Debug
</Configuration>
<Platform
Condition=
" '$(Platform)' == '' "
>
AnyCPU
</Platform>
<ProductVersion>
</ProductVersion>
<SchemaVersion>
</SchemaVersion>
<ProjectGuid>
{F8AE35AB-1AC5-4381-BB3E-0645519695F5}
</ProjectGuid>
<OutputType>
Library
</OutputType>
<RootNamespace>
ClassLibrary1
</RootNamespace>
<AssemblyName>
ClassLibrary1
</AssemblyName>
<FileAlignment>
512
</FileAlignment>
<MyType>
Windows
</MyType>
<TargetFrameworkVersion>
v3.5
</TargetFrameworkVersion>
<TargetFrameworkProfile
/>
<RestorePackages>
true
</RestorePackages>
</PropertyGroup>
<PropertyGroup>
<OptionExplicit>
On
</OptionExplicit>
</PropertyGroup>
<PropertyGroup>
<OptionCompare>
Binary
</OptionCompare>
</PropertyGroup>
<PropertyGroup>
<OptionStrict>
On
</OptionStrict>
</PropertyGroup>
<PropertyGroup>
<OptionInfer>
On
</OptionInfer>
</PropertyGroup>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)' == 'Debug|x86'"
>
<DebugSymbols>
true
</DebugSymbols>
<DefineDebug>
true
</DefineDebug>
<DefineTrace>
true
</DefineTrace>
<OutputPath>
..\Dev\
</OutputPath>
<DebugType>
full
</DebugType>
<PlatformTarget>
x86
</PlatformTarget>
</PropertyGroup>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)' == 'Release|x86'"
>
<DefineTrace>
true
</DefineTrace>
<OutputPath>
..\Dev\
</OutputPath>
<Optimize>
true
</Optimize>
<DebugType>
pdbonly
</DebugType>
<PlatformTarget>
x86
</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<Compile
Include=
"Class1.vb"
/>
<Compile
Include=
"My Project\AssemblyInfo.vb"
/>
<Compile
Include=
"My Project\Application.Designer.vb"
>
<AutoGen>
True
</AutoGen>
<DependentUpon>
Application.myapp
</DependentUpon>
</Compile>
<Compile
Include=
"My Project\Resources.Designer.vb"
>
<AutoGen>
True
</AutoGen>
<DesignTime>
True
</DesignTime>
<DependentUpon>
Resources.resx
</DependentUpon>
</Compile>
<Compile
Include=
"My Project\Settings.Designer.vb"
>
<AutoGen>
True
</AutoGen>
<DependentUpon>
Settings.settings
</DependentUpon>
<DesignTimeSharedInput>
True
</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource
Include=
"My Project\Resources.resx"
>
<Generator>
VbMyResourcesResXFileCodeGenerator
</Generator>
<LastGenOutput>
Resources.Designer.vb
</LastGenOutput>
<CustomToolNamespace>
My.Resources
</CustomToolNamespace>
<SubType>
Designer
</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None
Include=
"My Project\Application.myapp"
>
<Generator>
MyApplicationCodeGenerator
</Generator>
<LastGenOutput>
Application.Designer.vb
</LastGenOutput>
</None>
<None
Include=
"My Project\Settings.settings"
>
<Generator>
SettingsSingleFileGenerator
</Generator>
<CustomToolNamespace>
My
</CustomToolNamespace>
<LastGenOutput>
Settings.Designer.vb
</LastGenOutput>
</None>
</ItemGroup>
<Import
Project=
"$(MSBuildToolsPath)\Microsoft.VisualBasic.targets"
/>
</Project>
\ No newline at end of file
src/Workspaces/CoreTestUtilities/Resources/Issue29122/Proj2/ClassLibrary2.vbproj
0 → 100644
浏览文件 @
9cdaba30
<?xml version="1.0" encoding="utf-8"?>
<Project
ToolsVersion=
"15.0"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<PropertyGroup>
<Configuration
Condition=
" '$(Configuration)' == '' "
>
Debug
</Configuration>
<Platform
Condition=
" '$(Platform)' == '' "
>
AnyCPU
</Platform>
<ProjectGuid>
{65D39B82-9F22-4350-9BFF-3988C367809B}
</ProjectGuid>
<OutputType>
Library
</OutputType>
<RootNamespace>
ClassLibrary2
</RootNamespace>
<AssemblyName>
ClassLibrary2
</AssemblyName>
<FileAlignment>
512
</FileAlignment>
<MyType>
Windows
</MyType>
<TargetFrameworkVersion>
v3.5
</TargetFrameworkVersion>
<TargetFrameworkProfile
/>
<RestorePackages>
true
</RestorePackages>
</PropertyGroup>
<PropertyGroup>
<OptionExplicit>
On
</OptionExplicit>
</PropertyGroup>
<PropertyGroup>
<OptionCompare>
Binary
</OptionCompare>
</PropertyGroup>
<PropertyGroup>
<OptionStrict>
On
</OptionStrict>
</PropertyGroup>
<PropertyGroup>
<OptionInfer>
On
</OptionInfer>
</PropertyGroup>
<PropertyGroup
Condition=
" '$(Configuration)|$(Platform)' == 'Debug|x86' "
>
<DebugSymbols>
true
</DebugSymbols>
<DefineDebug>
true
</DefineDebug>
<DefineTrace>
true
</DefineTrace>
<OutputPath>
..\Dev\Modules\
</OutputPath>
<NoWarn>
</NoWarn>
<DebugType>
full
</DebugType>
<PlatformTarget>
x86
</PlatformTarget>
</PropertyGroup>
<PropertyGroup
Condition=
" '$(Configuration)|$(Platform)' == 'Release|x86' "
>
<DebugType>
pdbonly
</DebugType>
<DefineDebug>
false
</DefineDebug>
<DefineTrace>
true
</DefineTrace>
<Optimize>
true
</Optimize>
<OutputPath>
..\Dev\Modules\
</OutputPath>
<NoWarn>
</NoWarn>
<PlatformTarget>
x86
</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<Compile
Include=
"Class1.vb"
/>
<Compile
Include=
"My Project\AssemblyInfo.vb"
/>
<Compile
Include=
"My Project\Application.Designer.vb"
>
<AutoGen>
True
</AutoGen>
<DependentUpon>
Application.myapp
</DependentUpon>
</Compile>
<Compile
Include=
"My Project\Resources.Designer.vb"
>
<AutoGen>
True
</AutoGen>
<DesignTime>
True
</DesignTime>
<DependentUpon>
Resources.resx
</DependentUpon>
</Compile>
<Compile
Include=
"My Project\Settings.Designer.vb"
>
<AutoGen>
True
</AutoGen>
<DependentUpon>
Settings.settings
</DependentUpon>
<DesignTimeSharedInput>
True
</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource
Include=
"My Project\Resources.resx"
>
<Generator>
VbMyResourcesResXFileCodeGenerator
</Generator>
<LastGenOutput>
Resources.Designer.vb
</LastGenOutput>
<CustomToolNamespace>
My.Resources
</CustomToolNamespace>
<SubType>
Designer
</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None
Include=
"My Project\Application.myapp"
>
<Generator>
MyApplicationCodeGenerator
</Generator>
<LastGenOutput>
Application.Designer.vb
</LastGenOutput>
</None>
<None
Include=
"My Project\Settings.settings"
>
<Generator>
SettingsSingleFileGenerator
</Generator>
<CustomToolNamespace>
My
</CustomToolNamespace>
<LastGenOutput>
Settings.Designer.vb
</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference
Include=
"..\Proj1\ClassLibrary1.vbproj"
>
<Project>
{f8ae35ab-1ac5-4381-bb3e-0645519695f5}
</Project>
<Name>
ClassLibrary1
</Name>
<Private>
False
</Private>
</ProjectReference>
</ItemGroup>
<Import
Project=
"$(MSBuildToolsPath)\Microsoft.VisualBasic.targets"
/>
</Project>
\ No newline at end of file
src/Workspaces/CoreTestUtilities/Resources/Issue29122/TestVB2.sln
0 → 100644
浏览文件 @
9cdaba30
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27703.2018
MinimumVisualStudioVersion = 10.0.40219.1
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ClassLibrary1", "Proj1\ClassLibrary1.vbproj", "{F8AE35AB-1AC5-4381-BB3E-0645519695F5}"
EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ClassLibrary2", "Proj2\ClassLibrary2.vbproj", "{65D39B82-9F22-4350-9BFF-3988C367809B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F8AE35AB-1AC5-4381-BB3E-0645519695F5}.Debug|Any CPU.ActiveCfg = Debug|x86
{F8AE35AB-1AC5-4381-BB3E-0645519695F5}.Debug|x86.ActiveCfg = Debug|x86
{F8AE35AB-1AC5-4381-BB3E-0645519695F5}.Debug|x86.Build.0 = Debug|x86
{F8AE35AB-1AC5-4381-BB3E-0645519695F5}.Release|Any CPU.ActiveCfg = Release|x86
{F8AE35AB-1AC5-4381-BB3E-0645519695F5}.Release|x86.ActiveCfg = Release|x86
{F8AE35AB-1AC5-4381-BB3E-0645519695F5}.Release|x86.Build.0 = Release|x86
{65D39B82-9F22-4350-9BFF-3988C367809B}.Debug|Any CPU.ActiveCfg = Debug|x86
{65D39B82-9F22-4350-9BFF-3988C367809B}.Debug|Any CPU.Build.0 = Debug|x86
{65D39B82-9F22-4350-9BFF-3988C367809B}.Debug|x86.ActiveCfg = Debug|x86
{65D39B82-9F22-4350-9BFF-3988C367809B}.Debug|x86.Build.0 = Debug|x86
{65D39B82-9F22-4350-9BFF-3988C367809B}.Release|Any CPU.ActiveCfg = Release|x86
{65D39B82-9F22-4350-9BFF-3988C367809B}.Release|Any CPU.Build.0 = Release|x86
{65D39B82-9F22-4350-9BFF-3988C367809B}.Release|x86.ActiveCfg = Release|x86
{65D39B82-9F22-4350-9BFF-3988C367809B}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {091C5642-C43A-4E23-A3BC-0CC533E3B5C1}
EndGlobalSection
EndGlobal
src/Workspaces/CoreTestUtilities/Roslyn.Services.UnitTests.Utilities.csproj
浏览文件 @
9cdaba30
...
...
@@ -53,4 +53,7 @@
<ItemGroup>
<Compile
Remove=
"Resources\**\*.*"
/>
</ItemGroup>
<ItemGroup>
<Folder
Include=
"Resources\Issue29122\"
/>
</ItemGroup>
</Project>
\ No newline at end of file
src/Workspaces/CoreTestUtilities/TestFiles/Resources.cs
浏览文件 @
9cdaba30
...
...
@@ -86,6 +86,7 @@ public static class SolutionFiles
public
static
string
DuplicatedGuidsBecomeSelfReferential
=>
GetText
(
"SolutionFiles.DuplicatedGuidsBecomeSelfReferential.sln"
);
public
static
string
DuplicatedGuidsBecomeCircularReferential
=>
GetText
(
"SolutionFiles.DuplicatedGuidsBecomeCircularReferential.sln"
);
public
static
string
EmptyLineBetweenProjectBlock
=>
GetText
(
"SolutionFiles.EmptyLineBetweenProjectBlock.sln"
);
public
static
string
Issue29122_Solution
=>
GetText
(
"Issue29122.TestVB2.sln"
);
public
static
string
InvalidProjectPath
=>
GetText
(
"SolutionFiles.InvalidProjectPath.sln"
);
public
static
string
MissingEndProject1
=>
GetText
(
"SolutionFiles.MissingEndProject1.sln"
);
public
static
string
MissingEndProject2
=>
GetText
(
"SolutionFiles.MissingEndProject2.sln"
);
...
...
@@ -159,6 +160,8 @@ public static class VisualBasic
public
static
string
Circular_Target
=>
GetText
(
"ProjectFiles.VisualBasic.Circular_Target.vbproj"
);
public
static
string
Circular_Top
=>
GetText
(
"ProjectFiles.VisualBasic.Circular_Top.vbproj"
);
public
static
string
Embed
=>
GetText
(
"ProjectFiles.VisualBasic.Embed.vbproj"
);
public
static
string
Issue29122_ClassLibrary1
=>
GetText
(
"Issue29122.Proj1.ClassLibrary1.vbproj"
);
public
static
string
Issue29122_ClassLibrary2
=>
GetText
(
"Issue29122.Proj2.ClassLibrary2.vbproj"
);
public
static
string
InvalidProjectReference
=>
GetText
(
"ProjectFiles.VisualBasic.InvalidProjectReference.vbproj"
);
public
static
string
NonExistentProjectReference
=>
GetText
(
"ProjectFiles.VisualBasic.NonExistentProjectReference.vbproj"
);
public
static
string
UnknownProjectExtension
=>
GetText
(
"ProjectFiles.VisualBasic.UnknownProjectExtension.vbproj"
);
...
...
src/Workspaces/CoreTestUtilities/WorkspaceTestBase.cs
浏览文件 @
9cdaba30
...
...
@@ -87,6 +87,13 @@ protected void CreateCSharpFiles()
CreateFiles
(
GetSimpleCSharpSolutionFiles
());
}
protected
FileSet
GetBaseFiles
()
{
return
new
FileSet
(
(
@"Directory.Build.props"
,
Resources
.
Directory_Build_props
),
(
@"Directory.Build.targets"
,
Resources
.
Directory_Build_targets
));
}
protected
FileSet
GetSimpleCSharpSolutionFiles
()
{
return
new
FileSet
(
...
...
src/Workspaces/MSBuildTest/MSBuildWorkspaceTests.cs
浏览文件 @
9cdaba30
...
...
@@ -3526,6 +3526,45 @@ public async Task TestOpenProject_CommandLineArgsHaveNoErrors()
}
}
[
ConditionalFact
(
typeof
(
VisualStudioMSBuildInstalled
)),
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
MSBuildWorkspace
)]
[
WorkItem
(
29122
,
"https://github.com/dotnet/roslyn/issues/29122"
)]
public
async
Task
TestOpenSolution_ProjectReferencesWithUnconventionalOutputPaths
()
{
CreateFiles
(
GetBaseFiles
()
.
WithFile
(
@"TestVB2.sln"
,
Resources
.
SolutionFiles
.
Issue29122_Solution
)
.
WithFile
(
@"Proj1\ClassLibrary1.vbproj"
,
Resources
.
ProjectFiles
.
VisualBasic
.
Issue29122_ClassLibrary1
)
.
WithFile
(
@"Proj1\Class1.vb"
,
Resources
.
SourceFiles
.
VisualBasic
.
VisualBasicClass
)
.
WithFile
(
@"Proj1\My Project\Application.Designer.vb"
,
Resources
.
SourceFiles
.
VisualBasic
.
Application_Designer
)
.
WithFile
(
@"Proj1\My Project\Application.myapp"
,
Resources
.
SourceFiles
.
VisualBasic
.
Application
)
.
WithFile
(
@"Proj1\My Project\AssemblyInfo.vb"
,
Resources
.
SourceFiles
.
VisualBasic
.
AssemblyInfo
)
.
WithFile
(
@"Proj1\My Project\Resources.Designer.vb"
,
Resources
.
SourceFiles
.
VisualBasic
.
Resources_Designer
)
.
WithFile
(
@"Proj1\My Project\Resources.resx"
,
Resources
.
SourceFiles
.
VisualBasic
.
Resources
)
.
WithFile
(
@"Proj1\My Project\Settings.Designer.vb"
,
Resources
.
SourceFiles
.
VisualBasic
.
Settings_Designer
)
.
WithFile
(
@"Proj1\My Project\Settings.settings"
,
Resources
.
SourceFiles
.
VisualBasic
.
Settings
)
.
WithFile
(
@"Proj2\ClassLibrary2.vbproj"
,
Resources
.
ProjectFiles
.
VisualBasic
.
Issue29122_ClassLibrary2
)
.
WithFile
(
@"Proj2\Class1.vb"
,
Resources
.
SourceFiles
.
VisualBasic
.
VisualBasicClass
)
.
WithFile
(
@"Proj2\My Project\Application.Designer.vb"
,
Resources
.
SourceFiles
.
VisualBasic
.
Application_Designer
)
.
WithFile
(
@"Proj2\My Project\Application.myapp"
,
Resources
.
SourceFiles
.
VisualBasic
.
Application
)
.
WithFile
(
@"Proj2\My Project\AssemblyInfo.vb"
,
Resources
.
SourceFiles
.
VisualBasic
.
AssemblyInfo
)
.
WithFile
(
@"Proj2\My Project\Resources.Designer.vb"
,
Resources
.
SourceFiles
.
VisualBasic
.
Resources_Designer
)
.
WithFile
(
@"Proj2\My Project\Resources.resx"
,
Resources
.
SourceFiles
.
VisualBasic
.
Resources
)
.
WithFile
(
@"Proj2\My Project\Settings.Designer.vb"
,
Resources
.
SourceFiles
.
VisualBasic
.
Settings_Designer
)
.
WithFile
(
@"Proj2\My Project\Settings.settings"
,
Resources
.
SourceFiles
.
VisualBasic
.
Settings
));
var
solutionFlePath
=
GetSolutionFileName
(
@"TestVB2.sln"
);
using
(
var
workspace
=
CreateMSBuildWorkspace
())
{
var
solution
=
await
workspace
.
OpenSolutionAsync
(
solutionFlePath
);
// Neither project should contain any unresolved metadata references
foreach
(
var
project
in
solution
.
Projects
)
{
Assert
.
DoesNotContain
(
project
.
MetadataReferences
,
mr
=>
mr
is
UnresolvedMetadataReference
);
}
}
}
private
class
InMemoryAssemblyLoader
:
IAnalyzerAssemblyLoader
{
public
void
AddDependencyLocation
(
string
fullPath
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录