简体   繁体   English

使用XSP4在Monodevelop中调试ASP.NET MVC应用

[英]Debugging ASP.NET MVC apps in Monodevelop with XSP4

I see from around the web that this question has been asked before elsewhere but I haven't found anything that fixes this problem in my case. 我从网上看到,这个问题曾在其他地方被问过,但在我的情况下,没有发现任何可解决此问题的东西。

When I try to debug an ASP.NET MVC App from MonoDevelop 4.2.3 on Ubuntu, it fails with the error message 当我尝试从Ubuntu上的MonoDevelop 4.2.3调试ASP.NET MVC应用程序时,它失败并显示错误消息

Could not launch ASP.NET web server.The xsp4 web server could not be found. 无法启动ASP.NET Web服务器。找不到xsp4 Web服务器。 Please ensure that it is installed. 请确保已安装。

I have xsp4 installed already. 我已经安装了xsp4。

It was working previously, but went awry when I upgraded my Mono version to 3.2.1. 它以前可以运行,但是当我将Mono版本升级到3.2.1时出现了问题。 In order to try to fix it, I have tried checking out, building, and installing the xsp source code from git. 为了尝试修复它,我尝试从git中签出,构建和安装xsp源代码。

Now, if I run: 现在,如果我运行:

xsp4 --version

It shows xsp4 version 3.0.0.0 is installed, and I can start it from the command line. 它显示xsp4版本3.0.0.0已安装,并且我可以从命令行启动它。 MonoDevelop is still complaining though. MonoDevelop仍在抱怨。 If I do a which xsp4, it points to a script file containing this: 如果我执行哪个xsp4,它指向包含以下内容的脚本文件:

exec /usr/bin/mono $MONO_OPTIONS "/usr/local/lib/mono/4.5/xsp4.exe" "$@"

Which looks pretty good to me. 对我来说看起来不错。

Does anyone know how I can get this to work in MonoDevelop? 有谁知道我如何在MonoDevelop中使用它? Or perhaps a way to configure MonoDevelop to debug through another web server? 还是一种将MonoDevelop配置为通过其他Web服务器进行调试的方法?

I managed to get this working by copying the xsp4.exe and Mono.WebServer2.dll files to my application bin folder. 通过将xsp4.exe和Mono.WebServer2.dll文件复制到我的应用程序bin文件夹中,我设法使它正常工作。 I guess MonoDevelop probes the application bin folder as one of the potential locations for the web server executables. 我猜想MonoDevelop会将应用程序bin文件夹作为Web服务器可执行文件的潜在位置之一进行探测。 This works- the server starts as expected and the debugger attaches properly. 这可以正常工作-服务器按预期方式启动,调试器正确连接。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM