Is there a way to setup a working directory for “r and ”load commands

て烟熏妆下的殇ゞ 提交于 2019-12-06 05:57:54

Disclaimer: I work at Microsoft on the Roslyn team.

There is not currently a way to change the search path from within the Interactive window. However, we're considering adding a command to do so in the future. For now, the paths are rooted at your user directory ("C:\Users\name" above), and you can use relative paths from that directory. Additionally, you can use paths relative to the process current directory with a ".\", and you can change that with Environment.CurrentDirectory = "<your path>".

For example:

Environment.CurrentDirectory = @"C:\Users\name\Documents\Microsoft Codename Roslyn CTP - October 2011\CSharp\WpfSeedRepl";
#r ".\wpfseed.exe"
#load ".\setup.csx"

Hope this helps!

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!