none
Errors trying to upgrade Lightswitch project to VS2012

    Question

  • I have VS2012 installed on a spare machine, and have just tried opening one of my ongoing projects in it. The project opened fine, and I can see the screens, etc, but when I try and build it, I get the following 2 compiler errors and 1 warning...

    Error    1    Cannot import the following key file: . The key file may be password protected. To correct this, try to import the certificate again or import the certificate manually into the current user’s personal certificate store.    Client
    Error    2    Importing key file "ClientGenerated_1_TemporaryKey.pfx" was canceled.    Client
    Warning    3    The referenced component 'Microsoft.LightSwitch.Client.Internal' could not be found.     Client

    Anyone any idea what went wrong? I have no idea what this certificate is, nor where it came from, but I can't build the solution.

    Thanks


    FREE custom controls for Lightswitch! A collection of useful controls for Lightswitch developers. Download from the Visual Studio Gallery.

    If you're really bored, you could read about my experiments with .NET and some of Microsoft's newer technologies at http://dotnetwhatnot.pixata.co.uk/

    Sunday, October 28, 2012 3:27 PM

Answers

  • Anyone any idea what went wrong? I have no idea what this certificate is, nor where it came from, but I can't build the solution.

    The certificate that it is talking about is the signing certificate for the Silverlight XAP that is produced from the Client project. You actually created it while publishing the application on the computer from which the project originates. It was one of the publish wizard pages asking you to specify a digital signing certificate and you probably created one through the wizard and provided it a password.

    This happens for pretty much any Visual Studio project that signs the output with a certificate if you move the project to a new machine. To fix it, you have to do what the error says: "To correct this, try to import the certificate again or import the certificate manually into the current user’s personal certificate store." The certificate is in the password-protected *.pfx file mentioned in the second error. You can do this by double-clicking the *.pfx file and following the wizard instructions. Using the default options sure work fine. You need the password that you specified while creating the certificate. After importing the certificate, try building again and it should work.


    Justin Anderson, LightSwitch Development Team

    • Proposed as answer by Yann DuranModerator Monday, October 29, 2012 5:18 AM
    • Marked as answer by Mr Yossu Monday, October 29, 2012 1:52 PM
    Monday, October 29, 2012 2:00 AM
    Moderator

All replies

  • Just noticed that the certificate seems to refer to the ClientGenerated project, which doesn't exist in VS2012. I had a look on the file system, and the certificate is there.

    Anyway, I tried deleting both the ClientGenerated and ServerGenerated projects, cleaning the solution and building again, but it didn't help.

    Anyone?


    FREE custom controls for Lightswitch! A collection of useful controls for Lightswitch developers. Download from the Visual Studio Gallery.

    If you're really bored, you could read about my experiments with .NET and some of Microsoft's newer technologies at http://dotnetwhatnot.pixata.co.uk/

    Sunday, October 28, 2012 3:33 PM
  • Anyone any idea what went wrong? I have no idea what this certificate is, nor where it came from, but I can't build the solution.

    The certificate that it is talking about is the signing certificate for the Silverlight XAP that is produced from the Client project. You actually created it while publishing the application on the computer from which the project originates. It was one of the publish wizard pages asking you to specify a digital signing certificate and you probably created one through the wizard and provided it a password.

    This happens for pretty much any Visual Studio project that signs the output with a certificate if you move the project to a new machine. To fix it, you have to do what the error says: "To correct this, try to import the certificate again or import the certificate manually into the current user’s personal certificate store." The certificate is in the password-protected *.pfx file mentioned in the second error. You can do this by double-clicking the *.pfx file and following the wizard instructions. Using the default options sure work fine. You need the password that you specified while creating the certificate. After importing the certificate, try building again and it should work.


    Justin Anderson, LightSwitch Development Team

    • Proposed as answer by Yann DuranModerator Monday, October 29, 2012 5:18 AM
    • Marked as answer by Mr Yossu Monday, October 29, 2012 1:52 PM
    Monday, October 29, 2012 2:00 AM
    Moderator
  • Hi Justin,

    Thanks for the reply. I didn't realise that I needed the certificate just to build the project. I thought it was only for when you publish the app.

    Anyway, installing the certificate fixed the problem. Now I can play with VS2012 a bit more!

    Thanks again.


    FREE custom controls for Lightswitch! A collection of useful controls for Lightswitch developers. Download from the Visual Studio Gallery.

    If you're really bored, you could read about my experiments with .NET and some of Microsoft's newer technologies at http://dotnetwhatnot.pixata.co.uk/

    Monday, October 29, 2012 1:52 PM