如何在单声道项目中使用应用程序设置?

时间:2022-04-01 22:53:04

I'm trying to port an application to Mono, however Mono doesn't support "Application Settings". I don't and won't use Mono Develop, the development is done with Visual Studio.

我正在尝试将应用程序移植到Mono,但是Mono不支持“应用程序设置”。我不会也不会使用Mono Develop,开发是使用Visual Studio完成的。

Is there any quick way to solve this? Or should I implement my own settings replacement class?

有没有快速解决方法?或者我应该实现自己的设置替换类?

If it matters this is a VB.NET application.

如果重要,这是一个VB.NET应用程序。

4 个解决方案

#1


Can you elaborate on "Application Settings"? Are you trying to use an app.config file? Or maybe the settings tab of the project file?

你能详细说明“应用程序设置”吗?您是否尝试使用app.config文件?或者也许项目文件的设置选项卡?

Mono should support both of those.

Mono应该支持这两者。

Perhaps you could also elaborate on "doesn't support". Are you getting an error message? If so, what is the message?

也许你也可以详细说明“不支持”。您收到错误消息了吗?如果是这样,消息是什么?

#2


The best place to ask questions like this is Mono dev mail list at http://lists.ximian.com/mailman/listinfo/mono-list

提问这样的问题的最佳地点是http://lists.ximian.com/mailman/listinfo/mono-list上的Mono dev邮件列表

I'm sure that there is a workaround and there is no reason to implement it by-hand

我确信有一个解决方法,没有理由手动实现它

And probably, the main reason of your issue is VB.BET because it's implementation on Mono is very backward in comparison with C#

可能,你问题的主要原因是VB.BET,因为与C#相比,它在Mono上的实现非常落后

#3


Mono does not support this feature natively. You many contribute to the code base immensely by implementing this feature for perhaps monodevelop, the VS style IDE for Linux and mono development in C# and other languages.

Mono本身不支持此功能。通过为monodevelop实现此功能,用于Linux的VS风格IDE和用C#和其他语言进行单声道开发,您可以为代码库做出巨大贡献。

#4


@jpobst

see the following code from my application:

从我的应用程序中看到以下代码:

Dim Threshold As Integer = My.Settings.Threshold

And

My.Settings.Threshold = 15

These should be synced with Application / User Settings. Yes I'm using Visual Studio's Settings feature and app.config with "user" and "application" scope.

这些应与应用程序/用户设置同步。是的我正在使用Visual Studio的设置功能和app.config以及“用户”和“应用程序”范围。

Mono doesn't support it. It's not implemented and AFAIK always return nothing. MoMA says it's Monotodo.

Mono不支持它。它没有实现,AFAIK总是什么都不返回。现代艺术博物馆说它是Monotodo。

#1


Can you elaborate on "Application Settings"? Are you trying to use an app.config file? Or maybe the settings tab of the project file?

你能详细说明“应用程序设置”吗?您是否尝试使用app.config文件?或者也许项目文件的设置选项卡?

Mono should support both of those.

Mono应该支持这两者。

Perhaps you could also elaborate on "doesn't support". Are you getting an error message? If so, what is the message?

也许你也可以详细说明“不支持”。您收到错误消息了吗?如果是这样,消息是什么?

#2


The best place to ask questions like this is Mono dev mail list at http://lists.ximian.com/mailman/listinfo/mono-list

提问这样的问题的最佳地点是http://lists.ximian.com/mailman/listinfo/mono-list上的Mono dev邮件列表

I'm sure that there is a workaround and there is no reason to implement it by-hand

我确信有一个解决方法,没有理由手动实现它

And probably, the main reason of your issue is VB.BET because it's implementation on Mono is very backward in comparison with C#

可能,你问题的主要原因是VB.BET,因为与C#相比,它在Mono上的实现非常落后

#3


Mono does not support this feature natively. You many contribute to the code base immensely by implementing this feature for perhaps monodevelop, the VS style IDE for Linux and mono development in C# and other languages.

Mono本身不支持此功能。通过为monodevelop实现此功能,用于Linux的VS风格IDE和用C#和其他语言进行单声道开发,您可以为代码库做出巨大贡献。

#4


@jpobst

see the following code from my application:

从我的应用程序中看到以下代码:

Dim Threshold As Integer = My.Settings.Threshold

And

My.Settings.Threshold = 15

These should be synced with Application / User Settings. Yes I'm using Visual Studio's Settings feature and app.config with "user" and "application" scope.

这些应与应用程序/用户设置同步。是的我正在使用Visual Studio的设置功能和app.config以及“用户”和“应用程序”范围。

Mono doesn't support it. It's not implemented and AFAIK always return nothing. MoMA says it's Monotodo.

Mono不支持它。它没有实现,AFAIK总是什么都不返回。现代艺术博物馆说它是Monotodo。