LINQPad script directory? -


Do anyone know if the directory is to hold the path where the LINQPad script file (.linq) resides?

Or for the same thing on the script itself.

Note that I'm not talking about the location of the "My Queries" folder, which is shown inside LINQPad.

P> I can save a .linq file anywhere on the disk, and open it by clicking twice. For example, if I save the file to C: \ Temp \ Test.linq , and execute the program, I would either type in C: \ Temp or C: \ Temp \ Test.linq .

would

actually send me Environment.CurrentDirectory or Assembly.GetEntryAssembly (). Like the location , just for the .linq file.

I've tried things:

  • Looking through the environmental variable
  • Looking through the LINQPad assembly given to my script
  • Throw an exception and see Stacktrace (temporarily linking it
  • environment .complete dump (); - LINQPad gives executable
  • Environment.CurrentDirectory.Dump ( - returns C: \ windows \ system32
  • assembly.GetExecutingAssembly (). Location.Dump ( ); - Returns the temp directory

< V class = "post-text" itemprop = "text">

I just added a feature to focus on this. You can download it now and test it.

To get the folder, use the following expression:

  path.gate directoryname (util.kantwankcut path)  

Comments