I'm trying to install Ninject in one of my projects with exact version and project name given. I'm using locally hosted package repository. I'm facing following issue during package installation:
PM> Install-Package Ninject -version 3.2.2.0 -project My.Project.Name
Installing 'Ninject 3.2.2.0'.
You are downloading Ninject from Ninject Project Contributors, the license agreement to which is available at https://github.com/ninject/ninject/raw/master/LICENSE.txt. Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device.
Successfully installed 'Ninject 3.2.2.0'.
Adding 'Ninject 3.2.2.0' to My.Project.Name.
Install failed. Rolling back...
Install-Package : Input string was not in a correct format.
At line:1 char:16
+ Install-Package <<<< Ninject -version 3.2.2.0 -project My.Project.Name
+ CategoryInfo : NotSpecified: (:) [Install-Package], FormatException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
PM> $error[0].Exception.StackTrace
at System.Text.StringBuilder.AppendFormat(IFormatProvider provider, String format, Object[] args)
at System.String.Format(IFormatProvider provider, String format, Object[] args)
at NuGet.PowerShell.Commands.NuGetBaseCommand.Log(MessageLevel level, String message, Object[] args)
at NuGet.VisualStudio.VsProjectSystem.RemoveReference(String name)
at NuGet.ProjectManager.RemovePackageReferenceFromProject(IPackage package)
at NuGet.ProjectManager.Execute(PackageOperation operation)
at NuGet.ProjectManager.Execute(IPackage package, IPackageOperationResolver resolver)
at NuGet.ProjectManager.RemovePackageReference(IPackage package, Boolean forceRemove, Boolean removeDependencies)
at NuGet.VisualStudio.VsPackageManager.RollbackProjectActions(IProjectManager projectManager, IEnumerable`1 packagesAdded, IEnumerable`1 packagesRemoved)
at NuGet.VisualStudio.VsPackageManager.RunProjectAction(IProjectManager projectManager, Action action)
at NuGet.VisualStudio.VsPackageManager.AddPackageReference(IProjectManager projectManager, IPackage package, Boolean ignoreDependencies, Boolean allowPrereleaseVersio
ns)
at NuGet.VisualStudio.VsPackageManager.<>c__DisplayClass8.<InstallPackage>b__4()
at NuGet.VisualStudio.VsPackageManager.RunSolutionAction(Action action)
at NuGet.VisualStudio.VsPackageManager.InstallPackage(IProjectManager projectManager, String packageId, SemanticVersion version, Boolean ignoreDependencies, Boolean a
llowPrereleaseVersions, Boolean skipAssemblyReferences, ILogger logger)
at NuGet.VisualStudio.VsPackageManager.InstallPackage(IProjectManager projectManager, String packageId, SemanticVersion version, Boolean ignoreDependencies, Boolean a
llowPrereleaseVersions, ILogger logger)
at NuGet.PowerShell.Commands.InstallPackageCommand.InstallPackage(IVsPackageManager packageManager)
at NuGet.PowerShell.Commands.InstallPackageCommand.ProcessRecordCore()
at NuGet.PowerShell.Commands.NuGetBaseCommand.ProcessRecord()
PM>
After that:
How can I mend it? What can cause this problem?
String input templates allow you to specify the type, order, and number of characters a user can enter in a data entry field. You can define string input templates only on single‑line character data entry fields.
I don't know exactly what's causing the problem, but we were able to solve it by running the following command using administrator credentials:
regsvr32 "C:\Program Files (x86)\Common Files\microsoft shared\MSEnv\VsLangproj.olb"
However, be sure to actually start the command line as administrator (not just runas
), otherwise you'll be presented a success message although the registration actually failed.
After that restart Visual Studio and it should work (at least it did for me, tested on several machines with VS 2010 / 2012 / 2013).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With