vendredi 14 août 2015

asp.net vnext and XDocument

I'm having a problem with the latest beta-version of .net and the Xdocument library.

My project.json looks like this:

 "dependencies": {
    "Microsoft.AspNet.Mvc": "6.0.0-beta4",
    "Microsoft.AspNet.Server.IIS": "1.0.0-beta4",
    "Microsoft.AspNet.Server.WebListener": "1.0.0-beta4",
    "Microsoft.AspNet.StaticFiles": "1.0.0-beta4",
    "System.Xml.XDocument": "4.0.10-beta-23109"
  },

  "commands": {
    "web": "Microsoft.AspNet.Hosting --config hosting.ini"
  },

  "frameworks": {
    "dnx451": { }   
  },

And my code like this:

var xd = XDocument.Parse(str);

But I receive the error-message:

Severity    Code    Description Project File    Line
Error   CS0433  The type 'XDocument' exists in both 'System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' and 'System.Xml.XDocument, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' WebApplication2.DNX 4.5.1   ValuesController.cs 23

Simply trying to solve it with using System.Xml.Linq.XDocument xd = or System.Xml.XDocument xd = does not seem to be working, what else could I try?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire