Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error signing output with public key from file 'key.pfx' -- Value does not fall within the expected range

I am getting following error in VS2015 when trying to compile a c# project that uses code signing. I didn't get this error in VS2013.

Also there is no information on this error anywhere.

like image 683
Mayank Avatar asked Jul 21 '15 17:07

Mayank


2 Answers

I had this problem. You can open CommonAssemblyInfo.cs and remove the line [assembly: AssemblyKeyFile(@"C:\KeyFile.snk")] :)

like image 62
Soroush Khosravi Avatar answered Nov 14 '22 23:11

Soroush Khosravi


I had more or less the same issue with VS 2019 while building a project, but with a .snk file, for a project containing the source code from datalust Superpower that I needed to evaluate and debug: Error signing output with public key from file '../../asset/Superpower.snk' -- File not found

The CommonAssemblyInfo.cs did not contain any line [assembly: AssemblyKeyFile(@"....snk")]

The solution was to unselect "Sign the assembly" in the properties of the project: VS project sign the assembly

like image 28
Sandra Rossi Avatar answered Nov 14 '22 23:11

Sandra Rossi