English 中文(简体)
是否有可能将DL部署到单独的名录中,而不是适用于假释申请的指南?
原标题:Is it possible to deploy DLL s to separate directory than the executable for a console application?

是否有办法。 NET C# Console Application to submitting the executable to a different summary than the DL s取决于它吗?

In this case I would like to structure my deployment so that on the server where this will run I have the following directory structure. c:appinsample.exe c:appdll*.dll

最佳回答

很不明智,《刑法》不能在没有帮助的情况下找到《刑法》。 你的客户对利比里亚国防军所在地点感到 care。 事实上,我认为大多数信息技术工作人员喜欢同一名录中的双版。

如果您将DL列入c:appindll subdirectory,那么,您可使用app.exe.config file with the <probing> 元件,告诉《刑法》中心看该名录。 使用<代码>c:ppdll难度很大,需要一个非常不切实际的<代码><codeBase> in a <dependAssembly>。 这使人无法移动,更喜欢皮埃尔的解决办法。 除需要工作外,你还想使用<条码>Assembly.Gettry(Assembly.Location,以找到EXE的安装道路,使你能够找到一条相对的道路。

问题回答

你们总是能够利用大会的“ResolveEvent”具体指明任何类似集会的地点:

public static void Main(string[] args)
{
    AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve);

    //do something
}

private static Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
{
    Assembly.LoadFrom(fileName); // Load assembly from any file
    return assembly;
}

这种方法每次都能够发现你档案的位置。 另一种选择是,在贵方案财产页的参考路径部分中注明名录。

你们可以改变你们的DLLs的输出道路,使其走上不履约的道路。 页: 1 <>项目设计/>网页。

见以下条款:http://msdn.microsoft.com/en-us/library/kb4wyys2%28VS.80%29.aspx

一个解决办法是将你的DLs部署到全球大会Cache。 这样,你的申请就将装上GAC,而不是从申请目录中装出。





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

热门标签