Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automatically Loading .csx in Roslyn

Is it possible to tell Visual Studio or Roslyn to execute a specific code script every time I reset the C# Interactive Window from my Project?

For example - I have a form with a Plotter that displays most of the data I am hacking around with. I would like for the Plot to be automatically loaded, and a variable created for it every time I reset the C# Interactive Window from my Project. So, it would need to run the following code every time it resets:

var form = Utilities.InitForm();

I can put this into a .csx file and then invoke the 'load' command in the Interactive Window, but I would like to happen automatically if possible.

Is there any way to do this currently in Roslyn CTP?

Thanks,

Giawa

like image 545
Giawa Avatar asked Jun 19 '26 12:06

Giawa


1 Answers

You can edit the InteractiveHost.rsp file under the VS extension directory to get it loaded.

like image 200
Kevin Pilch Avatar answered Jun 21 '26 00:06

Kevin Pilch



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!