0

我被请来帮助处理现有的 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 配置为忽略所有更改?

4

0 回答 0