
Hello,
We recently upgraded to the newest release (from the latest 2012.2 release), and noticed a small issue apparently in the Project.AssemblyReferences.AddFrom method. I have looked through the source history for our custom assembly resolver class and I don't believe this has been caused by an internal change.
Code that doesn't work:
foreach (var reference in DynamicClassHelper.GetCommonReferences())
{
try
{
m_SyntaxEditorProject.AssemblyReferences.AddFrom(reference);
}
catch (Exception ex)
{
...
}
}
Assembly A
Assembly B, references Assembly A.
Assembly A is added first, then assembly B. Our assembly resolver correctly resolves A and it is added. Our assembly resolver then resolves B, and a subsequent call to resolve A is then called. Our assembly resolver returns null as it is already loaded. Intellisense stops working for both Assembly A and B.
Code that works:
foreach (var reference in DynamicClassHelper.GetCommonReferences())
{
try
{
var a = Assembly.LoadFrom(reference);
if (a != null)
m_SyntaxEditorProject.AssemblyReferences.Add(a);
}
catch (Exception ex)
{
...
}
}
The lower code seems to have fixed the issue, but I'm not sure if other users will encounter this.
I'll not be providing any sample projects as I believe this is now working. This is FYI.
[Modified 12 years ago]