Please do not reply to this email- if you want to comment on the bug, go to the URL shown below and enter your comments there.
Changed by [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=77635 --- shadow/77635 2006-02-26 13:48:57.000000000 -0500 +++ shadow/77635.tmp.14642 2006-02-26 13:55:45.000000000 -0500 @@ -11,13 +11,13 @@ AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] QAContact: [EMAIL PROTECTED] TargetMilestone: --- URL: Cc: -Summary: AssemblyBuilder.GetName() should return name updated by SetCustomAttribute() calls +Summary: AssemblyBuilder.SetCustomAttribute() should not treat any attributes specially Currently AssemblyBuilder.GetName() is based on the AssemblyName passed in the contructor but it can be updated using AssemblyBuilder.SetCustomAttribute() that should update AsseemblyName as well. @@ -25,6 +25,46 @@ Please provide a test case, thanks. ------- Additional Comments From [EMAIL PROTECTED] 2006-02-26 13:48 ------- Created an attachment (id=16527) AssemblyBuilderGetNameTest.cs + +------- Additional Comments From [EMAIL PROTECTED] 2006-02-26 13:55 ------- +I've done some tests and realized that I originally misunderstood +the problem. AssemblyBuilder.SetCustomAttribute() should not update +AssemblyName but has to add attributes to the assembly. It is the +compiler (mcs for example) that has to interpret these special +attributes and construct the AssemblyName. + +Results on MS.NET: +AssemblyName: DynamicAssembly, Version=1.0.0.0, Culture=en- +US +AssemblyBuilder: DynamicAssembly, Version=1.0.0.0, Culture=en- +US +SetCustomAttribute: DynamicAssembly, Version=1.0.0.0, Culture=en- +US +Save: DynamicAssembly, Version=1.0.0.0, Culture=en- +US +LoadFile: DynamicAssembly, Version=1.0.0.0, Culture=en- +US, PublicKeyToken=null +AssemblyHashAlgorithm: SHA1 +AssemblyNameFlags: PublicKey + +Results on Mono: +AssemblyName: DynamicAssembly, Version=1.0.0.0, Culture=en- +US +AssemblyBuilder: DynamicAssembly, Version=1.0.0.0, Culture=en- +US +SetCustomAttribute: DynamicAssembly, Version=1.0.0.0, Culture=en- +US +Save: DynamicAssembly, Version=1.0.0.0, Culture=en- +US +LoadFile: DynamicAssembly, Version=1.2.3.4, Culture=hu- +HU +AssemblyHashAlgorithm: MD5 +AssemblyNameFlags: None + +Also note that I got ArgumentException with Mono because of +AssemblyNameFlags.Retargetable and I had to modify it (int) +AssemblyNameFlags.Retargetable while the original code works on +MS.NET. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
