我被带去帮助在现有的ASP.NET应用程序上工作。我正在使用Visual Studio Community在Mac上进行开发。我已经完成所有工作,但是每次更改单个文件(甚至是HTML文件)时,Web服务器都将关闭,并且我必须从Visual Studio重新构建并再次运行它。编辑HTML文件不应关闭服务器。
我尝试直接从命令行运行xsp4,但得到的输出更加详细。
$ xsp4 --port 8080
xsp4
Listening on address: 0.0.0.0
Root directory: /Users/admin/Documents/projects/xxx
Listening on port: 8080 (non-secure)
Hit Return to stop the server.
Change: XXX.Sdk.dll
Change: XXX.Sdk.dll
Handling exception type AppDomainUnloadedException
Message is Attempted to access an unloaded AppDomain.
IsTerminating is set to True
Attempted to access an unloaded AppDomain.
Server stack trace:
Exception rethrown at [0]:
at (wrapper xdomain-invoke) Mono.WebServer.XSP.Server.DebugMain(string[],bool,Mono.WebServer.IApplicationHost,bool)
at (wrapper remoting-invoke-with-check) Mono.WebServer.XSP.Server.DebugMain(string[],bool,Mono.WebServer.IApplicationHost,bool)
at Mono.WebServer.XSP.Server.DebugMain (System.String[] args, System.Boolean root, Mono.WebServer.IApplicationHost ext_apphost, System.Boolean quiet) [0x00252] in <645a23067666447e988a50155fe857f4>:0
at Mono.WebServer.XSP.Server.DebugMain (System.String[] args) [0x00032] in <645a23067666447e988a50155fe857f4>:0
at Mono.WebServer.XSP.Server.Main (System.String[] args) [0x00001] in <645a23067666447e988a50155fe857f4>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.AppDomainUnloadedException: Attempted to access an unloaded AppDomain.
您可以看到它认为XXX.Sdk.dll
已更改并导致其关闭。我不确定为什么会认为文件已更改,因为我所做的只是编辑与该dll不相关的HTML文件。
是否可以将xsp4配置为忽略所有更改?