0
System.TypeLoadException:无法从程序集“System.Web,Version = 2.0.0.0,Culture”中加载类型“System.Web.HttpContext” =中立,PublicKeyToken = b03f5f7f11d50a3a'。无法从程序集“System.Web”加载类型“System.Web.HttpContext”
using System;
using System.Collections;
using System.Collections.Generic;
using System.Web;
using System.Xml.Linq;
public class Example :
{
XDocument doc = XDocument.Load(System.Web.HttpContext.Current.Server.MapPath("~/example.xml"));
}
你有没有参考system.web? – 2011-02-07 18:43:49
看看InnerException。 – 2011-02-07 18:44:40