Results 1 to 17 of 17

Thread: [2005] New PC - Now SNK will not work

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2006
    Posts
    910

    [2005] New PC - Now SNK will not work

    Hi,
    I recently got a new PC and re-installed VS2005. When I opened my project, I get two warnings now that will not let me build. One says "The key file 'StrongNameKey.snk' does not contain a public/private key pair." and the second one says "The referenced component 'MSDASC' could not be found. The key file 'StrongNameKey.snk' does not contain a public/private key pair." Any ideas on how to fix these? It worked fine before I switched PC's.
    Thanks!

  2. #2
    Frenzied Member
    Join Date
    Jun 2005
    Posts
    1,950

    Re: [2005] New PC - Now SNK will not work

    Did you previously generate snk files (using sn) on your old computer?

    Also, do you have a reference to your snk file in your project?, so are some lines like this present?

    Code:
    Imports System.Reflection
    <Assembly: AssemblyDelaySign(False)> 
    <Assembly: AssemblyKeyFile("..\..\..\MyKeys\My.snk")>

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2006
    Posts
    910

    Re: [2005] New PC - Now SNK will not work

    Yes it was created on my previous PC. I don't remember adding references to it though. I did add the .snk file itself to my project though and then in the properties of my project on the "Signing" tab, I set the "Choose strong name key file" to my .snk file that is in my project.
    Last edited by jre1229; Apr 5th, 2007 at 12:54 PM.

  4. #4
    Frenzied Member
    Join Date
    Jun 2005
    Posts
    1,950

    Re: [2005] New PC - Now SNK will not work

    So if you clear that option, does your project then open without any errors? If so that suggests that the file path on Project -> Properties -> Signing is either somehow not found or has been corrupted.

    I would suggest either copying the snk file and DLL from your previous PC or regenerating the snk file on the new PC. Some info on how to do it is here...

    http://msdn2.microsoft.com/en-us/lib...23(vs.80).aspx

    http://msdn.microsoft.com/msdnmag/is...t/default.aspx

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2006
    Posts
    910

    Re: [2005] New PC - Now SNK will not work

    Bulldog, If I clear that option I get 20 various warnings instead of 2.

  6. #6
    Frenzied Member
    Join Date
    Jun 2005
    Posts
    1,950

    Re: [2005] New PC - Now SNK will not work

    ok, so it looks like your project is somehow expecting the snk files to be present. This is normally controlled by the lines

    Code:
    Imports System.Reflection
    <Assembly: AssemblyDelaySign(False)> 
    <Assembly: AssemblyKeyFile("..\..\..\MyKeys\My.snk")>
    I think the best course of action would be to regenerate your snk file and copy the required DLL from your old computer.

  7. #7
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: [2005] New PC - Now SNK will not work

    are you running this project from the same exact directory structure path as your last PC?

    the snk files property that Bulldog is talking about is pretty tempermental about directory paths..

    make sure its pointing to the correct place still... or in the project properties window you can reset the snk file via the GUI.

  8. #8

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2006
    Posts
    910

    Re: [2005] New PC - Now SNK will not work

    Hi Kleinma, Yes the directory structure is exactly the same. The path is no different than before. What is the MSDASC file? It's a reference but I am not sure why it's there. If I delete it thought it says that it failed building the mainfest and won't do anything.

  9. #9
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: [2005] New PC - Now SNK will not work

    Was this project using any interop from COM? I am pretty sure MSDASC has something to do with datalinks and ADO.

    I saw this article which states:

    When you add a COM component to a .NET project an assembly with an Interop prefix is added to the project. For example, adding the service component adds a dynamically generated wrapper for the COM component named Interop.MSDASC.dll. This Interop assembly is generated and compiled using the CodeDOM behind the scenes, and you will need to deploy the COM DLL and the Interop assembly with you application.
    If you are, maybe you just need to remove and readd any COM references in this project (especially any ones that have to do with data)

  10. #10

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2006
    Posts
    910

    Re: [2005] New PC - Now SNK will not work

    Kleinma,
    If it is using an interop from a COM object then I wasn't aware of it when I added it. I already tried replacing the reference but my old reference just says MSDASC and when I add a new one it says Interop.MSDASC.dll

  11. #11
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: [2005] New PC - Now SNK will not work

    well lets start with the basics.

    When I have an issue I can't resolve, I slowly peel away layers until I narrow down the issue, isolate it, and that makes it easier to fix.

    1) Does this app connect to any type of database? If so, how are you making your connections?

    2) What non standard (aka not .net framework) references are using in any of the projects that are part of the solution?

  12. #12

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2006
    Posts
    910

    Re: [2005] New PC - Now SNK will not work

    Yes my app connects to an Access DB. I use this as my connection string:

    Code:
     cn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
    Source=" & DBpath & ";Jet OLEDB:Database Password=*****;")
    Then I create my dataadapters and datasets in my code like this:

    Code:
    Dim da As New OleDbDataAdapter("SELECT * FROM tblAccess WHERE UserName = ?", cn) 
    Dim ds As New DataSet
    As for the references, I didn't think I was using any non .net framework references.

  13. #13
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: [2005] New PC - Now SNK will not work

    Quote Originally Posted by jre1229

    As for the references, I didn't think I was using any non .net framework references.
    you can double check this by going into the project properties, and clicking the references tab. Is there anything in there that looks out of place?

    maybe post what references it does have

  14. #14

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2006
    Posts
    910

    Re: [2005] New PC - Now SNK will not work

    Kleinma, There are two that say <The system cannot find the reference specified> in the path. They are Microsoft ActiveX Data Objects 2.7 Library version 2.7.0.0 and Microsoft OLE DB Service Component 1.0 Type Library version 1.0.0.0 and both are COM references.

  15. #15
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: [2005] New PC - Now SNK will not work

    Well do you know why you might be using those references? Just about anything you would need to use a reference to ADO 2.7 for has been built into the system.data namespace classes of the .NET framework.

    Was this app upgraded from a VB6 app?

  16. #16

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2006
    Posts
    910

    Re: [2005] New PC - Now SNK will not work

    I have no clue why it would be using those references. But if I delete them it says this. I can delete the ActiveX data objects one but if I delete the other one it gets rid of my warnings and give me the error "Error Creatings Assembly Manifest. Access is denied." and it won't build or anything.

  17. #17

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2006
    Posts
    910

    Re: [2005] New PC - Now SNK will not work

    I just found another problem also. If I try to open any of my forms in design view it pops up with an error that says "There is no editor available for 'C:\Documents and Settigns\User\Desktop\APPNAME\FORMNAME.vb'. 'Make sure the application for the file type (.vb) is installed.'

    Whats up with that? My other applications open fine in design view.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width