daveaglick / Scripty

Tools to let you use Roslyn-powered C# scripts for code generation
MIT License
621 stars 69 forks source link

No intellisense #110

Closed marcusien closed 7 years ago

marcusien commented 7 years ago

Hi there,

I try to use Scripty in replacement of my T4 scripts. Everything works fine but... I just can't have any intellisense related to Scripty/Roslyn code on my csx file. As I don't know everything's posible with these APIs, It's hard to write real world code.

For instance, I can't get any intellisense on "Output".

Any way to solve this problem ? I tried on VS2015 and VS2017

Thank you

TylerBrinkley commented 7 years ago

I always delegate my logic to a separate library. That way I get intellisense there and only have to #r that one dll. Then I just have to know how to use Output.

marcusien commented 7 years ago

Yes, after your answer that's what I did. It's quite logical but I'm still asking myself why Dave said that Visual Studio handle intellisense on csx while it's not the case.

Thank you ;)

TylerBrinkley commented 7 years ago

To be fair the csx does handle intellisense on the BCL types but not for anything else.

daveaglick commented 7 years ago

Dave says a lot of crazy things 😀

In this case, @TylerBrinkley is correct - VS will provide Intellisense in script files, but only for "preloaded" BCL types. It doesn't process directives like #r yet (an issue for that is here) and it certainly doesn't support script globals injected into the host like Scripty does.