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
Could not launch ASP.NET web server.The xsp4 web server could not be found. Please ensure that it is installed.
I have xsp4 installed already.
It was working previously, but went awry when I upgraded my Mono version to 3.2.1. In order to try to fix it, I have tried checking out, building, and installing the xsp source code from git.
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. MonoDevelop is still complaining though. If I do a which xsp4, it points to a script file containing this:
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? Or perhaps a way to configure MonoDevelop to debug through another web server?
I managed to get this working by copying the xsp4.exe and Mono.WebServer2.dll files to my application bin folder. I guess MonoDevelop probes the application bin folder as one of the potential locations for the web server executables. This works- the server starts as expected and the debugger attaches properly.
Related
I discovered the joy of publishing instead of using an installer package (which I do use for my older VS2015 solutions targeting .Net Framework).
Using all defaults, I was able to publish my application to a folder, then copied all 34 files/folders to the permanent home of this app. I chose a folder in the C: root. This all works fine, and when I call this new application from my MS Access application, it works perfectly.
Now the problem occurs when I deploy the program to my user's PC. I do this by copying the entire folder off the C:\ folder to his C:\ folder.
When we run the MSAccess app, which runs the new console app by using the Shell command, the console app does not run. No error is generated, and I do not know if the Shell command is returning a helpful response code or not.
I believe the issue is that customer does NOT have .Net Core 3.1 installed. When I was publishing a platform-specific version and choosing .Net Core 3.1, the application was expecting that framework to be already installed on the user's PC (which it's not).
I read this article about deploying self-contained applications.
https://learn.microsoft.com/en-us/dotnet/core/deploying/deploy-with-vs?tabs=vs157
When I followed the instructions to publish a self-contained application, I ended up with 12 or 14 items only, none of which was the EXE for my program. There IS an apphost.exe with the same size as the program exe the old publish method used to create.
What am I doing wrong? Thanks...
Update:
I figured out how to publish the application, using the self-contained option. This created a much larger deployment, as expected. After copying this to customer's PC, it still didn't work. When I tried running it via a command window, it mentioned missing DLLs. Sorry, couldn't save DLL names. Now I wonder if it's best to go back to publishing a platform-dependent version, then have .Net Core 3.1 installed on customer's PC before retrying the application?? Thanks...
Turns out installing the .Net Core 3.1 runtimes on customer's PC, then publishing the platform-dependent version of my app works fine. Much smaller to deploy, and all the required files are all there when needed.
Thanks for the comments...
I've developed app in VS2015 which needs to run on target computers that have Windows XP, NET 3.5. The release and debug versions of the application work without any problems on those computers.
I then made a Setup Project to be able to install the application on target computers and I did so that it requests no additional requirements. I ran the installer on my lap top which is Windows 7 and it works fine but on those target computers I get a message when i try to install the app:
"The installer was interrupted before 'App Name' could be installed.You need to restart the installer to try again."
I tried to find out what is the problem but without a success. I read that it could be problem that I am trying to install an application that was developed in VS2015 and that I need older version, but I couldn't understand why or what to do to make it work. Any help would be appreciated. Thanks!
EDIT1: I've checked and XP computers do have 3.5 NET installed. I also checked the event viewer and error I receive is: "Installation success or error status: 1603"
I've tried the resolutions that Microsoft suggests for this error, but didn't succeed.
EDIT2: I've checked permissions for the installation everything is as should, but still getting the error.
Since I start application from Debug and Release folder directly and it works perfectly, I am sure the problem is in the installer. Any help?
I have built Mono from github yesterday to usr/local prefix. I have chosen this directory as a default in my Xamarin Mono runtime version (now it became Mono 4.3.0). But after that when I ran my project I got an error message saying "Mono could not find ASP.Net web server. The xsp4 web server could not be found.". Did I do something wrong or what should I do now? Thank you in advance.
XSP is another Git repository to clone and build,
https://github.com/mono/xsp
There are also other Git repository for Mono components, so if you do prefer to build your own other than using the Xamarin's, make sure you spend enough time going through the README files and wish you good luck.
I have an application that runs perfectly when I run it from Visual Studio. But once I hit "Publish" and try to launch "setup.exe", I get an error message:
This application could not be started. Do you want to view information about this issue?
Clicking on yes leads me here. I have no idea what "SHIM" is and it's definitely not part of the code.
The error is the same if I publish to a network share or to my local drive. Once installed, the application shows up in "Programs and Features" and can be uninstalled but a Start Menu entry is not added. It's as if the error occurs during the installation.
I tried chancing the prerequisites (and target framework) between 3.5 and 4, as well as Windows Installer 3.1 vs 4.5 - no dice.
While it is currently targetting 3.5, it was originally created as a 4.03 app. I did change the target framework a couple times and going back to 4.03 doesn't fix it. I'm pretty sure this issue appeared as a result of retargetting.
Can anyone provide clues where to look?
Take a Look at configuration files if you have any app.config or web.config.
If you didn't find any tag regarding the target framework, Do a File Search on you solution folder and if you find something in .csproj or .sln files, change it to the correct one.
I come to you because I'm desperate. I've developed a GTK# application in C# with the latest MonoDevelop. It's built for .NET framework 4.0 / x86, and the only external library it uses is the official Mysql .Net connector. It's meant to run under Windows XP.
It's the first application I make with this IDE. I was very happy with the results and the development time, but the deployment is a real headache.
It works perfectly on the development machine. The debug is clean. Everything's okay.
Then, as I couldn't find any information about the deployment, I installed a clean XP to try it and see what do I should install on the client's machine.
I've installed the SP3, .NET 4.0 and copied the release package with all the DLLs mentioned in the build log (that made it work outside the MonoDevelop in the development machine). But I'm getting a "the application has encountered a problem and needs to close" error, with no exception, in kernel32.dll, offset 0012aeb.
I've tried to install the .NET 3.5 before the 4.0, updated IE (just in case...), copied more GTK# and Monodevelop DLLs to the exe's folder, installed the Mysql .NET connector, installed Mono 2.8... But nothing. Still getting that unexplained error.
Google and StackOverflow searches didn't help me. I've researched and tried a lot of things in the last twelve hours or more without moving from this machine.
Do you have any advice? What can be causing it? Is there any way to debug the exe (without installing VS...)? Does anyone know what are all the dependencies of this kind of executable?
WinDbg can help you figuring some JIT trouble...
Even though it aint intuitive and require skills, Worth a try. might pop something up.
If it's meant to run under Windows, then you should probably compile it with the Visual C# compiler.
However, more related to your problem - get a debugger in your deployment machine and run the application on it. This is the best way to figure out the problem because we really can't guess it.
Mono Application Deployment Guidelines
There are several options to installing Visual Studio on your production machine, one of them is the Remote Debugging Monitor. It does not require a Visual Studio installation. You can copy the files from your development machine to your server. I've got them under C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Remote Debugger.
You can also use it for Remote Debugging of a Project Built Locally.