I am attempting trying to create an assembly with strong name
Here is what I have done:
called sn -k Tesstkey.snk
placed this code in my class:
using System.Reflection;
[assembly:AssemblyKeyFileAttribute("TestKey.snk")]
I am getting an error saying it cannot read the key file
First, Where should that .snk file go?
Second, What could cause that error?
Derrick 5 1061
Hi,
You can give absolute path also for the .snk file.
I believe VS.NET IDE looks for the .snk file in the devenv.exe folder
itself.
"Derrick" <De*************@geostrategies.ca> wrote in message
news:9LfOc.137615$ek5.83297@pd7tw2no...
I am attempting trying to create an assembly with strong name
Here is what I have done:
called sn -k Tesstkey.snk
placed this code in my class:
using System.Reflection;
[assembly:AssemblyKeyFileAttribute("TestKey.snk")]
I am getting an error saying it cannot read the key file
First, Where should that .snk file go?
Second, What could cause that error?
Derrick
Hi Derrick,
As for the making stong-named asembly issue, I think you Shiva's suggestion
that use the full absolutte path of the key file is reasonable. Since
you're using the relative path of the file(haven't specify the full path),
I'm not sure whether the problem is cause by this. Anyway, please have a
try and if you have anyother findings, please also feel free to post here.
Thanks.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Get Preview at ASP.NET whidbey http://msdn.microsoft.com/asp.net/whidbey/default.aspx
Derrick,
You can use a relative path for this, but it should be relative to the
compiled assembly, not the project file. For example, if you keep the key
file in the project root folder and your assemblies get compiled to <project
root>\bin\debug or <project root>\bin\release, then your relative path must
point up two directories. e.g.:
[assembly: AssemblyKeyFile(@"..\..\TestKey.snk")]
HTH,
Nicole
"Derrick" <De*************@geostrategies.ca> wrote in message
news:9LfOc.137615$ek5.83297@pd7tw2no... I am attempting trying to create an assembly with strong name
Here is what I have done: called sn -k Tesstkey.snk placed this code in my class: using System.Reflection;
[assembly:AssemblyKeyFileAttribute("TestKey.snk")]
I am getting an error saying it cannot read the key file
First, Where should that .snk file go? Second, What could cause that error?
Derrick
Thanks for the help.
physical path wouldn't work because I have to move the projects between
machines. I used Nicole's suggestion to use the relative path of
"..\..\file.snk", and that worked. I had the file in the \bin\release\
folder, so that should have worked, but I can work with the relative path
approach.
Derrick
"Steven Cheng[MSFT]" <v-******@online.microsoft.com> wrote in message
news:Ic**************@cpmsftngxa10.phx.gbl... Hi Derrick,
As for the making stong-named asembly issue, I think you Shiva's
suggestion that use the full absolutte path of the key file is reasonable. Since you're using the relative path of the file(haven't specify the full path), I'm not sure whether the problem is cause by this. Anyway, please have a try and if you have anyother findings, please also feel free to post here. Thanks.
Regards,
Steven Cheng Microsoft Online Support
Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.)
Get Preview at ASP.NET whidbey http://msdn.microsoft.com/asp.net/whidbey/default.aspx
Thanks, Nicole
That worked
Derrick
"Nicole Calinoiu" <ni*****@somewhere.net> wrote in message
news:OJ**************@TK2MSFTNGP09.phx.gbl... Derrick,
You can use a relative path for this, but it should be relative to the compiled assembly, not the project file. For example, if you keep the key file in the project root folder and your assemblies get compiled to
<project root>\bin\debug or <project root>\bin\release, then your relative path
must point up two directories. e.g.:
[assembly: AssemblyKeyFile(@"..\..\TestKey.snk")]
HTH, Nicole
"Derrick" <De*************@geostrategies.ca> wrote in message news:9LfOc.137615$ek5.83297@pd7tw2no...I am attempting trying to create an assembly with strong name
Here is what I have done: called sn -k Tesstkey.snk placed this code in my class: using System.Reflection;
[assembly:AssemblyKeyFileAttribute("TestKey.snk")]
I am getting an error saying it cannot read the key file
First, Where should that .snk file go? Second, What could cause that error?
Derrick
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Tony Jones |
last post by:
Can anyone think of a reason why a 3rd party vendor writing .NET components
would NOT strong name their assemblies? What harm does adding a strong-name
to assembly present - I would think none...
|
by: Leonardo D'Ippolito |
last post by:
Hello sirs,
I am trying to understand how strong names work.
Suppose I have lib.dll (a .net library), and also MyApplication.exe (a .NET
WinApp) . MyApplication uses lib.dll . Suppose someone...
|
by: Thomas W. Brown |
last post by:
If I am using the CSharpCodeProvider to dynamically compile an in-memory
assembly from some C# source, do I need to worry about signing this assembly
if I'm doing the compilation, instantiation,...
|
by: Manuel Lopez |
last post by:
Hello,
I have a Web Project (UserControls.dll) with some user controls that
is shared by many asp.net web applicattions.
What we do is copy UserControls.dll to all the applications bin...
|
by: Mark Keogh |
last post by:
Hi,
Why is everything some confusng when MS are involved ;-) Anyway, I have my
excel export routines working fine, now when I try to build them into my
assembly, which has a strong name, I get...
|
by: SStory |
last post by:
How can I strong name my assembly if it references 3rd part non-strong named
dlls?
I just want my part strong named--I don't care about their part.
Thanks,
Shane
|
by: Bruce Wood |
last post by:
I still haven't gotten through the .NET Framework Security tome on my
desk. Maybe the folks here can answer a burning question.
I want to use strong naming at our organization as a security...
|
by: John Liu |
last post by:
Recently I had to do some really nasty work (I consider any IL work
nasty) to get a set of (not strong named) 3rd party assemblies to
compile with our solution (which is strong named).
...
|
by: Tom |
last post by:
My unsigned DLL works in my project that references it as long as I
set Copy Local = true.
Now I have signed the DLL with the sn.exe generated keys but have not
yet moved the DLL into the GAC.
...
|
by: raylopez99 |
last post by:
Anybody use Strong Name Signing? I think this is used by default for
Resource files, which is one reason perhaps I can't get my resource
files to work (somehow the public key is messed up, perhaps...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |