Roslyn: Unable to issue a `using System.Xml;`

Created on 27 Apr 2016  路  2Comments  路  Source: dotnet/roslyn

Version Used:
Visual Studio Enterprise 2015 Update 2

Steps to Reproduce:

  1. Open C# Interactive
  2. Type in using System.Xml;
  3. Press [Enter]

Expected Behavior:
The namespace would be imported

Actual Behavior:
Error:

``` C#

using System.Xml;
(1,14): error CS0234: The type or namespace name 'Xml' does not exist in the namespace 'System' (are you missing an assembly reference?)
```

Resolution-By Design

Most helpful comment

Assembly System.Xml isn't included by default, so you must add the reference yourself:

``` C#

r "System.Xml"

```

BTW, you can see the default refs and imports if you open C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\PrivateAssemblies\CSharpInteractive.rsp

All 2 comments

Assembly System.Xml isn't included by default, so you must add the reference yourself:

``` C#

r "System.Xml"

```

BTW, you can see the default refs and imports if you open C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\PrivateAssemblies\CSharpInteractive.rsp

Thank you ever so much :)

Was this page helpful?
0 / 5 - 0 ratings