全部,
我是ASP.NET编程的新手,我正在尝试做一些示例来开始。我在Xamarin 4.0.8(build 2)中这样做。当我尝试打开Default.aspx
文件(在创建项目时生成),我遇到以下异常警告:
System.Exception: System.Web assembly name not found for framework .NETFramework,Version=v4.5
at MonoDevelop.AspNet.WebTypeContext.GetSystemWebDom(TargetRuntime runtime, TargetFramework targetFramework)
at MonoDevelop.AspNet.WebTypeContext.GetSystemWebDom(AspNetAppProject project)
at MonoDevelop.AspNet.WebTypeContext..ctor(AspNetAppProject project)
at MonoDevelop.AspNet.Parser.DocumentReferenceManager..ctor(AspNetAppProject project)
at MonoDevelop.AspNet.Gui.AspNetEditorExtension.OnParsedDocumentUpdated()
at MonoDevelop.XmlEditor.Gui.BaseXmlEditorExtension.<Initialize>b__0(Object , EventArgs )
at System.EventHandler.Invoke(Object sender, EventArgs e)
at MonoDevelop.Ide.Gui.Document.OnDocumentParsed(EventArgs e)
at MonoDevelop.Ide.Gui.Document.<>c__DisplayClass1c.<>c__DisplayClass1e <>c__DisplayClass20.<StartReparseThread>b__1b(Object , EventArgs )
at Gtk.Application.InvokeCB.Invoke()
at GLib.Timeout.TimeoutProxy.Handler()
此外,我稍后会收到此例外:
System.NullReferenceException: Object reference not set to an instance of an object.
at MonoDevelop.AspNet.Gui.AspNetEditorExtension.OnParsedDocumentUpdated()
at MonoDevelop.XmlEditor.Gui.BaseXmlEditorExtension.<Initialize>b__0(Object , EventArgs )
at System.EventHandler.Invoke(Object sender, EventArgs e)
at MonoDevelop.Ide.Gui.Document.OnDocumentParsed(EventArgs e)
at MonoDevelop.Ide.Gui.Document.<>c__DisplayClass1c.<>c__DisplayClass1e.<>c__DisplayClass20.<StartReparseThread>b__1b(Object , EventArgs )
at Gtk.Application.InvokeCB.Invoke()
at GLib.Timeout.TimeoutProxy.Handler()
最终它达到IDE必须关闭的程度。
我尝试将目标框架从Mono / .NET 4.0切换到Mono / .NET 4.5无济于事。
好像它没有找到System.Web库。我怎么指出它?
答案 0 :(得分:0)
错误是错误的,至少在Windows机器上是这样。您需要启用.NET framework 2.0和3.0才能摆脱此错误。此外,如果您需要保持.aspx和designer.aspx.cs在控件上保持同步。