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
18.92k stars 4.02k forks source link

importing namespace using "using" statement in immediate window like c# interactive window. #28966

Open ghost opened 6 years ago

ghost commented 6 years ago

Last month every time I add the namespace the debugging got hailed, I have mentioned it in this issue. https://github.com/dotnet/roslyn/issues/27976

This time I am looking for adding the namespace in Immediate Window. I can call the class by typing everything by hand (but using statement is not supported in the immediate window like C# interactive).

but I need to do that again and again, to a run every single statement. I can't add the namespace in code file at debugging time, changes make debugging stop the same moment.

Like C# Interactive, Is it possible to get that functionality in the immediate window. Like you can add the namespace in immediate window and you don't need to type again in immediate window (only).

This will be helpful to #27976 the developer will write the code in the immediate window to test the functionality and he will take his changes back into code once he/she done with debugging.


current workaround : (what I am doing now is copy the little value from debugging session into the c# interactive so I can call the method from .net framework)

sharwell commented 6 years ago

cc @tmat

tmat commented 6 years ago

@jinujoseph FYI

AAATechGuy commented 3 years ago

there are extensions which cannot be used simply by long namespaces. For e.g., using Linq extensions in Immediate Window.