.NET IDE BUG?????

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Nadav

    .NET IDE BUG?????

    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\NPSP ool.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.



  • Dmitriy Lapshin [C# / .NET MVP]

    #2
    Re: .NET IDE BUG?????

    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

    Bring the power of unit testing to VS .NET IDE

    "Nadav" <Not@today.co m> wrote in message
    news:OjCiX0u9DH A.488@TK2MSFTNG P12.phx.gbl...[color=blue]
    > 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[/color]
    the[color=blue]
    > following error:
    > Cryptographic failure while signing assembly
    > 'D:\...\NPSPool \obj\Debug\NPSP ool.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[/color]
    the[color=blue]
    > two computers is the same...
    >
    > ThanX
    > Nadav.
    >
    >
    >[/color]

    Comment

    • Nadav

      #3
      Re: .NET IDE BUG?????

      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 [C# / .NET MVP]" <x-code@no-spam-please.hotpop.c om> wrote
      in message news:uCb5UWv9DH A.2308@TK2MSFTN GP11.phx.gbl...[color=blue]
      > 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" <Not@today.co m> wrote in message
      > news:OjCiX0u9DH A.488@TK2MSFTNG P12.phx.gbl...[color=green]
      > > Hi,
      > >
      > > I am compiling a C# Strong named project on two computers, on one[/color][/color]
      computer[color=blue][color=green]
      > > the project is being compiled successfully and on the other it generate[/color]
      > the[color=green]
      > > following error:
      > > Cryptographic failure while signing assembly
      > > 'D:\...\NPSPool \obj\Debug\NPSP ool.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[/color][/color]
      the[color=blue][color=green]
      > > 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[/color]
      > the[color=green]
      > > two computers is the same...
      > >
      > > ThanX
      > > Nadav.
      > >
      > >
      > >[/color]
      >[/color]


      Comment

      • Dmitriy Lapshin [C# / .NET MVP]

        #4
        Re: .NET IDE BUG?????

        No you don't need a new .snk file.

        --
        Dmitriy Lapshin [C# / .NET MVP]
        X-Unity Test Studio

        Bring the power of unit testing to VS .NET IDE

        "Nadav" <Not@today.co m> wrote in message
        news:ei5zapv9DH A.2168@TK2MSFTN GP12.phx.gbl...[color=blue]
        > 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?[/color]

        Comment

        Working...