Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolving AssemblyNameReference with null Version #51

Closed
endlessfalls opened this issue Dec 13, 2010 · 1 comment
Closed

Resolving AssemblyNameReference with null Version #51

endlessfalls opened this issue Dec 13, 2010 · 1 comment

Comments

@endlessfalls
Copy link

If you attempt to resolve an AssemblyNameReference with a null Version field, a null reference exception is thrown. This only happens when the assembly does not appear within the specified search directories.

eg.
GlobalAssemblyResolver.Instance.Resolve(AssemblyNameReference.Parse("System.Core"));

The exception is thrown in BaseAssemblyResolver.IsZero(). Its worth noting that AssemblyNameReference.Parse() returns a reference with a null version field if no version is specified in the fullname parameter. Is this by design?

@jbevain
Copy link
Owner

jbevain commented Dec 13, 2010

The NRE is fixed. I need to investigate whether it's ok to make AssemblyNameReference.Parse set a zero version instead of null, wrt all the existing code.

Thanks!

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants