I have recently installed Mono and MonoDevelop on Mac OS X, and now I am trying to create a native C# app for Mac. I tried following the Mono tutorial to create this double-clickable "app", but got stuck. My specific error was "no package 'cocoa-sharp' found" when I tried implementing the commands outlined in the documentation.
I searched SO and found others who were reporting missing the 'cocoa-sharp' package. The advice given in a thread over 3 years ago was to reinstall Mono. What happens when that does not work? Can I go get 'cocoa-sharp.pc' or whatever the specific file is and throw it into a particular directory manually? Am I even going down the right path?
The command I used:
gmcs test.cs -pkg:cocoa-sharp
cocoa-sharp is obsolete and the tutorial is outdated, but thankfully there is a good replacement: MonoMac. You can fetch and compile it from within MonoDevelop (provided you have installed XCode), and there are lots of examples in the samples/ directory. There is even integration with the XCode interface designer.
Just recently there was a successor to MonoMac announced, which is however a commercial product: Xamarin.Mac.
Related
All,
I am writing a Powershell cmdlet. Got everything working for the cmdlet on my local machine. Looked at what is needed to access remote machines and it seems I need a reference to Microsoft.Management.Infrastructure.dll in my project. I have search my system to no avail.
So I hit Google. I verified I am running Windows 7 SP1. Downloaded and installed the Windows Management Framework (WMF) 4.0. No luck. Still no DLL. I verified I met the minimum requirements.
I then found a Microsoft page that said version 5 required WMF 4.0 as a prerequisite to the install. So I upgraded my .Net Framework to 4.6.2. Then installed WMF 5.0. Still no .DLL anywhere on my system.
Has anyone experienced this before? Can anyone shed some light as to what I may be doing wrong? I am using Visual Studio 2010. Is this the cause of the problem?
I have continued to search the web and found articles that stated the Microsoft.Management.Infrastructure dll was part of the Windows 7 SDK. Tried installing the SDK with no effect. Still cannot get the dll load on my system.
Continuing to look for a fix.
The easiest way I found to get this dll - and reference it automatically within my VS 2017 Project was via packet Manager console:
Install-Package Microsoft.Management.Infrastructure -Version 4.0.0
As stated here on this Microsoft page: Nuget Gallery
No Need to install any SDK or so only to get this dll.
could you check C:\Program Files (x86)\Reference Assemblies\Microsoft\WMI\v1.0 to see whether can find it there ?
The best resolution I was able to find to this issue after repeated attempts with numerous combinations of .Net frameworks, WMF versions, and Windows 7 SDK's was to install the Windows 8 SDK.
I have problem in C# development in monodevelop tool for unity.
In that many methods and Interfaces not found like IEnumerator and Array.Length.
I found Same question but it's not work for me.
because solution of that question is import System.Collections namespace but I was already imported it then also throw compile time error.
I Have installed latest .Net Framework on Windows 8.1 Os.
How i solve this problem?
I have had that problem before. I was using the latest .net framework and I went to Programs and Features within control panel (if you're using Windows) and selected the box to also run .net framework 3.5 I think it was.
I then shut down my project after saving, restarted my machine and it worked fine
Close the project from MonoDevelop by doing Right Click. And open the *.sln file manually in MonoDevelop
I'm using Debian and I had your error, this error, and both was fixed by installing these packages:
mono-reference-assemblies-2.0
mono-reference-assemblies-3.5
Using APT:
sudo apt install mono-reference-assemblies-2.0 mono-reference-assemblies-3.5
According to the official website, Mono now supports System.Speech (in 5.0) . However, I am unable to reach a linux build of version 5.0
"Packages for MonoDevelop 5.0.0.878 not yet available. The latest available version is MonoDevelop 4.2.1"
Is there any way of achieving this? (tarballs, git?)
Notes
I am using ArchLinux
The best way to use the last monodevelop on Linux is to get it from git (it's very fast and very easy :)
Now I'm using it (5.1) on Ubuntu 14.04.
You can get the source code from here:
git clone git://github.com/mono/monodevelop.git
and then compile it: http://monodevelop.com/developers/building_monodevelop
Remember that you must have installed Mono runtime 3.x.
I am answering this a little earlier but i think it applies right now too because Xamarin have already provided Mono 3.6.0 builds(technical preview) for Debian and derivatives.And with in a few months the best way to get anything latest related to mono will be from Xamarin official builds.They will provide Mono and some important applications including Monodevelop for every Debian and Centos derived Linux distributions.
See this link......
mono builds for many Linux distributions
Having just built Monodevelop the hard way, I would recommend downloading a tarball from http://download.mono-project.com/sources/monodevelop/ as everything is already included and requires no additional downloads except the some apt-get installs.
If you really want to use the git repo here is how to fix the two major issues I had.
1) I'm behind a proxy so I had to edit git module files to not use the git protocol as described in this post https://stackoverflow.com/a/11410074/1516326
2) You have to Import the Mozilla LXR certificates for Mono, so NuGet can update correctly, using:
mozroots --import --sync
For the entire process follow these instructions: http://www.monodevelop.com/developers/building-monodevelop/
I developed an app that uses Tweetsharp, now I would like to convert that app with mono but I am kinda new to this world!
I downloaded mono, monodevelop and moma and I noticed that in Tweetsharp there is a solution for mono.
I tried to build it with either visual studio and monodevelop but both give me errors. So what is the right procedure to generate a reference for mono applications?
And the reference has to be used with monodevelop or I can use it also in VS using a directive?
From its GitHub history we can see there are few commits to the Mono folder now (Feb 1 2012),
https://github.com/danielcrenna/tweetsharp/commits/master/src/mono
Therefore, I think this library is not yet Mono compatible. If you are not capable of helping port it to Mono, you would have to wait till its authors finish the port, or find another library in this field who supports Mono.
I wanted to try WebKit by following this tutorial, but gmcs compiler was't able to find "webkit-sharp-1.0" package. Where can i get it and how to install it?
The original Webkit# no longer seems under development (latest commit is from 2009) and I have never encountered any windows packages for it but you can use open-webkit-sharp which is working on Windows.