单个执行 - 无安装程序 - 存储设置 [英] Single Exe - No install program - Storing Settings

查看:78
本文介绍了单个执行 - 无安装程序 - 存储设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我被要求在单个exe中创建一个解决方案 - 使用C#.NET 3.5。


我有发现我可以让ILMerge创建我所有的

应用程序集的单个exe。


但我的问题是如何处理settings / config?


我有一些设置应该是设置应该在应用程序的

实例之间共享,但这些设置可以由用户更改

加班。


这就是我不会使用注册的原因 - 让用户在首次运行时指定设置




提前致谢。


Lars

解决方案

你不会去很容易能够重新编译你的应用程序以在运行时更改用户

设置所以我建议一个XML文件或注册表是

最好的方法。


-

Ciaran O''''Donnell
http://wannabedeveloper.spaces.live.com

" pbcoder"写道:





我被要求在单个exe中创建一个解决方案 - 使用C#.NET 3.5 。


我发现我可以让ILMerge创建我所有的

应用程序集的单个exe。


但我的问题是如何处理设置/配置?


我有一些设置应该是设置应该在

实例之间共享应用程序,但这些设置可以由用户更改

加班。


这就是为什么我不会使用注册 - 让用户指定设置

首次运行。


提前致谢。


Lars


我通常使用xml或registy来存储设置,但


关于应用程序的要点是它应该很容易在
$之间复制b $ b用户只需复制一个文件就不必复制几个文件 - 我知道它

可能难以/不可能实现。


Lars


" Ciaran O''''Donnell"写道:


嗯,你不能轻易地重新编译你的应用程序来改变用户

在运行时的设置所以我建议你XML文件或注册表是

最好的方式。


-

Ciaran O''''Donnell
http://wannabedeveloper.spaces.live.com


" pbcoder"写道:





我被要求在单个exe中创建一个解决方案 - 使用C#.NET 3.5 。


我发现我可以让ILMerge创建我所有的

应用程序集的单个exe。


但我的问题是如何处理设置/配置?


我有一些设置应该是设置应该在

实例之间共享应用程序,但这些设置可以由用户更改

加班。


这就是为什么我不会使用注册 - 让用户指定设置

首次运行。


提前致谢。


Lars


如果这些用户在公司网络中,那么你应该看看他们可以访问的某个地方有一个

中央文件,或者它们是否分散在

网可能是一个网络他们可以获得设置的服务。这是非常好的,但是你要求一件困难的事情。

设置必须在某个地方。

-

Ciaran O''''Donnell
http://wannabedeveloper.spaces.live.com

" pbcoder"写道:


我通常使用xml或registy来存储设置,但


关于应用程序的要点是它应该只需复制一个文件就可以轻松复制

用户,而不必复制几个文件 - 我知道

可能很难/不可能实现。


Lars


" Ciaran O''''Donnell"写道:


嗯,你不能轻易地重新编译你的应用程序来改变用户

在运行时的设置所以我建议你XML文件或注册表是

最好的方式。


-

Ciaran O''''Donnell
http://wannabedeveloper.spaces.live.com

" pbcoder"写道:




>

我被要求在单个exe中创建一个解决方案 - 使用C#.NET 3.5。

>

我发现我可以使用ILMerge来创建我所有的单个exe

应用程序集。

>

但我的问题是如何处理设置/配置?

>

我有一些设置应该是设置应该在应用程序的

实例之间共享,但这些设置可以由用户更改

加班。

>

这就是我不会使用注册的原因 - 让用户在首次运行时指定设置



>

提前致谢。

>

Lars


Hi,

I have been asked to create a solution in a single exe - using C# .NET 3.5.

I have found that I can us ILMerge to create a single exe of all of my
Application assemblies.

But my question is what to do about settings/config?

I have some settings should be settings which should be shared between
instances of the application but these settings could be changed by the user
overtime.

This is why I would not use the registy - let the user specify the settings
at first run.

Thanks in advance.

Lars

解决方案

Well you arent going to easily be able to recompile your app to change user
settings at runtime so I would suggest that an XML file or the registry are
the best way to go.

--
Ciaran O''''Donnell
http://wannabedeveloper.spaces.live.com
"pbcoder" wrote:

Hi,

I have been asked to create a solution in a single exe - using C# .NET 3.5.

I have found that I can us ILMerge to create a single exe of all of my
Application assemblies.

But my question is what to do about settings/config?

I have some settings should be settings which should be shared between
instances of the application but these settings could be changed by the user
overtime.

This is why I would not use the registy - let the user specify the settings
at first run.

Thanks in advance.

Lars


I normally use xml or registy to store setting, but

The point about the application is that it should be easy to copy between
users simply by copy one file not have to copy several files - I know it
might be difficult/impossible thing to achieve.

Lars

"Ciaran O''''Donnell" wrote:

Well you arent going to easily be able to recompile your app to change user
settings at runtime so I would suggest that an XML file or the registry are
the best way to go.

--
Ciaran O''''Donnell
http://wannabedeveloper.spaces.live.com
"pbcoder" wrote:

Hi,

I have been asked to create a solution in a single exe - using C# .NET 3.5.

I have found that I can us ILMerge to create a single exe of all of my
Application assemblies.

But my question is what to do about settings/config?

I have some settings should be settings which should be shared between
instances of the application but these settings could be changed by the user
overtime.

This is why I would not use the registy - let the user specify the settings
at first run.

Thanks in advance.

Lars


If these users are in a corporate network then you should look at have a
central file somewhere they can all access, or if they are spread out over
the net then potentially a webservice where they can get the settings. It is
quite ellaborate to do that but you are asking for a difficult thing. The
settings will have to be somewhere.
--
Ciaran O''''Donnell
http://wannabedeveloper.spaces.live.com
"pbcoder" wrote:

I normally use xml or registy to store setting, but

The point about the application is that it should be easy to copy between
users simply by copy one file not have to copy several files - I know it
might be difficult/impossible thing to achieve.

Lars

"Ciaran O''''Donnell" wrote:

Well you arent going to easily be able to recompile your app to change user
settings at runtime so I would suggest that an XML file or the registry are
the best way to go.

--
Ciaran O''''Donnell
http://wannabedeveloper.spaces.live.com
"pbcoder" wrote:

Hi,
>
I have been asked to create a solution in a single exe - using C# .NET 3.5.
>
I have found that I can us ILMerge to create a single exe of all of my
Application assemblies.
>
But my question is what to do about settings/config?
>
I have some settings should be settings which should be shared between
instances of the application but these settings could be changed by the user
overtime.
>
This is why I would not use the registy - let the user specify the settings
at first run.
>
Thanks in advance.
>
Lars


这篇关于单个执行 - 无安装程序 - 存储设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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