English 中文(简体)
不同情况下使用的包装法
原标题:Packaging same code for using in different contexts

My work involved creating various tools and utilities for in-house use for automation purposes.

我的一些行动都集中在一份DLL档案中。

之后,将DLL列入另一个DLL,从1个自动化工具中加以使用,而另一个DLL则被包装在另一个工具中(例如——Builder)。

It is then repackaged as an Executable for running as a standalone tool.

我的问题是——任何人是否遇到这样的情况,在这种情形中,需要在各种情况下重新使用多个小型“行动”或公用事业(有限、独立等)?

If so, is there any easier option to be able to define these once and be able to use them in various locations, instead of writing additional wrappers all the time ?

增 编

最佳回答

我不理解,必须“治疗”你共同的代码在另一批中干.。

If your code is shareable, then it should be in a library (with its own namespace(s)). Any number of applications can link to (reference) this library. To deploy the applications, they will all just need a copy of the library assembly next to their .exe file - no wrapping required.

如果你希望你作为单项档案,再不附加任何文件,那么你就可以使用一个诸如ILMerge将组件合并成一个单一的连贯的双轨。

最后一种选择是,实施多个具有相同来源代码的碎块项目,因此,你只是将共同的法典“纳入”你们所有的项目。 这将意味着你建立一个单独的顶点,无需在汇编后再运送额外的lls车或使用ILMerge将集会合并起来。 这倒是,你必须每当你建立自己的图书馆法典时,就应该建立所有图书馆,因此,你的建筑可能要慢一些。 (如果您希望更新共享的图书馆,那么,只有<>一份总书所有来源代码的<>。)

问题回答

暂无回答




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签