Thursday, June 26, 2008
For VS2008: ActiveWriter Preview 4.1.rar (282.73 KB)
I'm not updating 2005 version anymore.

What's New:
  • Optionally generates classes implementing INotifyPropertyChanging.
  • Contrib-117: Database and designer column order is not in sync
Fixed:
  • Added "Nested" to Common.ARAttributes (Patch: Roberto Paterlini)
  • Swapped parameters in new ArgumentNullException (Patch: Roberto Paterlini)
  • Changed in-memory code compilation error reporting to give full details of the internal compile process. No more ExceptionCollection's.
  • Contrib-118: Activewriter errors in combination with VisualSVN (Patch: Visual SVN Team)
  • Changed the temporary file generation to use \obj folder rather than arbitrary locations on the system.


7/3/2008 3:34:17 AM UTC
I'm getting error about not having 'Castle.ActiveRecord' - but I'm generating NHibernate mappings.

Do I have to have this assembly to use AW?

Thanks

--
Error 1 Running transformation: System.IO.FileNotFoundException: Could not load file or assembly 'file:///C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\Castle.ActiveRecord.dll' or one of its dependencies. The system cannot find the file specified.
File name: 'file:///C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\Castle.ActiveRecord.dll'
at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.Load(String assemblyString)
at Altinoren.ActiveWriter.CodeGeneration.CodeGenerationHelper.Generate()
at Microsoft.VisualStudio.TextTemplating99427085E57D41C15D3B6CC8C187A537.GeneratedTextTransformation.TransformText() in c:\Projects\ActiveWriterSample\MyDomain\AWBistro.actiw:line 33

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
C:\Projects\ActiveWriterSample\MyDomain\AWBistro.actiw 1 1 MyDomain
7/3/2008 7:16:27 AM UTC
@Steve,

Yes. Since AR knows how to generate hbm.xml's better than anything else, I'm using it instead of my own routines. In the generic properties of the .actiw file (when you click on a white-space area on the designer), you should set the path to folder where Ar resides. Alternatively, it should find the one in the GAC if you have one but I'm not sure.

Your final class output won't have any AR attributes or anything related to it (you might have to instruct it to not use a base class, though), AR will be run in memory and you'll get the result.

Check http://altinoren.com/PermaLink,guid,7043a882-8325-4e48-b956-54868219297c.aspx

Maybe I should add a check for this situation.
Gokhan
8/15/2008 7:45:26 PM UTC
Hello Gokhan,

I wonder if you might help me with the problem I am having with generating hbm.xml files using ActiveWriter. I can generate the files successfully if I drag two tables from Server Explorer and press save. But when I add any relationship to these using the toolbox and press save then I get the following error.

Error 1 Running transformation: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Castle.ActiveRecord.Framework.Internal.XmlGenerationVisitor.WriteCompositeColumns(String[] columns) in c:\data\trunk\ActiveRecord\Castle.ActiveRecord\Framework\Internal\Visitors\XmlGenerationVisitor.cs:line 1178
at Castle.ActiveRecord.Framework.Internal.XmlGenerationVisitor.VisitBelongsTo(BelongsToModel model) in c:\data\trunk\ActiveRecord\Castle.ActiveRecord\Framework\Internal\Visitors\XmlGenerationVisitor.cs:line 648
at Castle.ActiveRecord.Framework.Internal.BelongsToModel.Accept(IVisitor visitor) in c:\data\trunk\ActiveRecord\Castle.ActiveRecord\Framework\Internal\Model\BelongsToModel.cs:line 66
at Castle.ActiveRecord.Framework.Internal.AbstractDepthFirstVisitor.VisitNode(IVisitable visitable) in c:\data\trunk\ActiveRecord\Castle.ActiveRecord\Framework\Internal\Visitors\AbstractDepthFirstVisitor.cs:line 36
at Castle.ActiveRecord.Framework.Internal.AbstractDepthFirstVisitor.VisitNodes(IEnumerable nodes) in c:\data\trunk\ActiveRecord\Castle.ActiveRecord\Framework\Internal\Visitors\AbstractDepthFirstVisitor.cs:line 47
at Castle.ActiveRecord.Framework.Internal.XmlGenerationVisitor.VisitModel(ActiveRecordModel model) in c:\data\trunk\ActiveRecord\Castle.ActiveRecord\Framework\Internal\Visitors\XmlGenerationVisitor.cs:line 218
at Castle.ActiveRecord.Framework.Internal.XmlGenerationVisitor.CreateXml(ActiveRecordModel model) in c:\data\trunk\ActiveRecord\Castle.ActiveRecord\Framework\Internal\Visitors\XmlGenerationVisitor.cs:line 59
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args)
at Altinoren.ActiveWriter.CodeGeneration.CodeGenerationHelper.OnARModelCreated(Object models, Object source)
at Castle.ActiveRecord.ModelsDelegate.Invoke(ActiveRecordModelCollection models, IConfigurationSource source)
at Castle.ActiveRecord.ActiveRecordStarter.RegisterTypes(ISessionFactoryHolder holder, IConfigurationSource source, IEnumerable`1 types, Boolean ignoreProblematicTypes) in c:\data\trunk\ActiveRecord\Castle.ActiveRecord\Framework\ActiveRecordStarter.cs:line 869
at Castle.ActiveRecord.ActiveRecordStarter.Initialize(IConfigurationSource source, Type[] types) in c:\data\trunk\ActiveRecord\Castle.ActiveRecord\Framework\ActiveRecordStarter.cs:line 175
at Castle.ActiveRecord.ActiveRecordStarter.Initialize(Assembly assembly, IConfigurationSource source) in c:\data\trunk\ActiveRecord\Castle.ActiveRecord\Framework\ActiveRecordStarter.cs:line 191
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args)
at Altinoren.ActiveWriter.CodeGeneration.CodeGenerationHelper.Generate()
at Microsoft.VisualStudio.TextTemplatingFF883AB0B1A8E8B445119FABE9F9AC0D.GeneratedTextTransformation.TransformText() in c:\Project1\Project1\ActiveWriter1.actiw:line 32 C:\Project1\Project1\ActiveWriter1.actiw 1 1
1 1

I am using ActiveWriter 4 in visual studio 2005 and ActiveRecord built from trunk sources. Any suggestions you have would be greatly appreciated.

John
Name
E-mail
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):