Skip to content

Commit

Permalink
Merge pull request #11696 from vslsnap/merge-stabilization-into-maste…
Browse files Browse the repository at this point in the history
…r20160601-201349

Merge stabilization into master
  • Loading branch information
Paul Vick committed Jun 3, 2016
2 parents 07984da + c2b2e42 commit 55e9268
Show file tree
Hide file tree
Showing 81 changed files with 1,917 additions and 571 deletions.
20 changes: 15 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,24 @@ SHELL = /usr/bin/env bash
OS_NAME = $(shell uname -s)
BUILD_CONFIGURATION = Debug
BINARIES_PATH = $(shell pwd)/Binaries
SCRIPTS_PATH = $(shell pwd)/build/scripts
TOOLSET_PATH = $(BINARIES_PATH)/toolset
RESTORE_SEMAPHORE_PATH = $(TOOLSET_PATH)/restore.semaphore
BOOTSTRAP_PATH = $(BINARIES_PATH)/Bootstrap
BUILD_LOG_PATH =
HOME_DIR = $(shell cd ~ && pwd)
DOTNET_VERSION = 1.0.0-preview2-002911

MSBUILD_ADDITIONALARGS := /v:m /fl /fileloggerparameters:Verbosity=normal /p:Configuration=$(BUILD_CONFIGURATION)

ifeq ($(OS_NAME),Linux)
MSBUILD_ADDITIONALARGS := $(MSBUILD_ADDITIONALARGS) /p:BaseNuGetRuntimeIdentifier=ubuntu.14.04
ROSLYN_TOOLSET_NAME = roslyn.linux.7
ROSLYN_TOOLSET_NAME = roslyn.linux.8
DOTNET_PLATFORM = ubuntu-x64
else ifeq ($(OS_NAME),Darwin)
MSBUILD_ADDITIONALARGS := $(MSBUILD_ADDITIONALARGS) /p:BaseNuGetRuntimeIdentifier=osx.10.10
ROSLYN_TOOLSET_NAME = roslyn.mac.6
ROSLYN_TOOLSET_NAME = roslyn.mac.8
DOTNET_PLATFORM = osx-x64
endif

ifneq ($(BUILD_LOG_PATH),)
Expand Down Expand Up @@ -69,9 +73,15 @@ toolset: $(ROSLYN_TOOLSET_PATH)

$(ROSLYN_TOOLSET_PATH): | $(TOOLSET_PATH)
@pushd $(TOOLSET_PATH) ; \
curl -O https://dotnetci.blob.core.windows.net/roslyn/$(ROSLYN_TOOLSET_NAME).tar.bz2 && \
tar -jxf $(ROSLYN_TOOLSET_NAME).tar.bz2 && \
chmod +x $(ROSLYN_TOOLSET_NAME)/corerun
curl -O https://dotnetci.blob.core.windows.net/roslyn/$(ROSLYN_TOOLSET_NAME).zip && \
curl -O https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/$(DOTNET_VERSION)/dotnet-dev-$(DOTNET_PLATFORM).$(DOTNET_VERSION).tar.gz && \
mkdir -p $(ROSLYN_TOOLSET_NAME)/dotnet-cli && \
$(SCRIPTS_PATH)/unzip.sh $(ROSLYN_TOOLSET_NAME).zip $(ROSLYN_TOOLSET_NAME) && \
tar -zxf dotnet-dev-$(DOTNET_PLATFORM).$(DOTNET_VERSION).tar.gz -C $(ROSLYN_TOOLSET_NAME)/dotnet-cli && \
chmod +x $(ROSLYN_TOOLSET_NAME)/corerun && \
chmod +x $(ROSLYN_TOOLSET_NAME)/RoslynRestore && \
chmod +x $(ROSLYN_TOOLSET_NAME)/csc && \
chmod +x $(ROSLYN_TOOLSET_NAME)/vbc

$(TOOLSET_PATH):
mkdir -p $(TOOLSET_PATH)
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
### Windows - Unit Tests
||Debug x86|Debug x64|Release x86|Release x64|Determinism|
|:--:|:--:|:--:|:--:|:--:|:--:|
|**master (1.3)**|[![Build Status](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/master/job/windows_debug_unit32/badge/icon)](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/master/job/windows_debug_unit32/)|[![Build Status](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/master/job/windows_debug_unit64/badge/icon)](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/master/job/windows_debug_unit64/)|[![Build Status](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/master/job/windows_release_unit32/badge/icon)](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/master/job/windows_release_unit64/)|[![Build Status](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/master/job/windows_release_unit64/badge/icon)](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/master/job/windows_release_unit64/)|[![Build Status](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/master/job/windows_determinism/badge/icon)](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/master/job/windows_determinism/)|
|**future (2.0 Preview 2)**|[![Build Status](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/future/job/windows_debug_unit32/badge/icon)](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/future/job/windows_debug_unit32/)|[![Build Status](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/future/job/windows_debug_unit64/badge/icon)](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/future/job/windows_debug_unit64/)|[![Build Status](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/future/job/windows_release_unit32/badge/icon)](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/future/job/windows_release_unit64/)|[![Build Status](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/future/job/windows_release_unit64/badge/icon)](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/future/job/windows_release_unit64/)|[![Build Status](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/future/job/windows_determinism/badge/icon)](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/future/job/windows_determinism/)|
|**stabilization (1.3)**|[![Build Status](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/stabilization/job/windows_debug_unit32/badge/icon)](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/stabilization/job/windows_debug_unit32/)|[![Build Status](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/stabilization/job/windows_debug_unit64/badge/icon)](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/stabilization/job/windows_debug_unit64/)|[![Build Status](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/stabilization/job/windows_release_unit32/badge/icon)](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/stabilization/job/windows_release_unit64/)|[![Build Status](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/stabilization/job/windows_release_unit64/badge/icon)](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/stabilization/job/windows_release_unit64/)|[![Build Status](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/stabilization/job/windows_determinism/badge/icon)](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/stabilization/job/windows_determinism/)|
|**master (2.0 Preview 3)**|[![Build Status](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/master/job/windows_debug_unit32/badge/icon)](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/master/job/windows_debug_unit32/)|[![Build Status](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/master/job/windows_debug_unit64/badge/icon)](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/master/job/windows_debug_unit64/)|[![Build Status](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/master/job/windows_release_unit32/badge/icon)](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/master/job/windows_release_unit64/)|[![Build Status](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/master/job/windows_release_unit64/badge/icon)](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/master/job/windows_release_unit64/)|[![Build Status](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/master/job/windows_determinism/badge/icon)](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/master/job/windows_determinism/)|

### Linux/Mac - Unit Tests
||Linux|Mac OSX|
|:--:|:--:|:--:|
|**master (1.3)**|[![Build Status](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/master/job/linux_debug/badge/icon)](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/master/job/linux_debug/)|[![Build Status](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/master/job/mac_debug/badge/icon)](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/master/job/mac_debug/)|
|**future (2.0 Preview 2)**|[![Build Status](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/future/job/linux_debug/badge/icon)](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/future/job/linux_debug/)|[![Build Status](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/future/job/mac_debug/badge/icon)](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/future/job/mac_debug/)|
|**stabilization (1.3)**|[![Build Status](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/stabilization/job/linux_debug/badge/icon)](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/stabilization/job/linux_debug/)|[![Build Status](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/stabilization/job/mac_debug/badge/icon)](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/stabilization/job/mac_debug/)|
|**master (2.0 Preview 2)**|[![Build Status](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/master/job/linux_debug/badge/icon)](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/master/job/linux_debug/)|[![Build Status](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/master/job/mac_debug/badge/icon)](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn/job/master/job/mac_debug/)|

[//]: # (End current test results)

Expand Down
1 change: 0 additions & 1 deletion build/BuildNuGets.csx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ var ThirdPartyNoticesPath = Path.Combine(NuGetAdditionalFilesPath, "ThirdPartyNo
var NetCompilersPropsPath = Path.Combine(NuGetAdditionalFilesPath, "Microsoft.Net.Compilers.props");

string[] RedistPackageNames = {
"Microsoft.CodeAnalysis.BuildTask.Portable",
"Microsoft.CodeAnalysis.Common",
"Microsoft.CodeAnalysis.Compilers",
"Microsoft.CodeAnalysis.CSharp.Features",
Expand Down
61 changes: 46 additions & 15 deletions build/MSBuildToolset/build-toolset.ps1
Original file line number Diff line number Diff line change
@@ -1,24 +1,36 @@
# Builds the toolset for use in unix msbuild-coreclr
param (
[string]$NuGetTaskDir = "$PSScriptRoot\..\..\..\NuGet.BuildTasks\src\Microsoft.NuGet.Build.Tasks\bin\Debug"
[string]$NuGetTaskDir,
[string]$RoslynDropDir,
[string]$DotNetPath = "dotnet"
)

function ZipFiles($sourceDir, $zipPath)
{
If (Test-Path $zipPath)
{
Remove-Item $zipPath
}

Add-Type -Assembly System.IO.Compression.FileSystem
[System.IO.Compression.ZipFile]::CreateFromDirectory($sourceDir, $zipPath, [System.IO.Compression.CompressionLevel]::Optimal, $false)
}

$ErrorActionPreference="Stop"

try
{
pushd $PSScriptRoot

dotnet restore
dotnet build
& $DotNetPath restore

$dnxcoreDir = "$PSScriptRoot\bin\Debug\dnxcore50"
$outputRoot = "$PSScriptRoot\bin\Debug\netcoreapp1.0"

foreach ($TargetRuntime in ("ubuntu.14.04-x64","osx.10.10-x64"))
{
dotnet publish -r $TargetRuntime
& $DotNetPath publish -r $TargetRuntime

$publishDir = "$dnxcoreDir\$TargetRuntime\publish"
$publishDir = "$outputRoot\$TargetRuntime\publish"

# Fix up AssignLinkMetadata
# TODO(https://github.com/Microsoft/msbuild/issues/544)
Expand All @@ -35,46 +47,65 @@ try
Copy-Item -Force "$NuGetTaskDir\*" $NuGetExtensionsDir

# Copy the portable targets
write-host "Copy portable targets"
Copy-Item -Force -Recurse (Join-Path ([Environment]::GetFolderPath("ProgramFilesX86")) "MSBuild\Microsoft\Portable") "$extensionsMSDir"

# Copy over the portable build task
# TODO(https://github.com/dotnet/roslyn/issues/9640)
# Copy from a NuGet package instead of a build
foreach ($item in ("Microsoft.Build.Tasks.CodeAnalysis.dll","Microsoft.CSharp.Core.targets","Microsoft.VisualBasic.Core.targets"))
# Copy from a NuGet package instead of a build.
# Overwrite dlls pulled in by the references listed in project.json
# (we want a specific toolset compiler version).
write-host "Copy portable build task"
foreach ($item in (
"CodeAnalysisBuildTask\Microsoft.Build.Tasks.CodeAnalysis.dll",
"CodeAnalysisBuildTask\Microsoft.CSharp.Core.targets",
"CodeAnalysisBuildTask\Microsoft.VisualBasic.Core.targets",
"System.Reflection.Metadata.dll",
"System.Collections.Immutable.dll",
"Microsoft.CodeAnalysis.dll",
"Microsoft.CodeAnalysis.CSharp.dll",
"Microsoft.CodeAnalysis.VisualBasic.dll",
"csccore\csc.exe",
"vbccore\vbc.exe"))
{
Copy-Item (Join-Path $PSScriptRoot\..\..\Binaries\Debug\CodeAnalysisBuildTask $item) $publishDir
Copy-Item (Join-Path $RoslynDropDir "20160525.2" $item) $publishDir
}


# Copy over the reference assemblies
$frameworkRefsDir = "$publishDir\reference-assemblies\Framework"
mkdir -Force "$frameworkRefsDir\.NETFramework"

write-host "Copy .NETFramework/v4.5 reference assemblies"
Copy-Item -Force -Recurse (Join-Path ([Environment]::GetFolderPath("ProgramFilesX86")) "Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5") "$frameworkRefsDir\.NETFramework"

write-host "Copy .NETPortable reference assemblies"
Copy-Item -Force -Recurse (Join-Path ([Environment]::GetFolderPath("ProgramFilesX86")) "Reference Assemblies\Microsoft\Framework\.NETPortable") $frameworkRefsDir

# Bug: https://github.com/Microsoft/msbuild/issues/522
# Reference assembly has a bad name, fixup
pushd "$publishDir\reference-assemblies\Framework\.NETFramework\v4.5"

Move-Item System.XML.dll System.Xml.dll

popd

# TODO(https://github.com/dotnet/roslyn/issues/9641)
# Portable CSharp targets have ref with wrong case
write-host "Copy portable targets files"
foreach ($version in ("v4.5","v5.0"))
{
$file = "$extensionsMSDir\Portable\$version\Microsoft.Portable.CSharp.targets"
(Get-Content $file) | %{ $_ -replace 'Microsoft.CSharp.Targets','Microsoft.CSharp.targets' } | Out-File $file
}


# Copy the helper scripts for csc/vbc
write-host "Copy helper scripts for csc"
Copy-Item -Force "$PSScriptRoot\..\..\src\Compilers\CSharp\CscCore\csc" $publishDir

write-host "Copy helper scripts for vbc"
Copy-Item -Force "$PSScriptRoot\..\..\src\Compilers\VisualBasic\VbcCore\vbc" $publishDir

Move-Item $publishDir
$toolsetPackageZip = (Join-Path $outputRoot "$TargetRuntime.zip")
Write-Host "Zipping $publishDir to $toolsetPackageZip"
ZipFiles $publishDir $toolsetPackageZip
}

popd
Expand Down
26 changes: 10 additions & 16 deletions build/MSBuildToolset/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,23 @@
},

"dependencies": {
"Microsoft.Build.Framework": "0.1.0-preview-00017",
"Microsoft.Build.Tasks.Core": "0.1.0-preview-00017",
"Microsoft.Build.Utilities.Core": "0.1.0-preview-00017",
"Microsoft.Build.Targets": "0.1.0-preview-00017",
"Microsoft.Build": "0.1.0-preview-00017",
"Microsoft.Net.Compilers.netcore": "1.2.0-beta1-20160202-02",
"Microsoft.Net.Compilers.Targets.netcore": "0.1.4-dev",
"Microsoft.NETCore.Platforms": "1.0.1-rc2-23811",
"Microsoft.NETCore.TestHost": "1.0.0-rc2-23811",
"NETStandard.Library": "1.0.0-rc2-23811",
"MSBuild": "0.1.0-preview-00017",
"System.Security.Cryptography.X509Certificates": "4.0.0-rc2-23811",
"System.Diagnostics.Process": "4.1.0-rc2-23811",
"Microsoft.Build.Framework": "0.1.0-preview-00023-160527",
"Microsoft.Build.Tasks.Core": "0.1.0-preview-00023-160527",
"Microsoft.Build.Utilities.Core": "0.1.0-preview-00023-160527",
"Microsoft.Build.Targets": "0.1.0-preview-00023-160527",
"Microsoft.Build": "0.1.0-preview-00023-160527",
"MSBuild": "0.1.0-preview-00023-160527",
"Microsoft.NETCore.TestHost": "1.0.0-rc3-24128-00",
"Microsoft.NETCore.App": "1.0.0-rc3-004338",
"Newtonsoft.Json": "7.0.1"
},

"frameworks": {
"dnxcore50": {
"imports": "portable-net452"
"NETCoreApp1.0": {
"imports": ["portable-net452", "dotnet"]
}
},
"runtimes": {
"win7-x64": { },
"ubuntu.14.04-x64": { },
"osx.10.10-x64": { }
}
Expand Down
2 changes: 1 addition & 1 deletion build/Targets/VSL.Imports.targets
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
'$(TargetFrameworkVersion)' == 'v5.0'">
<!-- Treat portable exes as CoreClr-targeting-exes -->
<PropertyGroup Condition="'$(OutputType)' == 'Exe'">
<NuGetTargetMoniker>DNXCore,Version=v5.0</NuGetTargetMoniker>
<NuGetTargetMoniker>.NETCoreApp,Version=v1.0</NuGetTargetMoniker>
<BaseNuGetRuntimeIdentifier Condition="'$(OS)' == 'Windows_NT'">win7</BaseNuGetRuntimeIdentifier>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion build/scripts/crossgen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ if [ -z "$RID" ]; then
fi

# Replace with a robust method for finding the right crossgen.exe
CROSSGEN_UTIL=~/.nuget/packages/runtime.$RID.Microsoft.NETCore.Runtime.CoreCLR/1.0.2-rc3-24102-00/tools/crossgen
CROSSGEN_UTIL=~/.nuget/packages/runtime.$RID.Microsoft.NETCore.Runtime.CoreCLR/1.0.2-rc3-24128-00/tools/crossgen

cd $BIN_DIR

Expand Down
11 changes: 11 additions & 0 deletions build/scripts/unzip.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash

# Unzip reports a warning that zip contains backslashes and returns exit code 1
# even though everything is good. Ignore exit code 1.

unzip -nq $1 -d $2
EC=$?
if [ $EC -eq 1 ]
then exit 0
else exit $EC
fi
13 changes: 9 additions & 4 deletions docs/infrastructure/unix-toolset.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,13 @@ To build the toolset do the following:
- If necessary, make modifications to the dependencies in the
`build/MSBuildToolset/project.json` file to bring in anything new.
- Run the `build/MSBuildToolset/build-toolset.ps1` file.
- In the `build/MSBuildToolset/bin/Debug/dnxcore50` directory:
- Rename and bzip the `osx.10.10-x64/publish` directory as roslyn.mac.`<version number>`
- Rename and bzip the `ubuntu.14.04-x65/publish` directory as roslyn.linux.`<version number>`
- Upload the file to the Azure in the dotnetci storage account in the roslyn container.
- The script produces two zip files in bin\Debug\netcoreapp1.0 subdirectory:
- Rename `osx.10.10-x64.zip` to roslyn.mac.`<version number>.zip`
- Rename `ubuntu.14.04-x64.zip` to roslyn.linux.`<version number>.zip`
- Upload the files to the Azure in the dotnetci storage account in the roslyn container:

```
azcopy /Pattern:*.zip /Source:build\MSBuildToolset\bin\Debug\netcoreapp1.0 /Dest:https://dotnetci.blob.core.windows.net/roslyn /DestKey:<<key>>
```

- Send a PR to change [Makefile](https://github.com/dotnet/roslyn/blob/master/Makefile) to use the new toolset.
4 changes: 2 additions & 2 deletions netci.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ commitPullList.each { isPr ->
}

def triggerPhraseOnly = false
def triggerPhraseExtra = ""
def triggerPhraseExtra = "linux"
Utilities.setMachineAffinity(myJob, 'Ubuntu14.04', 'latest-or-auto')
Utilities.addXUnitDotNETResults(myJob, '**/xUnitResults/*.xml')
addRoslynJob(myJob, jobName, branchName, isPr, triggerPhraseExtra, triggerPhraseOnly)
Expand All @@ -139,7 +139,7 @@ commitPullList.each { isPr ->
}

def triggerPhraseOnly = true
def triggerPhraseExtra = ""
def triggerPhraseExtra = "mac"
Utilities.addXUnitDotNETResults(myJob, '**/xUnitResults/*.xml')
addRoslynJob(myJob, jobName, branchName, isPr, triggerPhraseExtra, triggerPhraseOnly)
}
Expand Down
Binary file modified nuget.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion src/Compilers/CSharp/CscCore/project.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"dependencies": { },
"frameworks": {
"dnxcore50": {
"NETCoreApp1.0": {
"imports": "portable-net452"
}
},
Expand Down
12 changes: 11 additions & 1 deletion src/Compilers/CSharp/Portable/Binder/Binder_Conversions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,17 @@ private bool MemberGroupFinalValidationAccessibilityChecks(BoundExpression recei
else if (memberSymbol.IsStatic)
{
Debug.Assert(!invokedAsExtensionMethod || (receiverOpt != null));
if (!invokedAsExtensionMethod && !WasImplicitReceiver(receiverOpt) && IsMemberAccessedThroughVariableOrValue(receiverOpt))

if (invokedAsExtensionMethod)
{
if (receiverOpt?.Kind == BoundKind.QueryClause && IsMemberAccessedThroughType(receiverOpt))
{
// Could not find an implementation of the query pattern for source type '{0}'. '{1}' not found.
diagnostics.Add(ErrorCode.ERR_QueryNoProvider, node.Location, receiverOpt.Type, memberSymbol.Name);
return true;
}
}
else if (!WasImplicitReceiver(receiverOpt) && IsMemberAccessedThroughVariableOrValue(receiverOpt))
{
if (this.Flags.Includes(BinderFlags.CollectionInitializerAddMethod))
{
Expand Down
Loading

0 comments on commit 55e9268

Please sign in to comment.