dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
19.01k stars 4.03k forks source link

Go to definition from .xaml to xaml.cs does not work and vice versa #35484

Open maxinfet opened 6 years ago

maxinfet commented 6 years ago

When attempting to go definition from a .xaml file to a .xaml.cs using the new project system I get the following error.

image

Also when going from the .cs to the .xaml.cs it takes me to the .g.i.cs.

Is there a work around that I can put in place to make it properly go to definition? Also can anyone point me to what code controls going to definition? I have been searching around for how you would implement custom go to definition logic and haven't found how I would do this.

Pilchie commented 6 years ago

For invocations starting from .cs, take a look here

Not sure if the code for starting in Xaml is OSS. @mgoertz would probably know if it is.

maxinfet commented 6 years ago

@Pilchie Thank you for the information on where to find that in roslyn

davidwengier commented 5 years ago

Update: Go to Definition from .xaml is now working and navigates to .xaml.cs correctly.

Going from .xaml.cs in an SDK project still brings up the .g.cs file.

davidwengier commented 5 years ago

FYI @jinujoseph

It would be good if this could be prioritised for 16.2 as the most of the WPF support for SDK projects is coming in 16.1