Wednesday, September 30, 2009

Most useful GPG Commands : you wont find this anywhere else on internet !

I spent more than 2 days to explore these commands on my own. No documentation, no forum, no post will explain below given points:

1. How to use passphrase in batch command ?

gpg -o "C:\Data_Readable.txt" --batch --passphrase-fd 0 < "C:\My_Passphrase.txt" -d "C:\Data_Encrypted.txt"

i.e. Passphrase is stored in a predefined file and its read from there.


2. How to use Fingerprint in delete batch command?

You banged your head against the wall and still getting below given error

gpg: key "61ED 3960 36C8 F91A 406B BEA0 4D3C 8843 3D2D 1636" not found: Unknown system error
gpg: 61ED 3960 36C8 F91A 406B BEA0 4D3C 8843 3D2D 1636: delete key failed: Unknown system error

Here is the right BATCH DELETE command:

gpg --batch --yes --delete-secret-and-public-key 61ED396036C8F91A406BBEA04D3C88433D2D1636

i.e. Fingerprint should not contain any spaces in between.

| namaste from Anugrah

Wednesday, September 16, 2009

Not able to run UnitTest cases when you open your project from shared location ?

Hi All,

I am using Integrated Unit Testing framework of Visual Studio 2008 (i.e. Microsoft.VisualStudio.QualityTools.UnitTestFramework). Recently I faced this issue(in heading/subject) when I opened my project from a dynamic view of clearacse(basically a shared drive)

The actual error which I got was: UTA057: The test 'XXX' cannot be executed because the assembly 'XXX.dll' is not fully trusted by .NET Framework Security Policy. Please use a local directory as the deployment directory for the test run, or use the .NET Framework Configuration tool to grant this assembly the Full Trust permission, and then try again.

The project I was testing is a class library and quick solution for this problem which I got is to uncheck the ENABLE DEPLOYMENT checkbox in LocalTestRun.testrunconfig.

If you don’t want to open this file in VS2008 then you can directly open the file in notepad add following tag <Deployment enabled="false" /> . By default deployment is enabled and the line mentioned above does not exist in this file.

I still need to check that what is the usage of enabling Deployment in this context. If you have used it then do send me comments.

But for now Happy Unit Testing and better development :)

| Anugrah Atreya