mono could not find asp.net server - c#

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.

Related

Is it literally impossible to build a SQL Server database project in Azure Data Studio on an M1 Mac?

I'm attempting to set myself up with Azure Data Studio on my new M1 Mac Mini, but the SQL Server database project I'm working on refuses to build. This is the (completely useless) error I'm getting:
stdout: /Users/dumasded/.azuredatastudio/extensions/microsoft.sql-database-projects-0.13.0/BuildDirectory/Microsoft.Data.Tools.Schema.SqlTasks.targets(586,5): error MSB4181: The "SqlBuildTask" task returned false but did not log an error. [/Users/dumasded/Projects/db-project/DBProject.sqlproj]
stdout: 0 Warning(s)
stdout: 1 Error(s)
I can neither find nor remember where I got this idea but I somehow got it into my head that this has something to do with the version of the SDK I'm using - I'm currently using 6.0.100, which as far as I can tell is the only one that's arm64 compatible. Every attempt I've made to download, install and run an earlier version of the SDK on this machine has failed. If that is in fact the problem, I can't even get far enough to find out.
Just to be sure it wasn't something to do with the existing project I was trying to set up, I created a brand new one from scratch and attempted to build that. It failed with the same error. It definitely appears to be a system issue and not a project-specific one.
Is there any hope for me? Am I doomed to return to working on my crummy Lenovo Thinkpad? My breath is bated. Thanks in advance.
EDIT
I've just come across the ingenious MSBuild.Sdk.SqlProj as a potential solution to my issue, however my attempts to use it are still running up against SDK version issues:
error : The current SDK bundles target framework 'netcoreapp6.0' which is not supported by MSBuild.Sdk.SqlProj. Either install a .NET Core SDK that supports 2.1, 3.1 or 5.0, or file an issue at https://github.com/rr-wfm/MSBuild.Sdk.SqlProj/ to add support.
This would seem to confirm my initial suspicion that this is an issue of SDK versions.
EDIT 2
Neglected to mention that I'm using Azure Data Studio with the SQL Database Projects extension, which purports to handle the DACPAC creation seamlessly and across platforms. Though that hasn't been my experience thus far.
I'll be dunked. I knew there had to be a deceptively simple answer to this.
It turns out that my attempts to download, install and run an earlier version of the SDK on my machine weren't failing - they were just going into a different directory. Apparently, installing x64 SDKs on an arm64 machine results in the SDKs being created in a dedicated 'x64' subdirectory of the primary dotnet installation. This is painfully obvious to me now - the reason dotnet --list-sdks showed no trace of the earlier SDKs was that they were being installed for a completely isolated instance of dotnet. All I had to do was point the SQL Database Projects extension to that instance of dotnet and it started working:
I hope my publicly blundering my way through the maze of dotnet SDK architectures manages to help someone else. For my part I'm just so relieved I've finally gotten it to work.

M2Mqtt android/xamarin for some reason not working anymore

I built an xamarin cross platform mobile application last summer. We were waiting for the hardware to be ready for us to deploy the app.
Now everything is ready I kept a copy of the application on my one drive.
I copied the application from my one drive onto my development machine last week I have been working with it in debug mode.
Yesterday I tried to compile in release mode and all of a sudden my
using uPLibrary.Networking.M2Mqtt;
using uPLibrary.Networking.M2Mqtt.Messages;
grayed out and show error could not be found. Now I can't get anything to work the way it did even in debug mode all my mqtt commands are showing an error.
I tried reinstalling the nuget packages but I get error tying to compile to ......... not available in package see author
I just don't understand what happend and why
Please let me know if you have any ideas, from what I've read it may be because I moved the project from a different folder. Please help
You need M2Mqtt for .Net MQTT with uPLibrary. M2Mqtt will provide M2Mqtt.dll to support uPLibrary. You need to add M2Mqtt.dll reference in your project.
Please check M2Mqtt for .Net : MQTT client for Internet of Things & M2M communication.
What I did originally was find m2mqtt.mono.dll which worked fine for a while until I found some bugs that were fixed in more resent commits.
I have now gotten my hands on M2Mqtt.Net.dll which I just added to my Xamarin project and it seems to be working good.
I went to paho.mqtt.m2mqtt master. Downloaded git opened sln in Visual Studio 2017, built solution and got M2Mqtt.Net.dll from M2Mqtt/obj/debug folder and added reference to it in my project.
I'll keep you advised if I have any problems

Building C# project using jenkins

First of all, im not sure if there is a specific forum thats more suitable for request about Jenkins, but I figured I just post it here.
So, I have this C# project, it right now requires Visual Studio 2015 to build and I would like to automate builds with Jenkins. This is the first time I'm using Jenkins and I was able to set it all up, it fetches the code from the gitlab repository, but right now there is no build action configured. For "fun" i tried to simply make it use a "windows batchfile" as build file and added echo test. Checking the console output it downloads the repository code and then tries to execute the batchfile, result is:
java.io.IOException: Cannot run program "cmd" (in directory "/var/lib/jenkins/workspace/Project"): java.io.IOException: error=2, No such file or directory
This of course makes sense, but I wonder now, is there a way to build a C# project with jenkins on a debian server without resorting to mono or something? I know that people build C++ projects for windows with Jenkins on a linux root, so there has to be some sort of cross compiling possibilities.
If the Visual Studio 2015 is a dealbreaker I can also strap it down to VS13 or even below. Any help is greatly appreciated!
/EDIT
Its probably important to say that Mono is NOT an option. Im using features like WPF that are not available for Mono.
Use Jenkins' MSBuild plugin.
Jenkins.NET is a good blog about using Jenkins in a .NET environment. First post is here.

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
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.

Using SuperWebSocket to create a WebSocket Server

I was looking for a way to implement a WebSocket server and came across SuperWebSocket which seems to have the most features. I downloaded the source code, looked at the samples (and the Echo server tutorial), but still have no clue how to do it.
I found this guide and it seemed to point me in the right direction, but I get errors with the references. I add the references to all the dlls, and I manage to import them 'using Superwebsocket.Common', but when I try to build I get an error telling me that they cannot be found.
The issues you describe sound similar to my problems trying to get the SuperWebSocketWeb demo up and running. I had a similar problems with the project references, which at design time in visual studio seemed fine but failed during a build.
To solve this I made sure that the demo project and SuperSocket assemblies were all built targeting the same .net framework version (4.5 in my case).

Categories