C# Wrapper
TODO
.NET Library
Windows Keychain Core .NET library binaries are found at https://keychain.jfrog.io/artifactory/keychain-core-release-generic/windows/win32/keychain-csharp. It is supplied as a .zip file. After decompressing the file set a reference in your .NET project to the KeychainCli.dll
.
Keychain recently migrated to the JFrog platform, and we are in the process of adding existing and in-progress targets. If there are any targets you need that are not found on the site, please contact us for information on the deployment schedule for your desired targets.
Install Keychain Core for .NET in Visual Studio
The fastest way to get started with the Keychain Client for .NET is to set up the sample console application project in the Windows repository. This section provides the steps to set that project up in your own environment.
Note that in future releases, this process will leverage the NuGet package system, potentially removing the need for the steps presented here.
1. Download and save the Keychain Core for .NET package and the sample console application project.
Save and extract the package in a folder in your general project workspace. You will use the chosen path later in setting up your project. The sample console application project should be put in your normal project workspace separate from the Keychain Core for .NET package.
2. Open the sample project in Visual Studio.
3. Update the Keychain reference with the path of the Keychain Core for .NET package.
In the Solution Explorer, navigate to ConsoleApp1→References. Delete the KeychainCli reference if one exists. Add a reference to the KeychainCli.dll located in the bin folder of the recently extracted Keychain Core for .NET package.
4. Set the project’s working directory.
In the form at ConsoleApp1→Properties→Debug, browse to and select the bin folder of the recently extracted Keychain Core for .NET package.
5. Add the reference to your search path.
For debugging, you need to tell the loader where it will find the Keychain Core libraries and dependencies. In our testing, the surest way to do that is to add the path of the Keychain Core package’s bin folder to your user’s PATH environment variable.
In the Windows search box on your tool bar (typically located at the bottom of your screen), type in 'environment'. Click the Settings:Environment Variable launcher. Under 'User variables', click 'Path' and then 'Edit'. Add the path to the environment variable.
6. Add you api key to the Keychain config file.
Open the keychain.cfg file in the bin folder of the package and replace the following
ApiKey: YOURAPIKEYHERE
with
ApiKey: <apikey>
where <apikey>
is the API key you have or will be given by Keychain.
A simple sample for .NET can be downloaded here.