C# - 你可以做一个"弱QUOT;装配参考很强的命名程序集 [英] c# - can you make a "weak" assembly reference to a strong named assembly

查看:347
本文介绍了C# - 你可以做一个"弱QUOT;装配参考很强的命名程序集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于种种原因,我宁愿不要使用强烈的命名在我的项目(签字)组件。然而,其中一个项目是由SharePoint Web部件,这意味着它必须签名引用。

For various reasons i would rather not use strong named (signed) assemblies in my project. however, one of the projects is referenced by a sharepoint web part which means it must be signed.

是有可能有此装配签署,但是当我从其他引用它的项目,这样做的使用非强参考。这会给我的优势,具有我的代码的其余部分的非签名的程序集,但仍然允许它由SharePoint加载。

is it possible to have this assembly signed but when I reference it from other projects, to do so using a non-strong reference. this would give me the advantages of having a non-signed assembly for the rest of my code but still allow it to be loaded by sharepoint.

推荐答案

要做到这一点,最简单的方法可能是有两个不同的项目配置 - 其中一个建立一个强命名程序集和其中一个不。显然,你需要小心你如何建立和引用的程序集,但具有矛盾的要求境内去。

The simplest way to do this is probably to have two different project configurations - one of which builds a strongly named assembly and one of which doesn't. Obviously you'll need to be careful how you build and reference the assembly, but that goes with the territory of having conflicting requirements.

这篇关于C# - 你可以做一个"弱QUOT;装配参考很强的命名程序集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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