Hi,
I'm trying to finish my
pull request and can't set the project anymore.
When I try to run the project build, I'm getting following error:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Csc.exe /noconfig /nowarn:1701,1702 /nostdlib+ /platform:AnyCPU /errorreport:prompt /define:TRACE /highentropyva- /reference:C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorlib.dll /reference:C:\Windows\Microsoft.NET\Framework64\v2.0.50727\System.Data.dll /reference:C:\Windows\Microsoft.NET\Framework64\v2.0.50727\System.dll /reference:C:\Windows\Microsoft.NET\Framework64\v2.0.50727\System.Transactions.dll /reference:C:\Windows\Microsoft.NET\Framework64\v2.0.50727\System.Xml.dll /debug:pdbonly /optimize+ /out:obj\CruiseControl\tSQLtCLR.dll /target:library /utf8output Annotations.cs AssemblyCopyright.cs AssemblyInfo.cs CommandExecutor.cs CommandExecutorException.cs OutputCaptor.cs tSQLtPrivate.cs InvalidResultSetException.cs MetaDataEqualityAsserter.cs ResultSetFilter.cs StoredProcedures.cs TestDatabaseFacade.cs
[exec] AssemblyInfo.cs(35,12): warning CS1699: Use command line option '/keycontainer' or appropriate project settings instead of 'System.Reflection.AssemblyKeyNameAttribute' [C:\Users\dkult\OneDrive\Docs\Sources\tSQLt-1\tSQLtCLR\tSQLtCLR\tSQLtCLR.csproj]
[exec] CSC : error CS1548: Cryptographic failure while signing assembly 'c:\Users\dkult\OneDrive\Docs\Sources\tSQLt-1\tSQLtCLR\tSQLtCLR\obj\CruiseControl\tSQLtCLR.dll' -- 'The key container name 'tSQLt_OfficialSigningKey' does not exist' [C:\Users\dkult\OneDrive\Docs\Sources\tSQLt-1\tSQLtCLR\tSQLtCLR\tSQLtCLR.csproj]
[exec] Done Building Project "C:\Users\dkult\OneDrive\Docs\Sources\tSQLt-1\tSQLtCLR\tSQLtCLR\tSQLtCLR.csproj" (default targets) -- FAILED.
[exec]
[exec] Build FAILED.
[exec]
[exec] "C:\Users\dkult\OneDrive\Docs\Sources\tSQLt-1\tSQLtCLR\tSQLtCLR\tSQLtCLR.csproj" (default target) (1) ->
[exec] (CoreCompile target) ->
[exec] AssemblyInfo.cs(35,12): warning CS1699: Use command line option '/keycontainer' or appropriate project settings instead of 'System.Reflection.AssemblyKeyNameAttribute' [C:\Users\dkult\OneDrive\Docs\Sources\tSQLt-1\tSQLtCLR\tSQLtCLR\tSQLtCLR.csproj]
[exec]
[exec]
[exec] "C:\Users\dkult\OneDrive\Docs\Sources\tSQLt-1\tSQLtCLR\tSQLtCLR\tSQLtCLR.csproj" (default target) (1) ->
[exec] (CoreCompile target) ->
[exec] CSC : error CS1548: Cryptographic failure while signing assembly 'c:\Users\dkult\OneDrive\Docs\Sources\tSQLt-1\tSQLtCLR\tSQLtCLR\obj\CruiseControl\tSQLtCLR.dll' -- 'The key container name 'tSQLt_OfficialSigningKey' does not exist' [C:\Users\dkult\OneDrive\Docs\Sources\tSQLt-1\tSQLtCLR\tSQLtCLR\tSQLtCLR.csproj]
[exec]
[exec] 1 Warning(s)
[exec] 1 Error(s)
I created certificate with no password:
"C:\Program Files\OpenSSL-Win64\bin\openssl.exe" req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout key.pem -out cert.pem
"C:\Program Files\OpenSSL-Win64\bin\openssl.exe" pkcs12 -inkey key.pem -in cert.pem -export -out tSQLtOfficialSigningKey.pfx
Then I copied tSQLtOfficialSigningKey.pfx file to tSQLtCLR\OfficialSigningKey. Tried to run Import-PfxCert.ps1 (seems that it passed, but probably this step isn't needed) and also executed InstallSigningKey.bat file (it asked for password)