none
Visual Studio 2010 Click once error An error occurred while signing Hexadecimal value 0x1F is an invalid character

    Question

  • Need help figuring out why i cannot deploy my Project. The solution builds successfully but getting this error when trying to Publish. I tried changing publish location to local file folder and same error. No file name specified in the error list, so i dont even know where to start looking. I verified that I have a valid certificate that is not expired and selected from my local store on my laptop the certificate is installed correctly. I was able to publish this same application previously, something changed but i cannot find the issue.  Any help i can get troubleshooting this I would be very grateful! Thanks!

    an error occurred while signing hexadecimal 0x1f, is an invalid character  Line 4 Position 108

    My laptop specs Dell Studio, Windows 7 Ultimate, Visual Studio 2010 Ultimate.

     

    Wednesday, February 16, 2011 2:52 AM

Answers

  • Yes, that field DOES come from the Assembly name. If you are using C#, open the Assembly.cs file and check it out. Does it show something funky in the assembly name field? In case it's some kind of escape character, try deleting everything between the two quote marks, including the quote marks, and typing it back in, and see if that helps at all. Also, are you using any non-alphanumeric characters in your assembly name like % or ! or something like that?

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    Wednesday, February 23, 2011 9:31 AM
  • Robin, I was using an Underscore in the Assembly name at one point "appname_Test".  I took it out a while ago, but maybe that _ character was the issue in the Assembly name. Yes all is working now. thanks All.
    Wednesday, February 23, 2011 6:19 PM
  • Hi Aaron,

    Just to try to track down the problem, if you uncheck the "sign the clickonce manifests" box in the Signing tab for your project properties, and then publish it, does it work? Just wondering if your certificate is corrupted or something. Can you remove it from the certificate store and reinstall it from the original certificate?

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    • Marked as answer by AaronBrock Thursday, February 17, 2011 3:14 PM
    Thursday, February 17, 2011 9:10 AM
  • Hi AaronBrock,

     

    Do you mean you got it working?

     

    I think the probable cause is you have typed a Illegal characters to the Assembly name in the project property page. Or in the AssemblyInfo.cs file. Maybe you can have a try to check them.

     

    If there's any concern, please feel free to let me know.

     

    Best wishes,


    Mike [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, February 21, 2011 6:38 AM

All replies

  • Hi AaronBrock,

     

    I think a screen shot will help us quick clear about your problem.

    The way for posting an image:

    You can upload the image into your windows live space, then open this image in your space, select this image and copy it into the reply textbox, and then you can submit an image in your post.(Or past the image link in the reply)

     

    And can you provide the file which mentioned in the error message?

    I think we need to have a check at the position("Line 4 Position 108") in that file mentioned in the error message you provided.

     

    If there's any concern, please feel free to let me know.

     

    Best wishes,


    Mike [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, February 16, 2011 4:22 PM
  • I can send a screenshot of the error later. For now I can tell you that there is No file specified in the errors list, i would definitly track down Line 4 Position 108 in the file causing the invalid character but No file is listed in that column in the errors.

    Thanks for your response!!

    Wednesday, February 16, 2011 6:50 PM
  • Hi Aaron,

    Just to try to track down the problem, if you uncheck the "sign the clickonce manifests" box in the Signing tab for your project properties, and then publish it, does it work? Just wondering if your certificate is corrupted or something. Can you remove it from the certificate store and reinstall it from the original certificate?

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    • Marked as answer by AaronBrock Thursday, February 17, 2011 3:14 PM
    Thursday, February 17, 2011 9:10 AM
  • Robin, That was the issue, I unchecked "sign the clickonce manifests" and published and it worked fine. So i definitly had a corrupt certificate. I need to research how to reinstall a certifiicate, this particular project is deployed to one client so no issue of trust, thus the Certificate is not required. But i will still reinstall it so its working again. Thanks for your assistance!!

     

     

    Thursday, February 17, 2011 3:09 PM
  • Cool. If you have the certificate file (usually a .cer or .pfx file), you can just double-click on it to import it into the certificate store.

    If it's a .cer with a .pvk file, you can turn it into a .pfx file -- google for "convert cer to pfx" (that's how I figured it out last time). Then you can select "add from file" and select the pfx file, and Visual Studio will use it.

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    Thursday, February 17, 2011 6:13 PM
  • Well I am still struggling with this, I was able to publish the application when I didnt click Sign the click once manifest but once the application is run on a clients desktop i am getting security errors with the. I suppose since it was published and signed with a certificate now I publish again and remove the signing its probably not liking that. I cannot publish if I try and use the certificate the project was published under prevously. I am next going to try and remove the certificate and reinstall it, but the issue I will have there is most like the client will need to uninstall and reinstall the application and i dont want to put that burden on them. If the cerficate is corrupt (which i suspect it is) what are my options?

    Thanks!

     

     

    Friday, February 18, 2011 2:57 AM
  • I ended up deleting all certificates using certmgr, now i created a test certificate and even using a test certificate I cannot publish. something is corrupt and i have no idea what that is. I dont know what my next step is going to be almost thinking I should try and uninstall/reinstall visual studio 2010 Ultimate? thoughts?

    Friday, February 18, 2011 3:34 AM
  • I found where the invalid character error is stemming from, no idea what is putting these values in the Assembly product name entry in that Application file. Here is the line (I replaced the actual name of the app with appname) I do not see those characters in the Product Name under Assembly Information, Product. If I remove those characers and try to publish again something is putting them back, under the debug folder the AppName.application file has those characters.

     <description asmv2:publisher="PublisherName" co.v1:suiteName="SuiteName" asmv2:product="AppName&#x1F;" xmlns="urn:schemas-microsoft-com:asm.v1" />

    Friday, February 18, 2011 4:14 AM
  • Hi AaronBrock,

     

    Do you mean you got it working?

     

    I think the probable cause is you have typed a Illegal characters to the Assembly name in the project property page. Or in the AssemblyInfo.cs file. Maybe you can have a try to check them.

     

    If there's any concern, please feel free to let me know.

     

    Best wishes,


    Mike [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, February 21, 2011 6:38 AM
  • Yes, that field DOES come from the Assembly name. If you are using C#, open the Assembly.cs file and check it out. Does it show something funky in the assembly name field? In case it's some kind of escape character, try deleting everything between the two quote marks, including the quote marks, and typing it back in, and see if that helps at all. Also, are you using any non-alphanumeric characters in your assembly name like % or ! or something like that?

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    Wednesday, February 23, 2011 9:31 AM
  • Robin, I was using an Underscore in the Assembly name at one point "appname_Test".  I took it out a while ago, but maybe that _ character was the issue in the Assembly name. Yes all is working now. thanks All.
    Wednesday, February 23, 2011 6:19 PM
  • Cool. So you went and edited the name, and now it works fine? That's awesome.

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    Thursday, February 24, 2011 8:05 AM
  • Hi,

    I think my direction is right!

    Though I use a "non-English character", it should be "Illegal characters", and I have corrected it in my post.

    Thanks Robin for your explain.

    Have a nice day!


    Mike [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, February 25, 2011 6:53 AM