.NET IDE BUG?????

  • Thread starter Thread starter Nadav
  • Start date Start date
N

Nadav

Hi,

I am compiling a C# Strong named project on two computers, on one computer
the project is being compiled successfully and on the other it generate the
following error:
Cryptographic failure while signing assembly
'D:\...\NPSPool\obj\Debug\NPSPool.dll' -- 'The key container name
'.\NPSPool.sk' does not exist'

AssemblyInfo.cs include the following lines:
[assembly: AssemblyKeyFile(".\\NPSPool.sk")]
[assembly: AssemblyKeyName(".\\NPSPool.sk")]

At the minute I remove the '.\\' from the key path the project is being
compiled successfully BUT on the other computer it stop compiling with the
same error ( Cryptographic failure while signing assembly... ).

To put it short:
On one computer the project will NOT compile unless I use the following
syntax:
[assembly: AssemblyKeyFile(".\\NPSPool.sk")]
[assembly: AssemblyKeyName(".\\NPSPool.sk")]

On the other computer the project will NOT compile unless I use the
following syntax:
[assembly: AssemblyKeyFile("NPSPool.sk")]
[assembly: AssemblyKeyName("NPSPool.sk")]

Why is that happening? the directory tree (and the directory content) on the
two computers is the same...

ThanX
Nadav.
 
Hi Nadav,

One actually should use EITHER key files, OR key containers - but not both
at the same time. Assuming you use a keypair stored in a file named
NPSPool.sl, you should leave the AssemblyKeyName attribute empty.
 
Well, Still I get the same results... Does the Strong key (.snk) file is
unique on a computer basis? in other words: do I need to have a new .snk
file per computer I am compiling on?


Dmitriy Lapshin said:
Hi Nadav,

One actually should use EITHER key files, OR key containers - but not both
at the same time. Assuming you use a keypair stored in a file named
NPSPool.sl, you should leave the AssemblyKeyName attribute empty.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://www.x-unity.net/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

Nadav said:
Hi,

I am compiling a C# Strong named project on two computers, on one computer
the project is being compiled successfully and on the other it generate the
following error:
Cryptographic failure while signing assembly
'D:\...\NPSPool\obj\Debug\NPSPool.dll' -- 'The key container name
'.\NPSPool.sk' does not exist'

AssemblyInfo.cs include the following lines:
[assembly: AssemblyKeyFile(".\\NPSPool.sk")]
[assembly: AssemblyKeyName(".\\NPSPool.sk")]

At the minute I remove the '.\\' from the key path the project is being
compiled successfully BUT on the other computer it stop compiling with the
same error ( Cryptographic failure while signing assembly... ).

To put it short:
On one computer the project will NOT compile unless I use the following
syntax:
[assembly: AssemblyKeyFile(".\\NPSPool.sk")]
[assembly: AssemblyKeyName(".\\NPSPool.sk")]

On the other computer the project will NOT compile unless I use the
following syntax:
[assembly: AssemblyKeyFile("NPSPool.sk")]
[assembly: AssemblyKeyName("NPSPool.sk")]

Why is that happening? the directory tree (and the directory content) on the
two computers is the same...

ThanX
Nadav.
 
Back
Top