MonoDevelop: "A platform service implementation has not been found" error - c#

I took MonoDevelop 4.0.12 binaries from Debian's package archives (because could not find windows builds) and tried to run them under windows with this command (under windows):
"Mono-2.11.4\bin\Mono.exe" "monodevelop4.0.12\bin\MonoDevelop.exe"
it runs and works correctly for editing but when pressing F5 it fails to run the project being edited with this error:
"A platform service implementation has not been found"
(this same project compiles and runs with Mono from command line)
what is "platform service" and where can I find it for windows?
alternatively where can I find binaries of older versions of MonoDevelop?
I know about SharpDevelop but it cannot run on Mono (want to run same binaries of MonoDevelop on windows and linux with wine)

Related

failed to find library teserract41.dll for platoform 64x- After installing vc_redist.x64.exe

I have a program that uses the tesseract library and I want to use it on other computers so I send to other computer the debug folder. Suddenly I got this runtime error message on the other computer:
failed to find library teserract41.dll for platoform 64x
Before I intalled the vc_redist.x64.exe I had the error: failed to find library leptonica-1.80.0.dll for platoform 64x
Now I get the error in the title and I don't know what else can I do.
In the 64x folder there is this dll.
In my local computer, when I run my program from the debug folder everything works fine.
I installed all the three exe files from this link:
https://support.microsoft.com/en-us/topic/the-latest-supported-visual-c-downloads-2647da03-1eea-4433-9aff-95f26a218cc0
x86: vc_redist.x86.exe
x64: vc_redist.x64.exe
ARM64: vc_redist.arm64.exe
I solved this problem by adding dll to the project folder

Problem with C# application and dll unable to register

I've done a C# application with Microsoft VisualStudio professional 2019 to communicate with ControlLogix processor using Libplctagwrapper namespace.
In developer system with Windows 10 pro 64-bit O.S. I don't have any problem running the application.
I had a problem registering plctag.dll in the target system with a virtual machine developed using Hyper-V console and O.S. Windows 10 Pro 64 bit.
I tried to register with regsvr32 command in admin privilegies cmd prompt console, but I received the error of unable to load plctag.dll module.
I tried in system32 and syswow64 both directory and received everytime the error of unable to load dll module.
I'm waiting to receive help information.
Go to the startup project of your program.
Open the properties window.
Click the compile tab.
Click advanced compile options.
Change the target CPU options to x86.
Rebuild and Upload
Edit: VS2019
Build Platform target to x86

i can't run wpf app after install .net runtime in some windows

I have project build in wpf code 3.1.0 .net and it's run on my machine perfectly but when i wanna install in
windows 7 : it can't run and cant install .net automatically and when i install .net manually it shows
The program can't start because api-ms-win-crt-runtime-l1-1-0.dll is missing from your computer. Try to reinstall the program to correct this problem.
and that happed to in some version of window 10 but when i install .net manually they don't work (don't even show any message).
see this question for the "api-ms-win-crt-runtime-l1-1-0.dll" error

C# Desktop Application with CEF browser embedded NOT RUNNING on Client's PC, but runs on development PC's

I have developed a C# Desktop Application application on VS2013 that has CEF(Chrome Embedded Framework) in it. The Application is developed on .NetFramework 4.5.2 with Target Platform set as x64 (It has to be x64 otherwise CEF doesnt work)
The App runs on the developer PC but when i install it (using a setup) on Clients PC and simply run it by clicking the installed .exe , the mouse pointer loads for a few seconds and then nothing happens. It doesn't appear in task Manager either. I have tested it by installing another C# Desktop app developed in the same environment and configuration but without CEF , and it is working Fine in all the client's PC's.. Is there any problem with the CEF?
Following are the Specs of Developers PC and the Clients PC.
Developers PC : [Application Running]
Windows 10
OS = x64 bit
Visual Studio 2013 with .NETFramework 4.5.2
Visual C++ 2012 Redistributable Package
CEF .dll files included and placed in Debug Folder
Another PC 2 : [Application Running]
Windows 7
OS = x64 bit
Visual Studio 2013 with .NETFramework 4.5.2
Visual C++ 2012 Redistributable Package
CEF .dll files included and placed in Debug Folder
Clients PC 1 [Application NOT Running]
Windows 8.1
OS = x64 bit
Visual C++ 2012 Redistributable Package
CEF .dll files included and placed in Debug Folder
Clients PC 2 [Application NOT Running]
Windows 8.1
OS = x64 bit
Visual C++ 2012 Redistributable Package
CEF .dll files included and placed in Debug Folder
Any help would be highly appreciated. Thanks a lot.
There is a tool built into windows called sxstrace.exe that can help determine what is missing.
1) Run something like:
sxstrace trace -logfile:mylog
2) Try to launch the application
3) stop the trace (press any key in cmd window)
4) parse the logfile like:
sxstrace parse -logfile:mylog -outfile:mylog.txt
5) view output file for errors
EDIT: In your case, very likely missing some CEF files. From their documentation:
The following files, in addition to the usual .NET project files,
should be present in the bin directory. They should live side-by-side
in the same directory as the CefSharp.Wpf.Example.exe file, except for
en-US.pak which is in a locales subdirectory:
cef.pak devtools_resources.pak icudt.dat libcef.dll /locales/en-US.pak
I hope you are not releasing a Debug version of your application. That might explain the dependency on MS VS being installed. In my C++ experience debug builds sometimes require some DLLs that can only be found in a Visual Studio installation.
Another debugging idea: download a Sample Application and place just the executable (cefclient.exe) into your project installation. It is important to fetch the version that corresponds to your CEF version. Try to run the simple app. If it works, then the required binary dependencies and assets are there and the problem is somewhere else.

Using mkbundle to port Mono GTK# app to other platforms

I'm a long-time C# developer but new to Mono and, especially, Gtk#. I have developed a small app using C# and Gtk#. I need this app to work on Windows, Linux and Mac so I decided to go for Mono and, so far, it seems to be a cool framework.
What my simple app does is start up an XSP web server based on a local directory and port chosen by the user. Ideally, I would like my app to work without having to install the Mono framework at first, but this is not a must to begin with. I am using the following libraries:
using System;
using Gtk;
using System.Net;
using Mono.WebServer;
using System.Diagnostics;
I am developing on a Mac (Snow Leopard, 10.6.7). My executable works perfectly on my Mac. But I am having problems with Ubuntu and Windows. My app works partly on Ubuntu (11.04) -- it starts up and seems to be working but fails when I try to start the XSP web server, which seems expectable as Mono.Webserver is probably not installed on my Ubuntu machine. On Windows (7, 64-bit), my app crashes immediately when I double-click on it. The crash report tells me that a System.IO.FileNotFoundException error occurred. Probably due to the same missing XSP library?
Anyway, I looked around on the Internet and learned about mkbundle. I have performed the following setting as suggested by various forum threads:
export AS="as -arch i386"
I have navigated to the /bin/Release directory of my project and, then, run the following command:
mkbundle MivandoLocalServer.exe -o MivandoLocalServer --deps
But I am getting the following output, which eventually fails:
Compiling:
as -arch i386 -o temp.o temp.s
cc -g -o MivandoLocalServer -Wall temp.c `pkg-config --cflags --libs mono-2` temp.o
Package mono-2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `mono-2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'mono-2' found
temp.c:2:36: error: mono/metadata/assembly.h: No such file or directory
temp.c:5: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘assembly_bundle_MivandoLocalServer_exe’
temp.c:7: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
temp.c:18: error: ‘NULL’ undeclared here (not in a function)
temp.c: In function ‘mono_mkbundle_init’:
temp.c:22: warning: implicit declaration of function ‘mono_register_bundled_assemblies’
temp.c:22: error: ‘bundled’ undeclared (first use in this function)
temp.c:22: error: (Each undeclared identifier is reported only once
temp.c:22: error: for each function it appears in.)
temp.c: In function ‘main’:
temp.c:114: warning: implicit declaration of function ‘mono_set_dirs’
[Fail]
I really do not know what to do from here. I have MacPorts installed and I have read that this might cause some problems with regards to the pkg-config directory. Is this true? If yes, what will I have to do make it work?
I hope that somebody will be able to help me. Thanks!
Best regards,
Sebastian
PS. I have also posted this question in the forums at Mono's homepage but without any responses so far.
Update: I suspect MacPorts for interfering with my pkg-config directory setting. When I entered the following commands into my terminal, mkbundle allowed me to compile. But I am still encountering some problems.
export PKG_CONFIG_PATH="/Library/Frameworks/Mono.framework/Versions/Current/lib/pkgconfig/"
export AS="as -arch i386"
export CC="cc -arch i386"
Executing the following mkbundle command results in a Unix-archive of 4.9 MB that includes all the necessary dependencies. When I double-click on this new file on my Mac, a terminal window pops up and starts my app. Sweet! But this does not work in Windows nor in Ubuntu.
mkbundle MivandoLocalServer.exe -o MivandoLocalServerBundle --deps -z
What I would like to receive is a bundled executable that can be run in Windows and Ubuntu. So far I have not come across a solution that lets me do this. I tried to install MonoDevelop on my Windows 7 machine, copy my solution and build it there. But since my app is dependent on the Mono.WebServer2 library, I am not able to build it on Windows. I have not been able to find the Mono.WebServer2.dll to download for Windows anywhere on the Internet.
First of all this situation covers two separate issues which I will address separately:
Architecture - i386 only
Build and Packaging
1. Architecture
First of all, not all Windows and Linux machines run on the i386 architecture, so make sure you are using one that is. They are more likely to be i386, but Linux can easily run on many architectures and Windows has recently ventured into this path as well (they supported it in the past, but it quickly lost support) with the new tablet PC cpu types.
2. Build and Packaging
When targeting any operating system there are bound to be differences in the packaging paths so you should build for each target OS with that target OS. If you want mkbundle to work on Windows the whole toolchain needs to be installed there and Windows requires a special script to get it right, but since mkbundle was made for Unix-like OSs it should work on Linux without special considerations:
Create C# executable with mkbundle on windows
http://linux.die.net/man/1/mkbundle

Categories

Resources