dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.27k stars 4.73k forks source link

Can`t add reference to System.XML #18469

Closed jokerosky closed 4 years ago

jokerosky commented 8 years ago

I`ve created new solution for .net core (asp.net + class library) i need to add reference to System.XML but it fails with error, same time references to other libraries works well (for example System.Xml.Linq). I checked it on 3 different computers and got this error.

image

benaadams commented 8 years ago

You need to either use the full framework System.Xml and add to frameworkAssemblies e.g.

"net452": {
  "frameworkAssemblies": {
    "System.Xml": {}
  }
}

Or to use the corefx you need to add the specific component you require as there is no System.XML and its is more modular. See: System.Xml packages on nuget

So for example if you want to use XmlDocument add a reference to System.Xml.XmlDocument 4.0.1

jokerosky commented 8 years ago

oh, @benaadams i found out what is wrong. I have added this direct links to framework assemblies, but it have not worked, because of case sensitive name. The problem is in Visual Studio 2015, which adds System.XML instead of System.Xml. so it is not dotnet issue.

Can someone from MS team add this issue for VS guys and close this topic?

image

karelz commented 8 years ago

@terrajobst any idea how/where in VS to route it?

tarekgh commented 7 years ago

Issue moved to dotnet/sdk dotnet/runtime#14244 via ZenHub