Question

Quesiton is relative to References in Roslyn .rsp files

Did install the Roslyn, playing with: C:\Users\name\Documents\Microsoft Codename Roslyn CTP - October 2011\CSharp\WpfSeedRepl Walkthrough: http://msdn.microsoft.com/ru-ru/hh543924.

I'm unable to load current DLL and csx:

> #r "wpfseed.exe"
(1,1): error CS0006: Metadata file 'wpfseed.exe' could not be found

> #load "setup.csx"
Specified file not found.
Searched in directory:
  C:\Users\name
> 

On other hand:

> Console.WriteLine(Environment.CurrentDirectory);
C:\Users\name\Documents\Microsoft Codename Roslyn CTP - October 2011\CSharp\WpfSeedRepl

Is there any workaround to not to specify the project folder?

Was it helpful?

Solution

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!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top