部署:根文件夹外的bin文件夹? [英] Deployment: bin folder outside root folder?

查看:86
本文介绍了部署:根文件夹外的bin文件夹?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我想为asp.net网站提供以下文件夹结构:

MasterFolder

| --- \AppRoot

| --- webform.aspx

| --- web.config

| --- global.asax

| | --- \ images

| | --- \ styleles

| | --- \downloads

| | --- \ usercontrols

|

| --- \DllFolder

| ---一些dll'的

| | --- \ SubDllFolder

| ---其他dll的

我想知道是否有可能包含dll'的文件夹

(& ; bin文件夹,虽然已重命名在根文件夹之外。我已经在Google网上论坛上完成了我的

研究,并且不想使用GAC(因为你将需要每次都删除和阅读大会改变),似乎你使用这种方法




< configuration>

< runtime>

< assemblyBinding xmlns =" urn:schemas-microsoft-com:asm.v1">

< probing privatePath =" bin; bin2 \subbin; bin3" ; />

< / assemblyBinding>

< / runtime>

< / configuration>

....然后在privatepath *中指定的目录必须是

应用程序基目录的子目录。


我是什么在我看起来不那么*对我来说很奇怪 - 肯定会有这样的方式来做这件事吗?


任何帮助都非常感激,


TIA,


JON


Hi All,

I would like to have the following folder structure for an asp.net website:
MasterFolder
|---\AppRoot
| --- webform.aspx
| --- web.config
| --- global.asax
| |--- \images
| |--- \styles
| |--- \downloads
| |--- \usercontrols
|
|---\DllFolder
| --- some dll''s
| |--- \SubDllFolder
| --- other dll''s
I''d like to know if it''s possible to have the folder containing the dll''s
(the "bin" folder, though renamed) outside the root folder. I''ve done my
research on Google Groups, and don''t want to use the GAC (because you will
have to remove and readd the assembly on every change), and it seems if you
use this method:

<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="bin;bin2\subbin;bin3"/>
</assemblyBinding>
</runtime>
</configuration>

....then the directories specified in privatepath *must* be subdirectories of
the application base directory.

What I''m after doesn''t seem *that* strange to me - there must be a way of
doing this, surely?

Any help much appreciated,

TIA,

JON


推荐答案




您可能会尝试挂钩到AppDomain.AssemblyResove事件。


另外,您是否尝试将privatePath放入完整目录名?如果

你的路径没有\它会在子目录中查找,但除此之外它应该有效。至少它适用于控制台应用程序,我不知道

IIS。


Sunny


文章< #m ************** @ TK2MSFTNGP11.phx.gbl>,
jo * ***@surfeuNOSPAM.de 说...
大家好,

我想为asp.net网站提供以下文件夹结构:

MasterFolder
| --- \ AppRoot
| --- webform.aspx
| --- web.config
| --- global.asax
| | --- \ images
| | --- \styles
| | --- \downloads
| | --- \ usercontrols
|
| --- \DllFolder
| ---一些dll'的
| | --- \ SubDllFolder
| ---其他dll的

我想知道是否有可能包含dll'的文件夹
(bin文件夹虽然已重命名)在根文件夹之外。我已经完成了对Google网上论坛的研究,并且不想使用GAC(因为你将不得不在每次更改时删除和阅读大会),看来你似乎
使用这种方法:

< configuration>
< runtime>
< assemblyBinding xmlns =" urn:schemas-microsoft-com:asm.v1" ;>
< probing privatePath =" bin; bin2 \subbin; bin3" />
< / assemblyBinding>
< / runtime>
< / configuration>

...然后在privatepath *中指定的目录必须是应用程序基目录的子目录。

我在追求什么我觉得这很奇怪 - 肯定有一种方法可以做到这一点吗?

任何帮助都非常感激,

TIA,

JON

Hi All,

I would like to have the following folder structure for an asp.net website:
MasterFolder
|---\AppRoot
| --- webform.aspx
| --- web.config
| --- global.asax
| |--- \images
| |--- \styles
| |--- \downloads
| |--- \usercontrols
|
|---\DllFolder
| --- some dll''s
| |--- \SubDllFolder
| --- other dll''s
I''d like to know if it''s possible to have the folder containing the dll''s
(the "bin" folder, though renamed) outside the root folder. I''ve done my
research on Google Groups, and don''t want to use the GAC (because you will
have to remove and readd the assembly on every change), and it seems if you
use this method:

<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="bin;bin2\subbin;bin3"/>
</assemblyBinding>
</runtime>
</configuration>

...then the directories specified in privatepath *must* be subdirectories of
the application base directory.

What I''m after doesn''t seem *that* strange to me - there must be a way of
doing this, surely?

Any help much appreciated,

TIA,

JON



您可以尝试处理AppDomain的AssemblyResolve事件并加载

大会男子从任何地方都可以。它适用于我。


顺便说一句,我从未尝试过,但可以在< probing

privatePath ="">中设置绝对路径。 ?或相对路径,例如<探测

privatePath =" .. \ DLLFolder \ SubDllFolder \ my.dll"


Vadim Chekan。


Jon Maz写道:
You can try to handle AssemblyResolve event of AppDomain and load
assembly manually from whatever location. It works for me.

BTW, I never tryed but is it possible to setup absolute path in <probing
privatePath="">? or relative path, for example <probing
privatePath="..\DLLFolder\SubDllFolder\my.dll"

Vadim Chekan.

Jon Maz wrote:
大家好,

我想拥有以下文件夹结构asp.net网站:

MasterFolder
| --- \ AppRoot
| --- webform.aspx
| --- web.config
| --- global.asax
| | --- \ images
| | --- \styles
| | --- \downloads
| | --- \ usercontrols
|
| --- \DllFolder
| ---一些dll'的
| | --- \ SubDllFolder
| ---其他dll的

我想知道是否有可能包含dll'的文件夹
(bin文件夹虽然已重命名)在根文件夹之外。我已经完成了对Google网上论坛的研究,并且不想使用GAC(因为你将不得不在每次更改时删除和阅读大会),看来你似乎
使用这种方法:

< configuration>
< runtime>
< assemblyBinding xmlns =" urn:schemas-microsoft-com:asm.v1" ;>
< probing privatePath =" bin; bin2 \subbin; bin3" />
< / assemblyBinding>
< / runtime>
< / configuration>

...然后在privatepath *中指定的目录必须是应用程序基目录的子目录。

我在追求什么我觉得这很奇怪 - 肯定有一种方法可以做到这一点吗?

任何帮助都非常感激,

TIA,

JON
Hi All,

I would like to have the following folder structure for an asp.net website:
MasterFolder
|---\AppRoot
| --- webform.aspx
| --- web.config
| --- global.asax
| |--- \images
| |--- \styles
| |--- \downloads
| |--- \usercontrols
|
|---\DllFolder
| --- some dll''s
| |--- \SubDllFolder
| --- other dll''s
I''d like to know if it''s possible to have the folder containing the dll''s
(the "bin" folder, though renamed) outside the root folder. I''ve done my
research on Google Groups, and don''t want to use the GAC (because you will
have to remove and readd the assembly on every change), and it seems if you
use this method:

<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="bin;bin2\subbin;bin3"/>
</assemblyBinding>
</runtime>
</configuration>

...then the directories specified in privatepath *must* be subdirectories of
the application base directory.

What I''m after doesn''t seem *that* strange to me - there must be a way of
doing this, surely?

Any help much appreciated,

TIA,

JON



您可以尝试处理AppDomain的AssemblyResolve事件并加载

手动装配从任何地方。它适用于我。


顺便说一句,我从未尝试过,但可以在< probing

privatePath ="">中设置绝对路径。 ?或相对路径,例如<探测

privatePath =" .. \ DLLFolder \ SubDllFolder \ my.dll"


Vadim Chekan。


Jon Maz写道:
You can try to handle AssemblyResolve event of AppDomain and load
assembly manually from whatever location. It works for me.

BTW, I never tryed but is it possible to setup absolute path in <probing
privatePath="">? or relative path, for example <probing
privatePath="..\DLLFolder\SubDllFolder\my.dll"

Vadim Chekan.

Jon Maz wrote:
大家好,

我想拥有以下文件夹结构asp.net网站:

MasterFolder
| --- \ AppRoot
| --- webform.aspx
| --- web.config
| --- global.asax
| | --- \ images
| | --- \styles
| | --- \downloads
| | --- \ usercontrols
|
| --- \DllFolder
| ---一些dll'的
| | --- \ SubDllFolder
| ---其他dll的

我想知道是否有可能包含dll'的文件夹
(bin文件夹虽然已重命名)在根文件夹之外。我已经完成了对Google网上论坛的研究,并且不想使用GAC(因为你将不得不在每次更改时删除和阅读大会),看来你似乎
使用这种方法:

< configuration>
< runtime>
< assemblyBinding xmlns =" urn:schemas-microsoft-com:asm.v1" ;>
< probing privatePath =" bin; bin2 \subbin; bin3" />
< / assemblyBinding>
< / runtime>
< / configuration>

...然后在privatepath *中指定的目录必须是应用程序基目录的子目录。

我在追求什么我觉得这很奇怪 - 肯定有一种方法可以做到这一点吗?

任何帮助都非常感激,

TIA,

JON
Hi All,

I would like to have the following folder structure for an asp.net website:
MasterFolder
|---\AppRoot
| --- webform.aspx
| --- web.config
| --- global.asax
| |--- \images
| |--- \styles
| |--- \downloads
| |--- \usercontrols
|
|---\DllFolder
| --- some dll''s
| |--- \SubDllFolder
| --- other dll''s
I''d like to know if it''s possible to have the folder containing the dll''s
(the "bin" folder, though renamed) outside the root folder. I''ve done my
research on Google Groups, and don''t want to use the GAC (because you will
have to remove and readd the assembly on every change), and it seems if you
use this method:

<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="bin;bin2\subbin;bin3"/>
</assemblyBinding>
</runtime>
</configuration>

...then the directories specified in privatepath *must* be subdirectories of
the application base directory.

What I''m after doesn''t seem *that* strange to me - there must be a way of
doing this, surely?

Any help much appreciated,

TIA,

JON



这篇关于部署:根文件夹外的bin文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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