DLL version: 2.0.0.4000
Environment:
Visual Basic 2008 Express
.NET 3.5
SQL Server 2008 Express
Project model: Windows Application
Visual Basic was configured to accept the nhibernate configuration
sections into app.config (the information for that is outdated on the
book/online resources - will open issue if needed after this).
Setup Application:
1. Added a class for the "application space", not an issue.
2. Added the hibernate.cfg.xml
Issue with the "embebed resource" (adding the build action as such
isn't enought for sorting the issue. It is required that you change
the "Copy to Output Directory" to "Always Copy" or at least to "Copy
if newer"). Docs shoud be updated reflecting this (or at least warning
- not sure but i believe that this option is new on the VS2008
generation).
3. Then i proceeded by adding my mappings to the configuration and the
issue blowed the application:
<mapping resource="EDP2008.Gabinete.hbm.xml" assembly="EDP2008" />
Produces the following error:
Resource not found: EDP2008.Gabinete.hbm.xml
4. Workaround:
First i removed the mapping from the configuration file.
Then, on the configuration innitialization i added the file
manually:
Dim myConfig As New Configuration
myConfig.SetProperty("dialect",
"NHibernate.Dialect.MsSql2005Dialect")
Dim basePath As String =
System.Windows.Forms.Application.StartupPath
myConfig.AddXmlFile(basePath & "\EDP2008.Gabinete.hbm.xml")
Dim myFactory As ISessionFactory =
myConfig.Configure.BuildSessionFactory
Dim mySession As ISession = myFactory.OpenSession
Note: It is not the ideal solution, but it works...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---