English 中文(简体)
• 如何提供C#得奖服务,从东道机器接送集会
原标题:How to make a C# win service app to refer assemblies from a host machine

I am building an agent service in C# to communicate with SCVMM installed on host. To do that the agent refers the following assemblies: Microsoft.SystemCenter.VirtualMachineManager.dll and Erros.dll etc.

In visual studio dev environment, I have added references to the agent app. When I build in debug/release mode basically I don t the above assemblies to be copied to debug/release directory, since the agent will distributed to customers. Basically agent app communicates with SCVMM, SCVMM must have been installed before installing the agent app.

One thing that I don t understand is how to make the agent service to refer Microsoft.SystemCenter.VirtualMachineManager.dll etc files that are already existing at <SCVMM root>/bin folder.

问题回答

在视力演播室和在拨打电灯前通常指:

AppDomain.CurrentDomain.AppendPrivatePath(scvmmroot + "/bin");

也可在<代码>yourapp.exe.config文档(见>)中查阅。 • 《习惯途径》,参考文件DL? 但是,由于您的行程与可执行路线相对,这意味着在安装器中生成<代码>.ig文档。





相关问题
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. ...

热门标签