AssemblyKeyFile相对于? [英] AssemblyKeyFile relative to?

查看:108
本文介绍了AssemblyKeyFile相对于?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


有谁知道AssemblyKeyFile属性的相对路径是什么?

例如我目前将我的设置为


< Assembly:AssemblyKeyFile(" .. \NicksKey.snk")>


有时会这样,有时我需要更改它


< Assembly:AssemblyKeyFile(" .. \..\NicksKey.snk")>


哪个可以只是意味着有时它是相对于项目根目录

,有时它是相对于编译的可执行文件。我正在网上寻找这个的
,但其他人是否也知道它是什么亲戚

呢?我只想拥有1个snk文件的副本,因此使用相对的

路径,我不想使用完整路径(即使我可能不得不这样做)。

再次感谢!!


尼克。


-

/ \ / \\ \\ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \

无论如何。无论结果如何,你都会被改变。


Fergus - 2003年9月5日

/ \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \\ \\ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \

解决方案

我也相信这个*可能*只发生在1个项目中,项目

是在解决方案中另外1个项目。我不能回复它什么时候

要求任何一条路径,但我确定必须有一个解释

它。


尼克。


-

/ \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \

不管。无论结果如何,你都会被改变。


Fergus - 2003年9月5日

/ \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \\ \\ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \


你好尼克,


没有答案,只是我自己的问题 - 什么是.snk文件?没什么鬼鬼祟祟,我希望,哈哈。


问候,

Fergus


======= ===========================

调用该代码?那甚至都不是伪代码!!

我告诉杰克你。

他会有话要说,那是'肯定。

==================================

>没有答案,只是我自己的问题 - 什么是.snk文件?没什么鬼鬼祟祟的,

我希望,哈哈。


嗨弗格斯,


这是非常有趣的事情这意味着我的装配工作将会比以前更加安全!它是一个

强名称密钥文件,

nofollowhref =http://www.ondotnet.com/pub/a/dotnet/2003/04/28/strongnaming.html\"target =_ blank > http://www.ondotnet.com/pub/a/dotnet...ongnaming.html

我在查找RSA时在网上找到了这个URL再次加密和

我以前从未发现过它,我感到非常惊讶。它值得

看看,如果你打算分发软件,请使用它!

特别是如果你想卖掉它!看起来像一个很好的网站一个

:-)

尼克。


-

/ \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \\ \\ / \ / \ / \ / \ / \ / \

无论如何。无论结果如何,你都会被改变。


Fergus - 2003年9月5日

/ \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \\ \\ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \


Hi there,

Does anyone know what path the AssemblyKeyFile attribute is relative to?
For example I currently have mine set to

<Assembly: AssemblyKeyFile("..\NicksKey.snk")>

Sometimes this works, and sometimes I need to change it to

<Assembly: AssemblyKeyFile("..\..\NicksKey.snk")>

Which could only mean that sometimes it is relative to the projects root
and sometimes it is relative to the compiled executable. I''m looking around
on the web for this one too, but does anyone else know what it is relative
too? I only want to have 1 copy of the snk file, hence using a relative
path, and I didn''t want to use the full path (Even though I might have to).
Thanks again!!

Nick.

--
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
"No matter. Whatever the outcome, you are changed."

Fergus - September 5th 2003
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\

解决方案

I also believe that this *may* only be happening with 1 project, the project
is in a solution with 1 other project. I can''t replecate when it will
require either path as yet, but I''m sure there must be an explanation for
it.

Nick.

--
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
"No matter. Whatever the outcome, you are changed."

Fergus - September 5th 2003
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\


Hi Nick,

No answer, just my own question - what''s a .snk file ? Nothing sneaky, I hope, lol.

Regards,
Fergus

==================================
Call that code? That''s not even pseudo code!!
I''m telling Jack on you.
He''ll have something to say about it, that''s for sure.
==================================


> No answer, just my own question - what''s a .snk file ? Nothing sneaky,
I hope, lol.

Hi Fergus,

It''s something quite interesting that means that my assembly''s are going
to be a damn sight more secure from crackers than they were before! It''s a
"strong named key" file,

http://www.ondotnet.com/pub/a/dotnet...ongnaming.html

I found this URL on the web while looking up RSA encryption again and
was quite suprised that I hadn''t found out about it before. It''s worth
having a look at and if you plan on distributing software, use it!
especially if you want to sell it! Seems like quite a good site that one
:-)

Nick.

--
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
"No matter. Whatever the outcome, you are changed."

Fergus - September 5th 2003
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\


这篇关于AssemblyKeyFile相对于?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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