NHQG目前是已經停止開發了, 但是你可以在 https://rhino-tools.svn.sourceforge.net/svnroot/rhino-tools/deprecated/NHibernate.Query.Generator 取得舊的Source.
一開始我是用Ryan Cromwell 的方法, 但是會找不到NHQG, 我的方法如下:
上述batch主要是載Rhino-Tools,但我們主要是看NHQG. so, 載完後NHQG有三個專案:echo Offrem set path=%path%;c:\tools\svn-win32-1.4.4\binrem C:\Program Files\CollabNet\Subversion Client\svn.exeecho get Trunk (Non-Recursive)…svn co https://rhino-tools.svn.sourceforge.net/svnroot/rhino-tools/trunk trunk -q -Necho doneecho get Art…svn co https://rhino-tools.svn.sourceforge.net/svnroot/rhino-tools/trunk/Art trunk/Art -qecho doneecho get SharedLibs…svn co https://rhino-tools.svn.sourceforge.net/svnroot/rhino-tools/trunk/SharedLibs trunk/SharedLibs -qecho doneecho get NHQG…rem jk, modifyrem svn co https://rhino-tools.svn.sourceforge.net/svnroot/rhino-tools/trunk/NHibernate.Query.Generator trunk/NHibernate.Query.Generator -qsvn co https://rhino-tools.svn.sourceforge.net/svnroot/rhino-tools/deprecated/NHibernate.Query.Generatorecho doneecho build NHQG…pushd .cd trunk\NHibernate.Query.Generatorrem jk, modifyrem %windir%\Microsoft.NET\Framework64\v2.0.50727\msbuild.exe default.build%windir%\Microsoft.NET\Framework\v2.0.50727\msbuild.exe default.buildecho doneecho build Installercd NHibernate.Query.Generator.Setup%windir%\Microsoft.NET\Framework\v2.0.50727\msbuild.exe Setup.wixprojecho donepopdPAUSE
NHibernate.Query.Generator, NHibernate.Query.Generator.Model, NHibernate.Query.Generator.Tests,
但是經過Build後, Test專案會有一個錯誤, Test專案是用 Model.dll 參考來產生hbm.xml檔, 所以 dll內有一個CS沒有按照 urn:nhibernate-mapping-2.2 的規範, 就會出錯.
System.Xml.Schema.XmlSchemaValidationException: The element 'class' in namespace 'urn:nhibernate-mapping-2.2' has invalid child element 'property' in namespace 'urn:nhibernate-mapping-2.2'. List of possible elements expected: 'meta, subselect, cache, synchronize, comment, tuplizer, id, composite-id' in namespace 'urn:nhibernate-mapping-2.2'.
原因是WierdClass.cs 的 MesajIst 類別沒有 Id ?
我的解決方式, 是把它註解 ?! Test專案也不去測 MesajIst ?!
還沒仔細研究, 先測試過吧.
沒有留言:
張貼留言