Bug 322418 (MONO79715) - [PATCH] FileNotFoundException if AssemblyName's version does not contain 4 parts
Summary: [PATCH] FileNotFoundException if AssemblyName's version does not contain 4 parts
Status: RESOLVED FIXED
Alias: MONO79715
Product: Mono: Runtime
Classification: Mono
Component: misc (show other bugs)
Version: 1.1
Hardware: Other All
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-22 00:20 UTC by Gert Driesen
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
Fix (1.57 KB, patch)
2006-10-22 00:56 UTC, Thomas Wiest
Details | Diff
corlib unit tests (2.47 KB, patch)
2006-10-22 00:56 UTC, Thomas Wiest
Details | Diff
(Gzipped) tar archive containing standalone repro (1.09 KB, application/x-gzip)
2006-10-22 00:57 UTC, Thomas Wiest
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 20:13:38 UTC


---- Reported by gert.driesen@pandora.be 2006-10-21 17:20:27 MST ----

Currently, AppDomain.Load (AssemblyName) and Assembly.Load (AssemblyName) 
(and related methods) always throw a FileNotFoundException when a version 
with less than 4 parts is specified in the AssemblyName.

This is due to a issue in build_assembly_name (assembly.c).

I'll attach a patch that fixes this issue, adds unit tests for it.

For now, I just set the build and revision number to 0 if not specified 
in the AssemblyName, but we should really be setting these values to -1. 
That would allow us to check whether values have been specified for 
build/revision later on.

However, I think it's best to leave that change up to someone that can 
better estimate the consequences of that change, and can make necessary 
modifications in other functions to cope with this change.



---- Additional Comments From gert.driesen@pandora.be 2006-10-21 17:56:32 MST ----

Created an attachment (id=170698)
Fix




---- Additional Comments From gert.driesen@pandora.be 2006-10-21 17:56:56 MST ----

Created an attachment (id=170699)
corlib unit tests




---- Additional Comments From gert.driesen@pandora.be 2006-10-21 17:57:40 MST ----

Created an attachment (id=170700)
(Gzipped) tar archive containing standalone repro




---- Additional Comments From gert.driesen@pandora.be 2006-10-21 17:58:38 MST ----

Patches for the runtime fix and corlib unit tests have been attached.

I also attached a standalone test app that allows you to reproduce 
the issue.

Let me know if it's ok to commit.



---- Additional Comments From vargaz@gmail.com 2006-10-22 06:14:09 MST ----

This looks ok to check in.




---- Additional Comments From gert.driesen@pandora.be 2006-10-22 11:09:32 MST ----

Fixed in svn.

Imported an attachment (id=170698)
Imported an attachment (id=170699)
Imported an attachment (id=170700)