我是.Net开发人员,想调查在Mono上构建和运行我们的框架.
如果最初的项目成功,我将很乐意投资OS学习曲线,但现在我想专注于启动和运行并看到代码正常工作.
假设我对Linux知之甚少,但我是一位经验丰富的开发人员,那么最好的分发是什么?我能期望多快(几小时/几天/几周?)?
到目前为止的一些反馈(感谢答案,伙计们):决定使用CentOS,但这也是因为这符合我想要移植到Mono的.Net代码的特定实现.唯一的问题是我需要转到版本4进行Mono的开箱即用安装
通过一些帮助,我已经能够实现这一点,我可以运行编译并开始解决移植问题.这花了几个小时 - 最大的学习曲线是围绕驾驶Linux.
20081231:在ubuntu上找到以下运行mono的文章:http://www.ddj.com/windows/212201484
我刚刚从.net开发转移到LINUX MONO开发......我以前对linux开发人员有很多经验..
我要求在单声道c#中创建后台服务(如Windows服务)..是否可能..
是否可以从单声道c#访问LINUX本机API.(比如来自win c#的winAPI调用)..
我正在尝试编写一些c#代码来启动浏览器,Process.Start(app,args);其中app是浏览器的路径,例如/Applications/Google Chrome.app/Contents/MacOS/Google Chromeargs--no-default-browser-check
如果我这样做,它适用于Windows和Linux
Process.Start("/Applications/Google Chrome.app/Contents/MacOS/Google Chrome","--no-first-run");
Run Code Online (Sandbox Code Playgroud)
我明白了
open: unrecognized option `--no-first-run'
Usage: open [-e] [-t] [-f] [-W] [-n] [-g] [-h] [-b <bundle identifier>] [-a <application>] [filenames]
Help: Open opens files from a shell.
By default, opens each file using the default application for that file.
If the file is in the form of a URL, the file will be opened as a URL.
Options:
-a Opens with the specified application.
-b Opens with the …Run Code Online (Sandbox Code Playgroud) 我试图在centOS 6.3上安装mono和monodevelop.经过几个小时,我能够安装单声道,但失败了monodevelop.
我真的很惊讶,在Linux上安装最近的mono/monodevelop版本是多么困难和耗时.是否有人愿意编写和维护安装/编译教程,以便在主要的Linux发行版(Centos,Ubuntu,Suse,Debian)上安装最新的mono/monodevelop/monodata/ASP.NET MVC/...版本?
我认为很多人在Windows上开发(Linux知识有限)想开始使用单声道,如果登机障碍会有所降低.
使Mono更常用并且更明显可能是最重要的.请编写一个经过测试的教程(脚本)来编译mono/monodevelop.
谢谢!
我正在使用此代码但是当我停止进程时它不会获得ping统计信息:
System.Diagnostics.Process p = new System.Diagnostics.Process();
p.StartInfo.FileName = "ping";
p.StartInfo.Arguments = "-c " + count + " -i " + interval + " -s " + buffer + " -W " + timeout + " " + address;
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardOutput = true;
string readData = "";
DateTime dt = DateTime.Now.AddSeconds(5);
if (p.Start())
{
Scanner scanner = new Scanner(p.StandardOutput.BaseStream);
while (scanner.HasNextLine)
{
readData = scanner.NextLine().ToString();
Console.WriteLine(readData.ToString());
if (!string.IsNullOrEmpty(readData) && !readData.StartsWith("---"))
{
Match M = Regex.Match(readData, @"^[\d]+ bytes from ([^:]+): …Run Code Online (Sandbox Code Playgroud) Linux 上Mono的Platform Invoke实现的当前状态是什么?在Solaris上?
Mono 2.10的发行说明建议使用XSP支持ASP.NET MVC 3.0和Razor.
在MonoDevelop 2.4.2(Mac OS X)中打开新创建的ASP.NET MVC 3.0默认项目(使用Visual Studio 2010创建)时,缺少以下DLL:
System.Web.Entity
System.Web.Helpers
System.Web.Mvc
System.Web.WebPages
Run Code Online (Sandbox Code Playgroud)
所有这些我都替换为从我的Windows安装中获得的DLL.项目构建,但在尝试调试项目时收到以下错误消息:
Adding applications '/:.'...
Registering application:
Host: any
Port: any
Virtual path: /
Physical path: /.../Mvc3Test/
Handling exception type TargetInvocationException
Message is Exception has been thrown by the target of an invocation.
IsTerminating is set to True
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
Run Code Online (Sandbox Code Playgroud)
在进行这些替换之前,应用程序运行但显然缺少参考错误.这表明新DLL中的某些东西搞砸了XSP服务器.
我究竟做错了什么?我太简单了吗?我是Mono和MonoDevelop的新手,但我能够成功地使用当前安装的MonoDevelop创建,构建和调试MVC 2.0项目.
我正在尝试使用IronPython作为Unity3D的外部脚本语言.IronPython执行所需的DLL在Assets\Plugins内部加载得很好.但是,当我尝试运行脚本时,我收到此错误:
PythonImportErrorException: No module named UnityEngine
IronPython.Modules.Builtin.__import__ (IronPython.Runtime.Calls.ICallerContext,string,object,object,object) <IL 0x0003b, 0x001cc>
(wrapper dynamic-method) object.__import__##5 (IronPython.Runtime.Calls.ICallerContext,object,object,object,object) <IL 0x0000e, 0x0004d>
IronPython.Runtime.Calls.FastCallableWithContextAny.Call (IronPython.Runtime.Calls.ICallerContext,object,object,object,object) <IL 0x00015, 0x00067>
IronPython.Runtime.Calls.BuiltinFunction.Call (IronPython.Runtime.Calls.ICallerContext,object,object,object,object) <IL 0x0000d, 0x00058>
IronPython.Runtime.Operations.Ops.CallWithContext (IronPython.Runtime.Calls.ICallerContext,object,object,object,object,object) <IL 0x00012, 0x000b0>
IronPython.Runtime.Importer.Import (IronPython.Runtime.PythonModule,string,IronPython.Runtime.List) <IL 0x0000d, 0x0006c>
IronPython.Runtime.Operations.Ops.Import (IronPython.Runtime.PythonModule,string) <IL 0x00007, 0x0003b>
(wrapper dynamic-method) object.<string>##1 (IronPython.Runtime.ModuleScope) <IL 0x0006b, 0x00210>
Run Code Online (Sandbox Code Playgroud)
脚本和'UnityEngine.dll'位于同一文件夹中.这是脚本:
import clr
clr.LoadAssemblyFromFile("UnityEngine.dll")
import UnityEngine
from UnityEngine import *
Debug.Log("Hello World from Python!")
Run Code Online (Sandbox Code Playgroud) 我试图将c#cloudinary api移植到mono,我在构建http请求时遇到了一些问题.
我已经分离出这个方法来设置请求,但HttpWebRequest.ContentLength在单声道中变成-1,但是.net内容是正确构建的.
我在Mac上运行最新的Xamarin Studio,我正在构建一个MONO/.NET 4.0库Mono版本:2.10.12
编辑:简化代码,此测试在Visual Studio中传递但在Xamarin工作室中失败
编辑:如果有人想帮助,代码被推送到github
[Test]
public void StreamTest()
{
var request = System.Net.HttpWebRequest.Create("http://foo.com");
request.Method = "POST";
request.ContentType = "application/x-www-form-urlencoded";
using (var writer = new System.IO.StreamWriter(request.GetRequestStream()))
{
writer.Write("anything");
}
Assert.IsTrue(request.ContentLength > 0);
}
Run Code Online (Sandbox Code Playgroud) mono ×10
c# ×4
linux ×3
.net ×2
monodevelop ×2
android ×1
cloudinary ×1
ironpython ×1
macos ×1
mojoportal ×1
pinvoke ×1
service ×1
solaris ×1
stream ×1
umbraco ×1
xamarin ×1
xsp ×1