Bugzilla – Bug 321145
[PATCH] ArgumentException when path is specified for linked resource
Last modified: 2007-09-15 21:24:23 UTC
---- Reported by gert.driesen@pandora.be 2006-05-15 15:21:27 MST ---- mcs report the following exception when a filename with path information is specified as value for /linkresource: Unhandled Exception: System.ArgumentException: fileName '/home/monohead/mono-test-projects/Service.cs' must not include a path. in <0x00324> System.Reflection.Emit.AssemblyBuilder:check_name_and_filename (System.String name, System.String fileName, Boolean fileNeedsToExists) in <0x00020> System.Reflection.Emit.AssemblyBuilder:AddResourceFile (System.String name, System.String fileName, ResourceAttributes attribute, Boolean fileNeedsToExists) in <0x00015> System.Reflection.Emit.AssemblyBuilder:AddResourceFile (System.String name, System.String fileName, ResourceAttributes attribute) in <0x00026> Mono.CSharp.Resources+LinkedResource:Emit () in <0x00112> Mono.CSharp.Resources:Emit () in <0x00cca> Mono.CSharp.Driver:MainDriver (System.String[] args) in <0x00042> Mono.CSharp.Driver:Main (System.String[] args) The attached patch fixes this issue. Let me know if it's ok to commit. Should I also commit this change for gmcs ? ---- Additional Comments From gert.driesen@pandora.be 2006-05-15 15:24:07 MST ---- Created an attachment (id=169848) Fix ---- Additional Comments From rharinath@novell.com 2006-05-16 04:09:20 MST ---- Can you verify that this is the behaviour of CSC? What does it do if -linkresource is given a path? ---- Additional Comments From gert.driesen@pandora.be 2006-05-16 13:57:54 MST ---- Created an attachment (id=169849) Fix (for mcs and gmcs) and test ---- Additional Comments From gert.driesen@pandora.be 2006-05-16 14:00:21 MST ---- After my patch, we now match the behavior of csc: for linked resources only the filename is used. I've attached a new patch which also fixes the issue in gmcs, and adds a test. ---- Additional Comments From rharinath@novell.com 2006-05-17 07:26:51 MST ---- Looks good. Please apply. ---- Additional Comments From gert.driesen@pandora.be 2006-05-17 16:01:27 MST ---- Fixed in svn (revision 60797). This bug blocked bug(s) 78384. Imported an attachment (id=169848) Imported an attachment (id=169849)