1

Can I build the same tSQLt.zip hosted on Sourceforge by building from source? How do I do that?

I've checked out the head (currently r200) of the tSQLt SVN repository using this command:

svn checkout https://tsqlt.svn.sourceforge.net/svnroot/tsqlt tsqlt

There is a file called buildNotes.txt in the Build directory that describes a build process. The first step looks like this:

Setting up tSQLt build notes:
1. You must run MSBuild from the command line once before running the build. The reason is that the first time it prompts for the signing
password. The signing password is: P@$$30rd

This gets somehow stored internally in Windows, and will not need to
be re-entered again.

Here is an example of the MSBuild command:
c:\Projects\tSQLt.sourceforge\tSQLtCLR\tSQLtCLR>C:/Windows/Microsoft.NET/Framework/v2.0.50727/msbuild.exe tSQLtCLR.csproj /p:Configuration=Release /nologo

When I run the example command I see a password prompt:

Import key file

I paste in the password "P@$$30rd" and click OK. The password is apparently not correct:

Error importing key

The command output of msbuild looks like this:

C:\Users\iain.CORP\SkyDrive\Software\SQL Server\tSQLt\svn\tsqlt\tSQLtCLR\tSQLtCLR>C:/Windows/Microsoft.NET/Framework/v2.0.50727/msbuild.exe tSQLtCLR.csproj /p:Configuration=Release /nologo
Build started 05/04/2013 19:07:15.
__________________________________________________
Project "C:\Users\iain.CORP\SkyDrive\Software\SQL Server\tSQLt\svn\tsqlt\tSQLtCLR\tSQLtCLR\tSQLtCLR.csproj" (default targets):

Target GetFrameworkPaths:
    Could not locate the .NET Framework SDK.  The task is looking for the path to the .NET Framework SDK at the location specified in the SDKInstallRootv2.0 value of the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework.  You may be able to solve the problem by doing one of the following:  1.) Install the .NET Framework SDK.  2.) Manually set the above registry key to the correct location.
Target ResolveKeySource:
    C:\Windows\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(1728,7): error MSB3321: Importing key file "SigningKey.pfx" was canceled.
Done building target "ResolveKeySource" in project "tSQLtCLR.csproj" -- FAILED.

Done building project "tSQLtCLR.csproj" -- FAILED.

Build FAILED.
C:\Windows\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(1728,7): error MSB3321: Importing key file "SigningKey.pfx" was canceled.
    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:07.39

C:\Users\iain.CORP\SkyDrive\Software\SQL Server\tSQLt\svn\tsqlt\tSQLtCLR\tSQLtCLR>C:/Windows/Microsoft.NET/Framework/v2.0.50727/msbuild.exe tSQLtCLR.csproj /p:Configuration=Release /nologo
Build started 05/04/2013 19:07:15.
__________________________________________________
Project "C:\Users\iain.CORP\SkyDrive\Software\SQL Server\tSQLt\svn\tsqlt\tSQLtCLR\tSQLtCLR\tSQLtCLR.csproj" (default targets):

Target GetFrameworkPaths:
    Could not locate the .NET Framework SDK.  The task is looking for the path to the .NET Framework SDK at the location specified in the SDKInstallRootv2.0 value of the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework.  You may be able to solve the problem by doing one of the following:  1.) Install the .NET Framework SDK.  2.) Manually set the above registry key to the correct location.
Target ResolveKeySource:
    C:\Windows\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(1728,7): error MSB3321: Importing key file "SigningKey.pfx" was canceled.
Done building target "ResolveKeySource" in project "tSQLtCLR.csproj" -- FAILED.

Done building project "tSQLtCLR.csproj" -- FAILED.

Build FAILED.
C:\Windows\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(1728,7): error MSB3321: Importing key file "SigningKey.pfx" was canceled.
    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:07.39

The output contains the message "Could not locate the .NET Framework SDK". Is that something I have to install to make this work?

Iain Samuel McLean Elder
  • 19,791
  • 12
  • 64
  • 80

1 Answers1

0

It looks like there are really specified wrong password. You can open tSQLtCLR\tSQLtCLR.sln in the Visual Studio interface and try to type or change the password. In both cases I got "The old password is invalid" message.

Actually you do not need to exactly THIS strong name key file. Strong name is the a prerequisite for SQL CLR assembly and you can use any file, including your own. You can create new key file with same name and password and successfully build the assembly.

enter image description here

If you have Visual Studio installed you do not need the .NET Framework SDK because you can sign assembly through the interface. But if you have not VS you must install SDK to be able to use sn.exe which is part of the SDK.

I have also tried this solution, but it did not succeed too

enter image description here

Community
  • 1
  • 1
Andrey Morozov
  • 7,839
  • 5
  • 53
  • 75