// error CS1704: An assembly with the same simple name 'B' has already been imported. Try removing one of the references (e.g. 'B') or sign them to enable side-by-side.
// error CS1704: An assembly with the same simple name 'B' has already been imported. Try removing one of the references (e.g. 'B') or sign them to enable side-by-side.
@@ -2342,7 +2367,8 @@ public void MissingAssemblyResolution_ActualMissing()
// (1,18): error CS0012: The type 'D' is defined in an assembly that is not referenced. You must add a reference to assembly 'D, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
"A -> D, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null");
}
/// <summary>
...
...
@@ -2369,7 +2395,8 @@ public void MissingAssemblyResolution_MissingDueToResolutionMismatch()
// (1,18): error CS0012: The type 'D' is defined in an assembly that is not referenced. You must add a reference to assembly 'B, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
/// True to instruct the compiler to invoke <see cref="ResolveMissingAssembly(AssemblyIdentity)"/> for each assembly reference that
/// True to instruct the compiler to invoke <see cref="ResolveMissingAssembly(MetadataReference, AssemblyIdentity)"/> for each assembly reference that
/// doesn't match any of the assemblies explicitly referenced by the <see cref="Compilation"/> (via <see cref="Compilation.ExternalReferences"/>, or #r directives.
/// </summary>
publicvirtualboolResolveMissingAssemblies=>false;
...
...
@@ -23,8 +23,9 @@ public abstract class MetadataReferenceResolver
/// <summary>
/// Resolves a missing assembly reference.
/// </summary>
/// <param name="identity">Identity of the assembly reference.</param>
/// <param name="definition">The metadata definition (assembly or module) that declares assembly reference <paramref name="referenceIdentity"/> in its list of dependencies.</param>
/// <param name="referenceIdentity">Identity of the assembly reference that couldn't be resolved against metadata references explicitly specified to in the compilation.</param>
/// <returns>Resolved reference or null if the identity can't be resolved.</returns>
@@ -26,6 +26,16 @@ internal partial class CommonReferenceManager<TCompilation, TAssemblySymbol>
/// An array of <see cref="AssemblyData"/> objects describing assemblies, for which this method should
/// resolve references and find suitable AssemblySymbols. The first slot contains the assembly being built.
/// </param>
/// <param name="explicitModules">
/// An array of <see cref="PEModule"/> objects describing standalone modules referenced by the compilation.
/// </param>
/// <param name="explicitReferences">
/// An array of references passed to the compilation and resolved from #r directives.
/// May contain references that were skipped during resolution (they don't have a corresponding explicit assmebly).
/// </param>
/// <param name="explicitReferenceMap">
/// Maps index to <paramref name="explicitReferences"/> to an index of a resolved assembly or module in <paramref name="explicitAssemblies"/> or modules.
/// </param>
/// <param name="resolverOpt">
/// Reference resolver used to look up missing assemblies.
/// </param>
...
...
@@ -66,6 +76,9 @@ internal partial class CommonReferenceManager<TCompilation, TAssemblySymbol>
DimbRef=CreateCompilationWithMscorlib({"Public Class B : End Class"},options:=TestOptions.ReleaseDll,assemblyName:="B").EmitToImageReference()
DimaRef=CreateCompilationWithMscorlib({"Public Class A : Inherits B : End Class"},{bRef},TestOptions.ReleaseDll,assemblyName:="A").EmitToImageReference()
"A -> B, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")
EndSub
<Fact>
...
...
@@ -1694,12 +1700,14 @@ End Class
DimaRef=CreateCompilationWithMscorlib({"Public Interface A : Inherits B : End Interface"},{b1Ref},TestOptions.ReleaseDll,assemblyName:="A").EmitToImageReference()
DimdRef=CreateCompilationWithMscorlib({"Public Interface D : Inherits B : End Interface"},{b2Ref},TestOptions.ReleaseDll,assemblyName:="D").EmitToImageReference()
"A -> B, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null")
EndSub
<Fact>
...
...
@@ -1724,12 +1735,14 @@ End Class
DimaRef=CreateCompilationWithMscorlib({"Public Interface A : Inherits B : End Interface"},{b1Ref},TestOptions.ReleaseDll,assemblyName:="A").EmitToImageReference()
DimdRef=CreateCompilationWithMscorlib({"Public Interface D : Inherits B : End Interface"},{b2Ref},TestOptions.ReleaseDll,assemblyName:="D").EmitToImageReference()