Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple runtimes (.NET Framework and .NET Core) in Interactive Window #4788

Closed
ManishJayaswal opened this issue Aug 25, 2015 · 2 comments · Fixed by #45046
Closed

Comments

@ManishJayaswal
Copy link
Contributor

We need to distinguish between environment definition (32bit vs 64bit, Desktop/CoreCLR, which version of CoreCLR, etc.) and initialization script.

I propose following:

  1. #reset noinit
    Resets to the most recently used environment without running initialization script (using “noinit” instead of “noconfig” since it’s a better name).
  2. #reset
    Resets to the most recently used environment and runs the default initialization script (if any).
  3. #reset noinit “environment”
    Resets to the specified environment without running initialization script.
  4. #reset “environment”
    Resets to the specified environment and runs the default initialization script.

The #reset command prints out info about the environment being loaded.

Environment is a file name or a path. If an extension isn’t specified we append extension “.json”. If the path is relative we search in some predefined folder in user home directory and then in the installation directory in the interactive host.
The .json file will describe the environment in JSON format. I think we should move away from .rsp file for REPL initialization since it’s not flexible enough.

dnx32.json
{
  "host": 
  { 
    "package": "DNX.4.0.0-beta-23109"
    "platform": "x86"
    "loader": "dnx.exe"
  }
}

clr64.json
{
  "host": "InteractiveHost64.exe"
}

default.json
{
  "host": "InteractiveHost32.exe"
}

An optional initialization script is of the same name but with .csx/.vbx extension. For example:

dnx32.csx:

#loaddnx_common.csx

dnx64.csx

#loaddnx_common.csx

dnx_common.csx:

#r “System.Runtime”
#r “System.Threading.Tasks”
...

Sample session:

> #reset default
Loading CLR (32bit), initializing withdefault.csx. 

> #reset
Loading CLR (32bit), initializing withclr32.csx.

> #reset noinit
Loading CLR (32bit).

> #reset dnx32
Loading DNX v4.0.0-beta-23109 (32bit), initializing with “dnx32.csx.

> #resetC:\MyEnvironment.json” noinit
Loading DNX v5.0.0-custom-build-foo (64bit).

> #reset
Loading DNX v5.0.0-custom-build-foo (64bit), initializing with “C:\MyEnvironment.csx.
@tmat
Copy link
Member

tmat commented Nov 1, 2015

Consider reading environment init scripts and config from user home dir.

@tmat tmat modified the milestones: 2.1, 2.0 (RC) Oct 5, 2016
@tmat tmat changed the title Write specialized reset command for C# and VB interactive Write specialized reset command for C# and VB interactive, support multiple runtimes Dec 16, 2016
@tmat tmat modified the milestones: 15.6, 15.1 May 22, 2017
@tmat tmat modified the milestones: 15.5, 15.7 Oct 9, 2017
@jinujoseph jinujoseph added this to the Unknown milestone Jul 23, 2018
@tmat tmat changed the title Write specialized reset command for C# and VB interactive, support multiple runtimes Support multiple runtimes (.NET Framework and .NET Core) in Interactive Window Dec 18, 2019
@tmat
Copy link
Member

tmat commented Jun 12, 2020

We are gonna use the Core CLR that are found using VS process environment variables.

@tmat tmat modified the milestones: Backlog, 16.8, 16.8.P1 Jun 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants