NHibernate 3.3 Installation

Posted by Self-Innovator under .NET Framework on 10/16/2015 | Points: 10 | Views : 1750 | Status : [Member] | Replies : 2
Hi,

I am trying to install an nHobernate 3.3 version in my Visual Studio 2013, While trying to install with the below comand in Nuget Package Console it throws an error


Add-EFProvider : Cannot bind argument to parameter 'Project' because it is null.
At C:\Users\sg0950632\Documents\Visual Studio 2013\Projects\MockDemo\packages\EntityFramework.6.1.1\tools\install.ps1:4 char:15
+ Add-EFProvider <<<< $project 'System.Data.SqlClient' 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer'
+ CategoryInfo : InvalidData: (:) [Add-EFProvider], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Add-EFProvider


I am using SQL server 2014 i think is NHibernate 3,3 requires an SQL Server 2008 management studio inorder to get it installed successfully.

Any suggestions are highly appreciated.

Join Hands Change lives
Thanks & Regards
Straight Edge Society



Responses

Posted by: Rajnilari2015 on: 10/16/2015 [Member] [Microsoft_MVP] [MVP] Platinum | Points: 25

Up
0
Down
NHibernate has nothing to do with SQL Server 2008/2014 etc. (Even in my system I have Microsoft SQL Server 2014 - 12.0.2269.0 (X64) .It has a dependency on the below package (Iesi.Collections)

<packages>  
<package id="Iesi.Collections" version="4.0.0.4000" targetFramework="net46" />
<package id="NHibernate" version="4.0.4.4000" targetFramework="net46" />
</packages>


I just tried with PM> Install-Package NHibernate -Version 3.0.0.4000
and the result is
PM> Install-Package NHibernate -Version 3.0.0.4000
Attempting to gather dependencies information for package 'NHibernate.3.0.0.4000' with respect to project 'ConsoleApplication1', targeting '.NETFramework,Version=v4.6'
Attempting to resolve dependencies for package 'NHibernate.3.0.0.4000' with DependencyBehavior 'Lowest'
Resolving actions to install package 'NHibernate.3.0.0.4000'
Resolved actions to install package 'NHibernate.3.0.0.4000'
Added package 'Iesi.Collections.1.0.1' to 'packages.config'
Successfully installed 'Iesi.Collections 1.0.1' to ConsoleApplication1
Added package 'NHibernate.3.0.0.4000' to 'packages.config'
Successfully installed 'NHibernate 3.0.0.4000' to ConsoleApplication1

It got added successfully.

B/w that, why not you are using the latest version of NHibernate "NHibernate 4.0.4.4000" which was released on Monday, August 17 2015.

Even I was able to install that also.

PM> Install-Package NHibernate
Attempting to gather dependencies information for package 'NHibernate.4.0.4.4000' with respect to project 'ConsoleApplication1', targeting '.NETFramework,Version=v4.6'
Attempting to resolve dependencies for package 'NHibernate.4.0.4.4000' with DependencyBehavior 'Lowest'
Resolving actions to install package 'NHibernate.4.0.4.4000'
Resolved actions to install package 'NHibernate.4.0.4.4000'
Removed package 'Iesi.Collections.1.0.1' from 'packages.config'
Successfully uninstalled 'Iesi.Collections.1.0.1' from ConsoleApplication1
Added package 'Iesi.Collections.4.0.0.4000' to 'packages.config'
Successfully installed 'Iesi.Collections 4.0.0.4000' to ConsoleApplication1
Added package 'NHibernate.4.0.4.4000' to 'packages.config'
Successfully installed 'NHibernate 4.0.4.4000' to ConsoleApplication1


Most likely the time when you was trying to install NHibernate, there may be some network issue at that point of time and henceforth it was not able to get it install properly or resolve the dependencies. Sometimes it happens with me also. Even today morning while I was playing with IronJS, it happened with me also.

However, you try to uninstall the existing NHibernate and then try again. Should not face any hiccup (:.

Or else, if you have problem from package manager console, try from Managed Nuget Packages by right clicking on your project. That will open the Nuget Package Manager GUI from where you can add NHibernate in your target project.

Hope this helps.

Regards
--------
(RNA Team)

--
Thanks & Regards,
RNA Team

Self-Innovator, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jeni on: 2/21/2020 [Member] Starter | Points: 25

Up
0
Down
Great.This is such awesome content i got to read after lot of time.Its so interesting as well as informative.I am sure everyone who read it got a lot to learn from it. www.ace4sure.com/Cisco-exams.html

Self-Innovator, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response