MSB3322 on signing assembly on Visual Studio for Mac with pfx - xamarin

On Visual Studio for Mac 7.1, I am trying to build a project that builds fine on Visual Studio 20176 Update 3.
The first error on a project file is:
Target ResolveKeySource:
/Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(3103,5): error MSB3322: Unable to get MD5 checksum for the key file "../xxx.pfx". Could not find file "/Users/PATH/xxx.pfx".
Done building target "ResolveKeySource" in project "yyy" -- FAILED.
The pfx actually exists and is readable.
With more logging enabled, it reads:
error MSB4018: The "ResolveKeySource" task failed unexpectedly.
error MSB4018: System.NotSupportedException: Specified method is not supported.
error MSB4018: at System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeInterfaceAsObject (System.Guid clsid, System.Guid riid) [0x00006] in /private/tmp/source-mono-d15-3/bockbuild-d15-3/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/interopservices/runtimeenvironment.cs:204
error MSB4018: at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
error MSB4018: at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in /private/tmp/source-mono-d15-3/bockbuild-d15-3/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/corlib/System.Reflection/MonoMethod.cs:305
I've been playing around with changing the file format for signing, but would like to have one solution that builds easily on Windows and Mac.
Is there a solution with one file format for signing the assemblies?

I just recompiled some old signing-based Xamarin.Android apps w/ the latest Xamarin versions using msbuild/csc and .pfx just do not work (unless there is some magic I am missing).
But converting the .pfx to a .snk to extract the public key worked fine, use the mono version of "StrongName utility for signing assemblies" (sn) on macOS:
sn -p certificate.pfx certificate.snk
It will prompt you for the password, use the resulting .snk file instead. The .snk file will work fine on Windows also.

Related

System.Exception: Did not find MSBuild for runtime Mono

I'm compiling the sources in Visual Studio Community 2017 for Mac and I've got the following error:
Building: ServiceLayer.API (Debug)
Error: Build failed. See the build log for details. (ServiceLayer.API)
---------------------- Done ----------------------
Build failed.
Build: 1 error, 0 warnings
In Ide.log log file, I've the following entry:
ERROR [2017-10-08 20:20:45Z]: Inspector does not support this project type
ERROR [2017-10-08 20:20:45Z]: Build failed.
System.Exception: Did not find MSBuild for runtime Mono 4.0.2 (c99aa0c)
at MonoDevelop.Projects.MSBuild.MSBuildProjectService.GetNewestInstalledToolsVersion (MonoDevelop.Core.Assemblies.TargetRuntime runtime, System.Boolean requiresMicrosoftBuild, System.String& binDir) [0x0006e] in /Users/builder/data/lanes/5144/cab57de4/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/MSBuildProjectService.cs:1087
at MonoDevelop.Projects.MSBuild.MSBuildProjectService+<GetProjectBuilder>d__100.MoveNext () [0x00133] in /Users/builder/data/lanes/5144/cab57de4/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/MSBuildProjectService.cs:1116
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:151
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128
at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:357
at MonoDevelop.Projects.Project+<GetProjectBuilder>d__157.MoveNext () [0x001bb] in /Users/builder/data/lanes/5144/cab57de4/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/Project.cs:1418
...
ERROR [2017-10-08 20:21:16Z]: An unhandled exception has occured. Terminating Visual Studio? False
Notes: In total like 381 lines on each attempt to build. 'End of stack trace' line is repeated 52 times.
This pointed me to this line in MonoDevelop (see: MSBuildProjectService.cs):
throw new Exception ("Did not find MSBuild for runtime " + runtime.Id);
I've checked and msbuild command exist in the command-line:
$ which msbuild
/Library/Frameworks/Mono.framework/Versions/Current/Commands/msbuild
$ msbuild --version
Microsoft (R) Build Engine version 15.4.0.0 (master/f296e67b Thu Sep 21 19:38:16 EDT 2017) for Mono
$ stat /Library/Frameworks/Mono.framework/Versions/Current
File: /Library/Frameworks/Mono.framework/Versions/Current -> /Library/Frameworks/Mono.framework/Versions/5.4.0
What I've tried so far:
I've tested both channels (Stable and Beta) in Visual Studio Update without success.
I've tried to Clean All and Rebuild All.
I've tried to remove the cache files in ~/Library/Caches/VisualStudio.
Reinstalling VisualStudio.
I've checked in Visual Studio, Preference..., Projects, .NET Runtimes and I've the latest Mono set as Default (to 5.4.x):
However when debugging, it's trying to open msbuild for 4.0.2 instead, e.g.:
$ sudo fs_usage -f pathname VisualStudio | grep -i msbuild
12:34:38 stat64 /Library/Frameworks/Mono.framework/Versions/4.0.2/lib/mono/msbuild>>>>>>>>>>>>>>>>>>>>>> 0.000007 VisualStudio
12:34:38 lstat64 /Library/Frameworks/Mono.framework/Versions/4.0.2/lib/mono/msbuild>>>>>>>>>>>>>>>>>>>>>> 0.000002 VisualStudio
12:34:38 access /Library/Frameworks/Mono.framework/Versions/4.0.2/lib/mono/msbuild>>>>>>>>>>>>>>>>>>>>>> 0.000002 VisualStudio
which doesn't exist.
How should I add a missing MSBuild to my Solution (project) (as per mentioned error)?
Mono 4.0.2 did not have msbuild, it was included in 4.8.0+ . Check where does /Library/Frameworks/Mono.framework/Versions/Current (symlink) point to. It probably points to some mono 5.x.y . Try changing the .NET runtime that VSMac is set to use in Preferences -> Projects -> .NET Runtimes, to the latest one.
For some reason it is still looking it in 4.0.2. I would try to, at least temporarily, remove that 4.0.2 directory and then check. But otherwise I think your installation is broken and I would try to reinstall the whole thing (VSMac, Mono, ..).
Also, check in your Ide.log file for any references to 4.0.2, before that exception.
If you run into the same issue even with a fresh install, then please file a bug at bugzilla.xamarin.com and we can try to debug it there.

MonoDevelop.AddinMaker - 'MonoDevelop.Core,5.10' is disabled

I am working on an MonoDevelop Addin (using MonoDevelop.AddinMaker) within Tamarin Studio and MonoDevelop and everything was fine, till I needed to access the GTK# Toolbox to fix some existing GUI panels (originally from the CSharpBinding GUIs).
The GTK# Widget that is referenced in those panels are in MonoDevelop.Ide.dll, so I added that to the GTK# ToolBox and the widgets show up. But the build generates invalid partial classes due to missing widget reference (MonoDevelop.Ide) and that reference is not available via the AddinMaker's Addin References system so I added a manual assembly reference to MonoDevelop.Ide.dll.
Now the debugging of the Addin fails with:
ERROR [2015-11-22 11:47:39Z]: Add-in error (MonoDevelop.Ide,5.10): Add-in could not be loaded: The required addin 'MonoDevelop.Core,5.10' is disabled.
Mono.Addins.MissingDependencyException: The required addin 'MonoDevelop.Core,5.10' is disabled.
at Mono.Addins.AddinEngine.ResolveLoadDependencies (System.Collections.ArrayList addins, System.Collections.Stack depCheck, System.String id, Boolean optional) in /Users/builder/data/lanes/2103/7c46a0b7/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins/AddinEngine.cs:line 597
at Mono.Addins.AddinEngine.ResolveLoadDependencies (System.Collections.ArrayList addins, System.Collections.Stack depCheck, System.String id, Boolean optional) in /Users/builder/data/lanes/2103/7c46a0b7/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins/AddinEngine.cs:line 612
ERROR [2015-11-22 11:47:39Z]: Add-in error (MonoDevelop.Core,5.10): Disabled add-ins can't be loaded.
Loaded assembly: /Applications/Xamarin Studio.app/Contents/Resources/lib/monodevelop/bin/Mono.Addins.CecilReflector.dll [External]
Thread started: #3
Unloaded assembly: /Applications/Xamarin Studio.app/Contents/Resources/lib/monodevelop/bin/Mono.Addins.CecilReflector.dll
Thread finished: #3
System.InvalidOperationException: Extension node not found in path: /MonoDevelop/Core/WebCredentialProviders
at Mono.Addins.ExtensionContext.GetExtensionObjects[T] (System.String path, Boolean reuseCachedInstance) in /Users/builder/data/lanes/2103/7c46a0b7/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins/ExtensionContext.cs:line 636
at Mono.Addins.ExtensionContext.GetExtensionObjects[T] (System.String path) in /Users/builder/data/lanes/2103/7c46a0b7/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins/ExtensionContext.cs:line 607
at Mono.Addins.AddinManager.GetExtensionObjects[T] (System.String path) in /Users/builder/data/lanes/2103/7c46a0b7/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins/AddinManager.cs:line 630
at MonoDevelop.Core.WebRequestHelper.Initialize () in /Users/builder/data/lanes/2103/7c46a0b7/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Core/WebRequestHelper.cs:line 49
at MonoDevelop.Core.Runtime.Initialize (Boolean updateAddinRegistry) in /Users/builder/data/lanes/2103/7c46a0b7/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Core/Runtime.cs:line 118
Starting Xamarin Studio
FATAL ERROR [2015-11-22 11:47:42Z]: Xamarin Studio failed to start. Some of the assemblies required to run Xamarin Studio (for example gtk-sharp)may not be properly installed in the GAC.
System.InvalidOperationException: Extension node not found in path: /MonoDevelop/Core/PlatformService
at Mono.Addins.ExtensionContext.GetExtensionObjects (System.String path, System.Type arrayElementType, Boolean reuseCachedInstance) in /Users/builder/data/lanes/2103/7c46a0b7/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins/ExtensionContext.cs:line 669
at Mono.Addins.ExtensionContext.GetExtensionObjects (System.String path) in /Users/builder/data/lanes/2103/7c46a0b7/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins/ExtensionContext.cs:line 534
at Mono.Addins.AddinManager.GetExtensionObjects (System.String path) in /Users/builder/data/lanes/2103/7c46a0b7/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins/AddinManager.cs:line 554
at MonoDevelop.Ide.DesktopService.Initialize () in /Users/builder/data/lanes/2103/7c46a0b7/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/DesktopService.cs:line 56
at MonoDevelop.Ide.IdeStartup.Run (MonoDevelop.Ide.MonoDevelopOptions options) in /Users/builder/data/lanes/2103/7c46a0b7/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdeStartup.cs:line 175
at MonoDevelop.Ide.IdeStartup.Main (System.String[] args, MonoDevelop.Ide.Extensions.IdeCustomizer customizer) in /Users/builder/data/lanes/2103/7c46a0b7/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdeStartup.cs:line 652
I removed the assembly reference, removed the GTK Toolbox MonoDevelop components/widget, etc.. but the problem persists.
MonoDevelop and Xamarin Studio run fine by themselves, so how do I re-enable(?) the MonoDevelop.Core addin in the AddinMaker Project?
I would try deleting the addin-db-002 directory (might be called
something different) which is inside the directory of your addin's
bin/Debug directory. – Matt Ward
That was actually the problem, the addin-db-002 does not cleaned up on a Clean All, nor does it get a complete update on a Build All.
So once you have a 'corrupt' list of addin's within the sub-dir of ./addin-data/1 they do not get re-created unless you manually delete the addin-db-002.

Running websharper.ui.next on OSx complains with a mcs error

I've got a websharper project that runs flawlessly on windows. However it only compiles flawlessly on mac but can't be run. The webserver complains that it can find a file (doesn't name it) and reading the stacktrace it seems to be the C# compiler complaining. However being an F# project that's somewhat surprising.
System.SystemException
Error running mcs: Cannot find the specified file
Description: HTTP 500.Error processing request.
Details: Non-web exception. Exception origin (name of application or object): System.
Exception stack trace:
at Mono.CSharp.CSharpCodeCompiler.CompileFromFileBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x00135] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs:216
at Mono.CSharp.CSharpCodeCompiler.CompileAssemblyFromFileBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x00011] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs:136
at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromFile (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x00014] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/mcs/class/System/System.CodeDom.Compiler/CodeDomProvider.cs:111
at System.Web.Compilation.AssemblyBuilder.BuildAssembly (System.Web.VirtualPath virtualPath, System.CodeDom.Compiler.CompilerParameters options) [0x002e8] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/mcs/class/System.Web/System.Web.Compilation/AssemblyBuilder.cs:822
at System.Web.Compilation.AssemblyBuilder.BuildAssembly (System.Web.VirtualPath virtualPath) [0x00000] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/mcs/class/System.Web/System.Web.Compilation/AssemblyBuilder.cs:731
at System.Web.Compilation.BuildManager.GenerateAssembly (System.Web.Compilation.AssemblyBuilder abuilder, System.Web.Compilation.BuildProviderGroup group, System.Web.VirtualPath vp, Boolean debug) [0x00264] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/mcs/class/System.Web/System.Web.Compilation/BuildManager.cs:826
at System.Web.Compilation.BuildManager.BuildInner (System.Web.VirtualPath vp, Boolean debug) [0x0011c] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/mcs/class/System.Web/System.Web.Compilation/BuildManager.cs:451
at System.Web.Compilation.BuildManager.Build (System.Web.VirtualPath vp) [0x00056] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/mcs/class/System.Web/System.Web.Compilation/BuildManager.cs:396
at System.Web.Compilation.BuildManager.GetCompiledType (System.Web.VirtualPath virtualPath) [0x00040] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/mcs/class/System.Web/System.Web.Compilation/BuildManager.cs:989
at System.Web.Compilation.BuildManager.GetCompiledType (System.String virtualPath) [0x00000] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/mcs/class/System.Web/System.Web.Compilation/BuildManager.cs:972
at System.Web.HttpApplicationFactory.InitType (System.Web.HttpContext context) [0x0016b] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/mcs/class/System.Web/System.Web/HttpApplicationFactory.cs:417
ANy suggestions to what could be the root of this problem?
Seems like a mono installation issue. A similar exception is happening in this ticket: https://forums.xamarin.com/discussion/50713/error-running-mcs-cannot-find-the-specified-file
Upgrading to mono 4.2 alpha resolves the issue. I do however think it can be solved with 4.0 as well since I have had the same web site running on a different Mac without installing 4.2

mdtool Did not find registered GTK# installation

I'm new to Xamarin Studio and mdtool so apologies for the noob question but I'm completely stuck on this and my Google searches aren't finding the answer to my problem.
Basically our solution builds perfectly in Xamarin Studio and now I need to run it from the command line so I can put it into our standard buildsystem but I appear to have missed something in the setup or configuration as it complains about the fact that it cannot find a registered GTK# installation.
I have installed Mono for windows 2.10.9 which contains GTK# 2.12.11 but I have also installed the standalone GTK# 2.12.20 because our developer says he has that installed and it is all installed on Windows Server 2012 in a VM at the moment while I test it all.
Here is the command I'm running to get it built and the eror that it responds with:
mdtool build '--configuration:Release' test_mono.sln
ERROR [2013-05-24 15:56:25Z]: Did not find registered GTK# installation
MonoDevelop Build Tool
System.TypeInitializationException: The type initializer for 'Mono.Unix.Native.Stdlib' threw an exception. ---> System.BadImageFormatException: An attempt was made to load a program with an incorrect
format. (Exception from HRESULT: 0x8007000B)
at Mono.Unix.Native.Stdlib.GetDefaultSignal()
at Mono.Unix.Native.Stdlib..cctor()
--- End of inner exception stack trace ---
at Mono.Unix.Native.Stdlib.free(IntPtr ptr)
at Mono.Unix.Catalog.MarshalStrings(String s1, IntPtr& p1, String s2, IntPtr& p2, String s3, IntPtr& p3)
at Mono.Unix.Catalog.Init(String package, String localedir)
at MonoDevelop.Core.GettextCatalog..cctor()
The type initializer for 'Mono.Unix.Native.Stdlib' threw an exception.
Any ideas what I've done wrong or overlooked?

Windows Azure Training Kit Guestbook Demo get error when building

This is the error i receive when i build the GuestBook demo. Does anyone have any idea what would be causing this? I'm assuming something got installed wrong but i can't figure out what. I'm also assuming it has something to do with MSBuild.
Error 1 The "DeleteCurrentDeployment" task failed unexpectedly.
System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.VisualStudio.OLE.Interop.IServiceProvider'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{6D5140C1-7436-11CE-8034-00AA006009FA}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
at System.StubHelpers.StubHelpers.GetCOMIPFromRCW(Object objSrc, IntPtr pCPCMD, Boolean& pfNeedsRelease)
at Microsoft.VisualStudio.OLE.Interop.IServiceProvider.QueryService(Guid& guidService, Guid& riid, IntPtr& ppvObject)
at Microsoft.VisualStudio.Shell.ServiceProvider.GetService(Guid guid, Type serviceType)
at Microsoft.VisualStudio.Shell.ServiceProvider.GetService(Type serviceType)
at Microsoft.Cct.IServiceProviderExtensions.GetService[InterfaceType,ServiceType](IServiceProvider serviceProvider)
at Microsoft.Cct.CctBuildDeploymentTaskHost.DeleteCurrentDeployment()
at Microsoft.CloudExtensions.MSBuildTasks.DeleteCurrentDeployment.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean& taskResult)
I found the solution in this site
http://consultrikin.wordpress.com/2013/04/11/the-deletecurrentdeployment-task-failed-unexpectedly/
Solution:
Make sure you have installed every component for Windows Azure. http://www.microsoft.com/en-in/download/details.aspx?id=35448 This particular error says that the system is missing Windows Azure Emulator.
It seems that the build tries to delete an existing azure deployment, but fails doing so. Please make sure, that the current Azure SDK is installed correctly.
http://rduclos.wordpress.com/2011/02/25/the-deletecurrentdeployment-task-failed-unexpectedly-and-ie8-tab-hang/
Solution
Install the SourceGear Vault client v3.1.9 in “C:\Program Files (x86)\SourceGear\Vault Client”
Backup all files and folders from the folder “C:\Program Files (x86)\SourceGear\Vault Client” to a backup folder “C:\Program Files (x86)\SourceGear\Vault Client Backup”
Uninstall the SourceGear Vault client v3.1.9
Restore all files and folders from the “C:\Program Files (x86)\SourceGear\Vault Client Backup” to the “C:\Program Files (x86)\SourceGear\Vault Client”
Create a FixSourceControlProviderOnWin7x64.reg file and paste the following values:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SourceCodeControlProvider]
"ProviderRegKey"="Software\SourceGear\Vault Client"
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SourceCodeControlProvider\InstalledSCCProviders]
"SourceGear Vault Client"="Software\SourceGear\Vault Client"
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SourceGear]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SourceGear\Vault Client]
"SCCServerName"="SourceGear Vault Client"
"SCCServerPath"="C:\Program Files (x86)\SourceGear\Vault Client\VaultIDE.dll"
Run the FixSourceControlProviderOnWin7x64.reg file.

Resources