Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port CSharpSymbolTests to run on Desktop and CoreCLR. #18471

Merged
merged 18 commits into from
Apr 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 2 additions & 6 deletions Compilers.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
# Visual Studio 15
VisualStudioVersion = 15.0.26323.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeAnalysisTest", "src\Compilers\Core\CodeAnalysisTest\CodeAnalysisTest.csproj", "{A4C99B85-765C-4C65-9C2A-BB609AAB09E6}"
EndProject
Expand Down Expand Up @@ -206,10 +206,6 @@ Global
{7FE6B002-89D8-4298-9B1B-0B5C247DD1FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7FE6B002-89D8-4298-9B1B-0B5C247DD1FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7FE6B002-89D8-4298-9B1B-0B5C247DD1FD}.Release|Any CPU.Build.0 = Release|Any CPU
{F7712928-1175-47B3-8819-EE086753DEE2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F7712928-1175-47B3-8819-EE086753DEE2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F7712928-1175-47B3-8819-EE086753DEE2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F7712928-1175-47B3-8819-EE086753DEE2}.Release|Any CPU.Build.0 = Release|Any CPU
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know why this changed?

{4371944A-D3BA-4B5B-8285-82E5FFC6D1F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4371944A-D3BA-4B5B-8285-82E5FFC6D1F9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4371944A-D3BA-4B5B-8285-82E5FFC6D1F9}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
25 changes: 16 additions & 9 deletions CrossPlatform.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26014.0
VisualStudioVersion = 15.0.26228.10
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeAnalysis", "src\Compilers\Core\Portable\CodeAnalysis.csproj", "{1EE8CAD3-55F9-4D91-96B2-084641DA9A6C}"
EndProject
Expand Down Expand Up @@ -117,6 +117,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpCodeStyleTests", "src
EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "BasicCodeStyleTests", "src\CodeStyle\VisualBasic\Tests\BasicCodeStyleTests.vbproj", "{E512C6C1-F085-4AD7-B0D9-E8F1A0A2A510}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpCompilerSymbolTest", "src\Compilers\CSharp\Test\Symbol\CSharpCompilerSymbolTest.csproj", "{28026D16-EB0C-40B0-BDA7-11CAA2B97CCC}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
src\Compilers\Core\AnalyzerDriver\AnalyzerDriver.projitems*{1ee8cad3-55f9-4d91-96b2-084641da9a6c}*SharedItemsImports = 4
Expand Down Expand Up @@ -200,14 +202,14 @@ Global
{57CA988D-F010-4BF2-9A2E-07D6DCD2FF2C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{57CA988D-F010-4BF2-9A2E-07D6DCD2FF2C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{57CA988D-F010-4BF2-9A2E-07D6DCD2FF2C}.Release|Any CPU.Build.0 = Release|Any CPU
{E3CD2895-76A8-4D11-A316-EA67CB5EA42C}.Debug|Any CPU.ActiveCfg = Debug|x64
{E3CD2895-76A8-4D11-A316-EA67CB5EA42C}.Debug|Any CPU.Build.0 = Debug|x64
{E3CD2895-76A8-4D11-A316-EA67CB5EA42C}.Release|Any CPU.ActiveCfg = Release|x64
{E3CD2895-76A8-4D11-A316-EA67CB5EA42C}.Release|Any CPU.Build.0 = Release|x64
{8CE3A581-2969-4864-A803-013E9D977C3A}.Debug|Any CPU.ActiveCfg = Debug|x64
{8CE3A581-2969-4864-A803-013E9D977C3A}.Debug|Any CPU.Build.0 = Debug|x64
{8CE3A581-2969-4864-A803-013E9D977C3A}.Release|Any CPU.ActiveCfg = Release|x64
{8CE3A581-2969-4864-A803-013E9D977C3A}.Release|Any CPU.Build.0 = Release|x64
{E3CD2895-76A8-4D11-A316-EA67CB5EA42C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E3CD2895-76A8-4D11-A316-EA67CB5EA42C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E3CD2895-76A8-4D11-A316-EA67CB5EA42C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E3CD2895-76A8-4D11-A316-EA67CB5EA42C}.Release|Any CPU.Build.0 = Release|Any CPU
{8CE3A581-2969-4864-A803-013E9D977C3A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8CE3A581-2969-4864-A803-013E9D977C3A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8CE3A581-2969-4864-A803-013E9D977C3A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8CE3A581-2969-4864-A803-013E9D977C3A}.Release|Any CPU.Build.0 = Release|Any CPU
{CCBD3438-3E84-40A9-83AD-533F23BCFCA5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CCBD3438-3E84-40A9-83AD-533F23BCFCA5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CCBD3438-3E84-40A9-83AD-533F23BCFCA5}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -300,6 +302,10 @@ Global
{E512C6C1-F085-4AD7-B0D9-E8F1A0A2A510}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E512C6C1-F085-4AD7-B0D9-E8F1A0A2A510}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E512C6C1-F085-4AD7-B0D9-E8F1A0A2A510}.Release|Any CPU.Build.0 = Release|Any CPU
{28026D16-EB0C-40B0-BDA7-11CAA2B97CCC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{28026D16-EB0C-40B0-BDA7-11CAA2B97CCC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{28026D16-EB0C-40B0-BDA7-11CAA2B97CCC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{28026D16-EB0C-40B0-BDA7-11CAA2B97CCC}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -354,5 +360,6 @@ Global
{9FF1205F-1D7C-4EE4-B038-3456FE6EBEAF} = {6B83F334-CB79-47C8-8EA9-5391DA1601F4}
{5018D049-5870-465A-889B-C742CE1E31CB} = {6B83F334-CB79-47C8-8EA9-5391DA1601F4}
{E512C6C1-F085-4AD7-B0D9-E8F1A0A2A510} = {6B83F334-CB79-47C8-8EA9-5391DA1601F4}
{28026D16-EB0C-40B0-BDA7-11CAA2B97CCC} = {32A48625-F0AD-419D-828B-A50BDABA38EA}
EndGlobalSection
EndGlobal
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ MSBUILD_ADDITIONALARGS := /v:m /fl /fileloggerparameters:Verbosity=normal /p:Con
ifeq ($(OS_NAME),Linux)
MSBUILD_ADDITIONALARGS := $(MSBUILD_ADDITIONALARGS) /p:BaseNuGetRuntimeIdentifier=$(shell . /etc/os-release && echo $$ID.$$VERSION_ID)
else ifeq ($(OS_NAME),Darwin)
MSBUILD_ADDITIONALARGS := $(MSBUILD_ADDITIONALARGS) /p:BaseNuGetRuntimeIdentifier=osx.10.10
MSBUILD_ADDITIONALARGS := $(MSBUILD_ADDITIONALARGS) /p:BaseNuGetRuntimeIdentifier=osx.10.12
endif

ifneq ($(BUILD_LOG_PATH),)
Expand Down
4 changes: 2 additions & 2 deletions build/Targets/Dependencies.props
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
<MicrosoftVisualStudioInteractiveWindowVersion>2.0.0-rc3-61304-01</MicrosoftVisualStudioInteractiveWindowVersion>
<MicrosoftVisualStudioVsInteractiveWindowVersion>2.0.0-rc3-61304-01</MicrosoftVisualStudioVsInteractiveWindowVersion>
<MicrosoftVSSDKBuildToolsVersion>15.0.26124-RC3</MicrosoftVSSDKBuildToolsVersion>
<NETStandardLibraryVersion>2.0.0-beta-25123-01</NETStandardLibraryVersion>
<RoslynToolsMicrosoftLocateVSVersion>0.2.4-beta</RoslynToolsMicrosoftLocateVSVersion>
<RoslynToolsMicrosoftSignToolVersion>0.3.0-beta</RoslynToolsMicrosoftSignToolVersion>
<RoslynToolsMicrosoftVSIXExpInstallerVersion>0.2.4-beta</RoslynToolsMicrosoftVSIXExpInstallerVersion>
Expand Down Expand Up @@ -100,11 +101,10 @@
<SystemXmlReaderWriterVersion>4.3.0</SystemXmlReaderWriterVersion>
<SystemXmlXDocumentVersion>4.3.0</SystemXmlXDocumentVersion>
<SystemXmlXmlDocumentVersion>4.3.0</SystemXmlXmlDocumentVersion>
<SystemXmlXmlSerializerVersion>4.3.0</SystemXmlXmlSerializerVersion>
<SystemXmlXPathXDocumentVersion>4.3.0</SystemXmlXPathXDocumentVersion>
<xunitVersion>2.2.0-beta4-build3444</xunitVersion>
<xunitconsolenetcoreVersion>1.0.2-prerelease-00104</xunitconsolenetcoreVersion>
<xunitrunnerconsoleVersion>2.2.0-beta4-build3444</xunitrunnerconsoleVersion>
<xunitrunnervisualstudioVersion>2.2.0-beta4-build1194</xunitrunnervisualstudioVersion>
</PropertyGroup>
</Project>
</Project>
13 changes: 13 additions & 0 deletions build/Targets/Imports.targets
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,19 @@
TargetMonikers=".NETFramework,Version=v4.6">
<Output TaskParameter="ResolvedCopyLocalItems" ItemName="ReferenceCopyLocalPaths" />
</ResolveNuGetPackageAssets>

<!-- Desktop tests need to load the Desktop version of the TestUtilities via reflection at runtime without
referencing the assembly at compile time. However, it looks like adding a project-to-project reference
with ReferenceOutputputAssembly=false and Private=true does not copy the assembly to the output
(https://github.com/Microsoft/msbuild/issues/1916). Therefore, we reference the assembly but do the
copying ourselves, by adding the output path of the project (GetTargetPath) manually to the set of copied
assemblies (ReferenceCopyLocalPaths) -->
<MSBuild Projects="$(MSBuildThisFileDirectory)..\..\src\Test\Utilities\Desktop\TestUtilities.Desktop.csproj"
Targets="GetTargetPath"
BuildInParallel="true">

<Output TaskParameter="TargetOutputs" ItemName="ReferenceCopyLocalPaths" />
</MSBuild>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wondering how you would work around this problem. Can you add a comment documenting what this accomplishes?

</Target>

<!-- Returns the current build version. Used in .vsixmanifests to substitute our build version into them -->
Expand Down
3 changes: 3 additions & 0 deletions build/Targets/Settings.props
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)' == ''">$(RepoRoot)Binaries\Obj\</BaseIntermediateOutputPath>
<IntermediateOutputPath>$(BaseIntermediateOutputPath)$(Configuration)\$(MSBuildProjectName)\</IntermediateOutputPath>

<NetStandard20RefPath>$(NuGetPackageRoot)/NETStandard.Library/$(NETStandardLibraryVersion)/build/netstandard2.0/ref/</NetStandard20RefPath>
<MicrosoftCSharpRefPath>$(NuGetPackageRoot)/Microsoft.CSharp/$(MicrosoftCSharpVersion)/ref/netstandard1.0/</MicrosoftCSharpRefPath>

<!-- Workaround until we move to Microsoft.Net.Compilers.nupkg with this fix: https://github.com/dotnet/roslyn/commit/05c12ebfcdd08a02dbceded5327a8da7a7df23be:
Use the Microsoft.Net.Compilers.props file with the fix checked into the repo instead of the one that comes along with the nuget package:
$(NuGetPackageRoot)\Microsoft.Net.Compilers\$(ToolsetCompilerPackageVersion)\build\Microsoft.Net.Compilers.props -->
Expand Down
8 changes: 7 additions & 1 deletion build/config/RepoUtilData.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
"^Microsoft.?Build.*",
"GitLink",
"Microsoft.NETCore.Runtime.CoreCLR",
"Microsoft.VSSDK.BuildTools"
"Microsoft.VSSDK.BuildTools",
"NETStandard.Library"
]
}
},
Expand All @@ -61,5 +62,10 @@
"^src\\\\Dependencies.*",
".*NuSpec.loc.*",
".*Templates.*"
],

"projectJsonExcludes": [
"^build\\\\MSBuildToolset.*",
"^src\\\\Tools\\\\Source\\\\CompilerGeneratorTools.*"
]
}
2 changes: 1 addition & 1 deletion netci.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ commitPullList.each { isPr ->

def triggerPhraseOnly = true
def triggerPhraseExtra = "mac"
Utilities.setMachineAffinity(myJob, 'OSX10.11', 'latest-or-auto')
Utilities.setMachineAffinity(myJob, 'OSX10.12', 'latest-or-auto')
Utilities.addXUnitDotNETResults(myJob, '**/xUnitResults/*.xml')
addRoslynJob(myJob, jobName, branchName, isPr, triggerPhraseExtra, triggerPhraseOnly)
}
Expand Down
5 changes: 2 additions & 3 deletions src/Compilers/CSharp/CscCore/CscCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
<PropertyGroup>
<Platform Condition="'$(Platform)' == ''">AnyCPU</Platform>
<PlatformTarget>AnyCPU</PlatformTarget>
<!-- Misspelling, bug in NuGet targets -->
<RuntimeIndentifier>x64</RuntimeIndentifier>
<NuGetRuntimeIdentifier>$(BaseNuGetRuntimeIdentifier)-$(RuntimeIndentifier)</NuGetRuntimeIdentifier>
<RuntimeIdentifier>x64</RuntimeIdentifier>
<NuGetRuntimeIdentifier>$(BaseNuGetRuntimeIdentifier)-$(RuntimeIdentifier)</NuGetRuntimeIdentifier>
<ProjectGuid>{E3CD2895-76A8-4D11-A316-EA67CB5EA42C}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>Microsoft.CodeAnalysis.CSharp.CommandLine</RootNamespace>
Expand Down
6 changes: 1 addition & 5 deletions src/Compilers/CSharp/CscCore/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@
"System.Xml.XPath.XDocument": "4.3.0"
},
"frameworks": {
// We don't actually target netstandard1.6; this is to work around https://github.com/dotnet/roslyn/issues/12458
"netstandard1.6": {
"imports": "portable-net452"
},
"NETCoreApp1.0": {
"imports": "portable-net452"
}
Expand All @@ -64,6 +60,6 @@
"win7-x64": { },
"ubuntu.14.04-x64": { },
"ubuntu.16.04-x64": { },
"osx.10.10-x64": { }
"osx.10.12-x64": { }
}
}
8 changes: 4 additions & 4 deletions src/Compilers/CSharp/Test/CommandLine/CommandLineTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ public void Win32ResourceArguments()
};

var parsedArgs = DefaultParse(args, _baseDirectory);
var compilation = CreateCompilationWithMscorlib(new SyntaxTree[0]);
var compilation = CreateStandardCompilation(new SyntaxTree[0]);
IEnumerable<DiagnosticInfo> errors;
CSharpCompiler.GetWin32ResourcesInternal(MessageProvider.Instance, parsedArgs, compilation, out errors);
Assert.Equal(1, errors.Count());
Expand Down Expand Up @@ -494,7 +494,7 @@ public void Win32IconContainsGarbage()
string tmpFileName = Temp.CreateFile().WriteAllBytes(new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }).Path;

var parsedArgs = DefaultParse(new[] { "/win32icon:" + tmpFileName, "a.cs" }, _baseDirectory);
var compilation = CreateCompilationWithMscorlib(new SyntaxTree[0]);
var compilation = CreateStandardCompilation(new SyntaxTree[0]);
IEnumerable<DiagnosticInfo> errors;

CSharpCompiler.GetWin32ResourcesInternal(MessageProvider.Instance, parsedArgs, compilation, out errors);
Expand Down Expand Up @@ -8750,7 +8750,7 @@ public void WarnAsError_LastOneWins1()
var arguments = DefaultParse(new[] { "/warnaserror-:3001", "/warnaserror" }, null);
var options = arguments.CompilationOptions;

var comp = CreateCompilationWithMscorlib(@"[assembly: System.CLSCompliant(true)]
var comp = CreateStandardCompilation(@"[assembly: System.CLSCompliant(true)]
public class C
{
public void M(ushort i)
Expand All @@ -8775,7 +8775,7 @@ public void WarnAsError_LastOneWins2()
var arguments = DefaultParse(new[] { "/warnaserror", "/warnaserror-:3001" }, null);
var options = arguments.CompilationOptions;

var comp = CreateCompilationWithMscorlib(@"[assembly: System.CLSCompliant(true)]
var comp = CreateStandardCompilation(@"[assembly: System.CLSCompliant(true)]
public class C
{
public void M(ushort i)
Expand Down
Loading