无法获得Mono.10的Microsoft.VisualBasic.dll [英] Can't get Microsoft.VisualBasic.dll for Mono 2.10

查看:120
本文介绍了无法获得Mono.10的Microsoft.VisualBasic.dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试使用Mono将Windows上建立的.NET库(适用于Windows)移植到Ubuntu 11.04.该库使用.NET 4.0,因此Ubuntu 11.04的标准mono(2.6.7)版本不会删除.具体来说,我正在尝试使用Microsoft.VisualBasic.Devices.Computer.Info.TotalPhysicalMemory.我一直在搜索安装Microsoft.VisualBasic.dll的程序包或并行构建脚本的高低,但是它们都没有.

I've been trying to port a .NET library built on/for Windows to Ubuntu 11.04 using Mono. The library uses .NET 4.0 so the version of mono (2.6.7) that is standard with Ubuntu 11.04 doesn't cut it. Specifically, I'm trying to use Microsoft.VisualBasic.Devices.Computer.Info.TotalPhysicalMemory. I've searched high and low for packages or parallel build scripts that install Microsoft.VisualBasic.dll, but none of them do.

理想情况下,我想找到一种同时兼顾两者的方法,即具有.NET 4.0支持的Mono和Microsoft.VisualBasic,这样就不必修改代码.我会选择使用另一种方法的替代方法(尽管我在

Ideally I'd like to find a way to get the best of both worlds, Mono with .NET 4.0 support and Microsoft.VisualBasic so that the code won't have to be modified. I would settle for an alternative that uses another method (although, the P/Invoke method I saw in this previous post does not appeal to me).

非常感谢您的帮助.

推荐答案

您可以尝试通过创建自己的DLL版本来欺骗Cudafy.

You could try to fool Cudafy by creating your own version of the DLL.

使用反射器或在此处查看界面

Use reflector or check here to see the interface

https: //github.com/mono/mono-basic/blob/master/vbruntime/Microsoft.VisualBasic/Microsoft.VisualBasic.Devices/ComputerInfo.vb

您可以在Mono上使用性能计数器来实际获取内存量;

You can use a performance counter on Mono to actually get the amount of memory;

var pc = new PerformanceCounter("Mono Memory", "Total Physical Memory");
var mem = pc.RawValue();

这篇关于无法获得Mono.10的Microsoft.VisualBasic.dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆