Results 1 to 10 of 10

Thread: [RESOLVED] Add or restore a certificate for my VB.Net application

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Aug 2021
    Posts
    24

    Resolved [RESOLVED] Add or restore a certificate for my VB.Net application

    I recently had a hard drive crash and burn. Fortunately, I had the drive backed up so was able the restore the data on to another drive. One of the items was a VB.Net program I am developing and when I tried to build the application, I got the following error:

    Severity Code Description Project File Line
    Error An error occurred while signing: Failed to sign bin\Debug\app.publish\MovieCollection.exe. SignTool Error: No certificates were found that met all the given criteria. MovieCollection

    I was told that if I run Visual Basic as Administrator and then build the application it would fix it. Guess what, it didn’t work!!

    How can I fix or create a certificate for the application?

    Running on:
    HP Pavilion Desktop Model M690-034
    AMD Ryzen 7 2700 Eight-Core Processor 3.20 GHz
    Windows 11 Home 23H2

    Microsoft Visual Studio Community 2022
    Version 17.9.6
    VisualStudio.17.Release/17.9.6+34728.123

    Microsoft .NET Framework
    Version 4.8.09032

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    39,327

    Re: Add or restore a certificate for my VB.Net application

    Was the application ever signed?

    I feel that I've seen this error on unsigned applications, and that it has always just gone away, which is of no help to you. However, I've certainly seen this on signed applications, which would have a different solution. If it was signed, was it self-signed, or did you buy a certificate?

    If it was not signed, then the first thing I'd try would be to delete the bin folder and let it be recreated.
    My usual boring signature: Nothing

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Aug 2021
    Posts
    24

    Re: Add or restore a certificate for my VB.Net application

    Yes, I would guess it was. I have been working on this app for over 5 years, I created it originally in 2019 to keep track of my DVD/CD collection, and have made numerous alterations since. his problem arose after I restored it from a backup onto another drive.

  4. #4
    PowerPoster PlausiblyDamp's Avatar
    Join Date
    Dec 2016
    Location
    Pontypool, Wales
    Posts
    2,681

    Re: Add or restore a certificate for my VB.Net application

    Might be worth checking through the project properties to see if there is anything that refers to signing or strong names. If you don't care about the app being signed then you can probably just turn off those options.

  5. #5
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    39,327

    Re: Add or restore a certificate for my VB.Net application

    Quote Originally Posted by Darby View Post
    Yes, I would guess it was. I have been working on this app for over 5 years, I created it originally in 2019 to keep track of my DVD/CD collection, and have made numerous alterations since. his problem arose after I restored it from a backup onto another drive.
    If you are saying that you guess it would have been signed, you may be misunderstanding signing. It doesn't happen by accident, and it isn't something you would do for a program you were using internally. Signing is kind of annoying, in my opinion. It's all about certifying that some publicly accessible program is what it claims to be, which isn't something you generally need to worry about for internal applications. I only have to sign one program that I have written, and it annoys me every time I have to deal with it (especially since it isn't really public either).

    That's why I asked whether or not it was signed: If it was, you'd know, either because it cost you a bunch of money or a bunch of aggravation, or both.
    My usual boring signature: Nothing

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Aug 2021
    Posts
    24

    Re: Add or restore a certificate for my VB.Net application

    Bring a personal app, how would I 'turn off' those options?


    Sorry this was supposed to go to PowerPoster
    Last edited by Darby; Aug 13th, 2024 at 03:04 PM.

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Aug 2021
    Posts
    24

    Re: Add or restore a certificate for my VB.Net application

    The reason I said 'I guess it was' is because after 5+ years of working on this app I have never seen this error. As a matter of fact, in 14+ years of working with Visual Studio I cannot remember ever seeing this error.

  8. #8
    PowerPoster PlausiblyDamp's Avatar
    Join Date
    Dec 2016
    Location
    Pontypool, Wales
    Posts
    2,681

    Re: Add or restore a certificate for my VB.Net application

    On my Visual Studio if I go into the project properties there is a section for "Signing" - have a look there to see if any options are enabled.

  9. #9
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    39,327

    Re: Add or restore a certificate for my VB.Net application

    Yeah, the only way I know to sign something is on that Project Properties page, so signing by accident is mighty tough. Still, I don't think you did sign it, because I feel like I've seen the same error message you are seeing on projects that I never signed. Unfortunately, in my case the error has always gone away simply and easily.
    My usual boring signature: Nothing

  10. #10

    Thread Starter
    Junior Member
    Join Date
    Aug 2021
    Posts
    24

    Re: Add or restore a certificate for my VB.Net application

    PROBLEM SOLVED, WENT INTO PROPERTIES/SIGNING AND DISCOVERED AN OLD CERTIFICATE THAT EXPIRED LAST NOVEMBER. NOT SURE WHY IT DIDN'T GIVE A PROBLEM UNTIL NOW BUT I DISABLED IT AND EVERYTHING WORKS FINE..

    THANKS PLAUSIBLYDAMP AND SHAGGY HIKER FOR ALL OUR HELP.

    darby

Tags for this Thread

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