Bug 58965 - csi fails with "type Object is defined in an assembly that is not referenced"
Summary: csi fails with "type Object is defined in an assembly that is not referenced"
Status: RESOLVED FIXED
Alias: None
Product: Class Libraries
Classification: Mono
Component: General (show other bugs)
Version: master
Hardware: PC Mac OS
: --- normal
Target Milestone: Future Release
Assignee: Alexander Köplinger [MSFT]
URL:
: 60141 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-08-23 01:00 UTC by Alexander Köplinger [MSFT]
Modified: 2017-11-06 23:02 UTC (History)
4 users (show)

See Also:
Tags: bugpool-archive
Is this bug a regression?: ---
Last known good build:


Attachments

Description Alexander Köplinger [MSFT] 2017-08-23 01:00:18 UTC
We recently added the C# Interactive REPL from roslyn. However, it doesn't actually work for anything that's not completely trivial:

    $ csi
    Microsoft (R) Visual C# Interactive Compiler version 2.3.1.61919
    Copyright (C) Microsoft Corporation. All rights reserved.
    
    Type "#help" for more information.
    >
    > 1+1
    2
    >
    > Console.WriteLine("test")
    (1,1): error CS0012: The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.20.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Comment 1 Alexander Köplinger [MSFT] 2017-08-23 01:00:45 UTC
$ mono --version
Mono JIT compiler version 5.6.0.43 (2017-08/e3a2754a33b Tue Aug 22 13:20:37 EDT 2017)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           normal
	SIGSEGV:       altstack
	Notification:  kqueue
	Architecture:  amd64
	Disabled:      none
	Misc:          softdebug
	LLVM:          yes(3.6.0svn-mono-master/8b1520c8aae)
	GC:            sgen (concurrent by default)
alexander:~/dev/mono/mcs/class/System/Mono.Btls$
Comment 2 Marek Safar 2017-09-21 15:03:53 UTC
This looks like some Roslyn issue which I could not track down yet because adding any System.Runtime.dll to the folder with csi.exe makes it work
Comment 3 Alexander Köplinger [MSFT] 2017-10-09 15:34:50 UTC
https://github.com/mono/mono/pull/5737. I'll see if I can come up with a test case for the Roslyn folks
Comment 4 Alexander Köplinger [MSFT] 2017-10-10 12:44:23 UTC
PR was merged
Comment 5 Marek Safar 2017-10-12 09:53:15 UTC
*** Bug 60141 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.