参考等效于ASP.NET网站项目“复制本地” [英] Equivalent of reference 'Copy Local' in ASP.NET Web Site project

查看:90
本文介绍了参考等效于ASP.NET网站项目“复制本地”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看不出有任何确切的重复,在相关问题上面,所以这里去。请不要用石头砸我,如果它是重复的。

I don't see any exact duplicates in the Related Questions above, so here goes. Please don't stone me if it is a duplicate.

有没有什么办法来达到同样的目的是制定复制本地设置为True上的Web应用程序参考?我大概可以绘制一个自定义配置节的<编译><组件> 配置部分,简单的复制所有程序集到地方,但是这将是非常粗鲁的行为。我应该看着窃听到生成提供什么?我觉得这里的主要问题是确定上市组件无法正常$目标平台页上$ psent,但是这似乎是一个非常艰巨的任务,我不会简单地使用硬codeD名单,这将是过时的速度非常快

Is there any way to achieve the same end as setting 'Copy Local' to True on a web application reference? I could probably map a custom config section to the <compilation><assemblies> config section, and simple copy all assemblies to local, but that would be quite rude. Should I be looking at tapping into a build provider or something? I think the main issue here is identifying listed assemblies not normally present on the target platform, but this seems a very difficult task to me without simply using a hard-coded list, which will be out of date very quickly.

推荐答案

您可以添加必要的引用在生成后事件可能复制? 或编辑的.csproj文件中的任何其他方式,这将有助于实现这一目标。

You could add the necessary references to copy in the post-build event perhaps? or edit the .csproj file in any other way that would help achieve it.

例如,你可以有复制节只发生在发布版本。

For example you could have the copy section only happen during release builds.

这篇关于参考等效于ASP.NET网站项目“复制本地”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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