Monday, February 15, 2010

NHibernate.MappingException: No persister for ...

When I tried to save I got this ADOException: Could Not Save Object...After googling I found the solution that I forgot to set the build action of *.hbm.xml file to "Embeded Resouce".

and it solved my problem.... :)

TIP from NHibernate quick-start guide: If you are using Visual Studio .NET to compile make sure that you set the Build Action of the User.hbm.xml file to Embedded Resource. The mapping file will now be a part of the Asssembly. The subtle detail's importance will be evident later.

Chers by,

Anand Ranjan

Thursday, January 14, 2010

cannot be opened because its project type (.csproj) is not supported by this version of the application.

From past few weeks whenever I tried to open any download code sample it gives me error

""cannot be opened because its project type (.csproj) is not supported by this version of the application.
To open it, please use a version that supports this type of project."

I am using Visual Studio 2008 with SP1.

Finally today I got the solution and it works fine for me .... :) Might be it will be a bug for VS-2008 :(

Here is the solution for it.

Go to Start> All Programs > Visual Studio 2008 > Visual Studio Tools > Click Visual Studio 2008 Command Prompt. Type the below command and press enter.

devenv.exe /resetskippkgs

It opens Visual Studio 2008 IDE and finally everything was OK .

Cheers by

Anand Ranjan Pandey