Version Used:
Visual Studio 15.5
Steps to Reproduce:
I have a netstandard2.0
library and a net47
project referencing that library
// netstandard2.0 target framework, Microsoft.NET.Sdk
public interface IFoo { void Foo(); }
// net47 target framework, Microsoft.NET.Sdk.Web
interface IBar { void Bar(); }
class FooBar : IFoo, IBar
{
public void Foo() { }
public void Bar() { }
}
Now run Find All References on both Foo
and Bar
methods (or look at CodeLense)
Expected Behavior:
Both Foo()
and Bar()
should show references back and forth.
Actual Behavior:
Only Bar()
from within the net47
project itself has a reference:
When I change the netstandard2.0
library to net47
, the reference for Foo()
shows up as expected
Seems to be a recurrence of #16827
If you open that attached ClassLibrary4.zip and change ClassLibrary4's Target framework to .NET Standard 2.0
, the references go to 0.
@mrmoses Update to at least Visual Studio 15.7.1. Seems to be working fine now.
I'm running VS 15.7.2 and cannot confirm a complete fix for my project.
When I run Find All References on the interface method (equivalent of Foo()
), all the implementations in both the netstandard2.0 library and the net47 application correctly show up.
However, CodeLense still doesn't reflect this. I can see the correct count and dropdown contents when clicking on the interface's reference count, but for the method, both the count and the dropdown are still wrong.
I don't know if this is still a Roslyn issue, though. So feel free to close.
Roslyn does power all of these -- this is the right place to file this.
Still occurring in VS 15.8.5. Not even sure how to figure out what version of roslyn it uses
VS 15.9.3 Still not working. Hope you can fix it soon, because it get annoying pretty fast. It leads to drop in performance due to manually searching for implementation.
I'm on VS 15.9.2 now and it seems like it has been working for me lately.
I cannot confirm that. Just today, I tried to "Go To Implementation". It works for the interface, but doesn't find anything for its methods.
I just updated to 15.9.3 today and Go to Implementation is not working properly for me. It's possible that my previous comment was wrong and it was only working in some cases.
I'm noticing that it's not working in a particular instance where the object I'm trying to Go to is declared in a separate partial class.
The scenarios that this will or won't reproduce in are pretty tricky, and depends exactly on what types of projects you have in your solution and what's referencing what. In any case, we didn't make any fixes here in 15.9, so if you're seeing something different, that's not something we'd expect to see.
I get this problem too on 15.9.2 and earlier. very annoying!
The problem is still there in version 15.9.5. My situation is a little different though. My interface is in the .NET Standard 2.0 class library project, and the implementation is in .NET Core 2.1 project. The .NET Core project has reference to the class library. I can't do a "go to implementation" from any usage of the method in the interface, nor can I do that directly from the interface itself. Very annoying indeed!
My codes are very simple 1 service implements one interface and using version 15.9.6 and have the same error: "The simple has no implementations"
@jdang67 can you provide a repro project?
@CyrusNajmabadi I have created a test repro repo. Take a look here.
I have the same issue. Updated to latest VS...
I have this issue too.
15.9.6 - The symbol has no implementations.
Important part: finding reference for a method does not work, but finding a reference for the interface works.
Related to #28827
Fixed with https://github.com/dotnet/roslyn/commit/a4672177f881a492f83de12b5572c6f6cc00186a , will be in 16.1 release
Most helpful comment
Fixed with https://github.com/dotnet/roslyn/commit/a4672177f881a492f83de12b5572c6f6cc00186a , will be in 16.1 release