Author: brett
Date: Wed Feb 8 12:57:57 2012
New Revision: 1241886
URL: http://svn.apache.org/viewvc?rev=1241886&view=rev
Log:
apply same change as project importer to locating GAC dependencies in addin
event
Modified:
incubator/npanday/trunk/dotnet/assemblies/NPanday.VisualStudio.Addin/src/main/csharp/Connect.cs
Modified:
incubator/npanday/trunk/dotnet/assemblies/NPanday.VisualStudio.Addin/src/main/csharp/Connect.cs
URL:
http://svn.apache.org/viewvc/incubator/npanday/trunk/dotnet/assemblies/NPanday.VisualStudio.Addin/src/main/csharp/Connect.cs?rev=1241886&r1=1241885&r2=1241886&view=diff
==============================================================================
---
incubator/npanday/trunk/dotnet/assemblies/NPanday.VisualStudio.Addin/src/main/csharp/Connect.cs
(original)
+++
incubator/npanday/trunk/dotnet/assemblies/NPanday.VisualStudio.Addin/src/main/csharp/Connect.cs
Wed Feb 8 12:57:57 2012
@@ -921,18 +921,21 @@ namespace NPanday.VisualStudio.Addin
{
// Because this might be a "reference assembly", which
is a copy in a new location,
// we can't just load it from the path - so try to
find it in the GAC
+ // TODO: can we get the process architecture from the
project properties, so that it is more accurate if targeted to a different arch
than we are generating on?
List<string> refs =
GacUtility.GetInstance().GetAssemblyInfo(pReference.Name, pReference.Version,
null);
Assembly a = null;
+ AssemblyName name = null;
if (refs.Count > 0)
{
- a = Assembly.ReflectionOnlyLoad(new
System.Reflection.AssemblyName(refs[0]).FullName);
+ name = new System.Reflection.AssemblyName(refs[0]);
+ a = Assembly.ReflectionOnlyLoad(name.FullName);
}
if (a != null)
{
- refType =
GacUtility.GetNPandayGacType(a.ImageRuntimeVersion,
a.GetName().ProcessorArchitecture, refToken);
+ refType =
GacUtility.GetNPandayGacType(a.ImageRuntimeVersion, name.ProcessorArchitecture,
refToken);
}
else
{