public void ResolveAssemblyPathInTargetFx_UnresolvedAssembly_SetsResolvedAssemblyPathsToZero()
        {   // BUG: https://devdiv.visualstudio.com/DevDiv/_workitems?id=368836
            var reference = Reference3Factory.CreateAssemblyReference("mscorlib", "1.0.0.0");

            var resolution = CreateInstance(reference);

            var result = resolution.ResolveAssemblyPathInTargetFx(new string[] { "mscorlib" }, 1, new VsResolvedAssemblyPath[1], out uint resolvedAssemblyPaths);

            Assert.Equal(VSConstants.S_OK, result);
            Assert.Equal(0u, resolvedAssemblyPaths);
        }
        public void ResolveAssemblyPathInTargetFx_ComReference_SetsResolvedAssemblyPathsToZero()
        {
            var reference = Reference3Factory.CreateAssemblyReference("mscorlib", "1.0.0.0", type: prjReferenceType.prjReferenceTypeActiveX, refType: __PROJECTREFERENCETYPE.PROJREFTYPE_ACTIVEX);

            var resolution = CreateInstance(reference);

            var result = resolution.ResolveAssemblyPathInTargetFx(new string[] { "mscorlib" }, 1, new VsResolvedAssemblyPath[1], out uint resolvedAssemblyPaths);

            Assert.Equal(VSConstants.S_OK, result);
            Assert.Equal(0u, resolvedAssemblyPaths);
        }
        public void ResolveAssemblyPathInTargetFx_NonAssembly_SetsResolvedAssemblyPathsToZero()
        {
            var reference = Reference3Factory.CreateAssemblyReference("mscorlib", "1.0.0.0", referenceType: prjReferenceType.prjReferenceTypeActiveX);

            var resolution = CreateInstance(reference);

            var result = resolution.ResolveAssemblyPathInTargetFx(new string[] { "mscorlib" }, 1, new VsResolvedAssemblyPath[1], out uint resolvedAssemblyPaths);

            Assert.Equal(VSConstants.S_OK, result);
            Assert.Equal(0u, resolvedAssemblyPaths);
        }
        public void ResolveAssemblyPathInTargetFx_SdkReference_SetsResolvedAssemblyPathsToZero()
        {
            // SDKs say they are "assemblies" for Reference.Type, but SDK for Reference.RefType
            var reference = Reference3Factory.CreateAssemblyReference("mscorlib", "1.0.0.0", type: prjReferenceType.prjReferenceTypeAssembly, refType: (__PROJECTREFERENCETYPE)__PROJECTREFERENCETYPE2.PROJREFTYPE_SDK);

            var resolution = CreateInstance(reference);

            var result = resolution.ResolveAssemblyPathInTargetFx(new string[] { "mscorlib" }, 1, new VsResolvedAssemblyPath[1], out uint resolvedAssemblyPaths);

            Assert.Equal(VSConstants.S_OK, result);
            Assert.Equal(0u, resolvedAssemblyPaths);
        }
        public void ResolveAssemblyPathInTargetFx_NameThatDoesNotMatch_SetsResolvedAssemblyPathsToZero(string input, string name, string version, string path)
        {
            var reference = Reference3Factory.CreateAssemblyReference(name, version, path);

            var resolution = CreateInstance(reference);

            var resolvedPaths = new VsResolvedAssemblyPath[1];
            var result        = resolution.ResolveAssemblyPathInTargetFx(new string[] { input }, 1, resolvedPaths, out uint resolvedAssemblyPaths);

            Assert.Equal(VSConstants.S_OK, result);
            Assert.Equal(0u, resolvedAssemblyPaths);
            Assert.Null(resolvedPaths[0].bstrOrigAssemblySpec);
            Assert.Null(resolvedPaths[0].bstrResolvedAssemblyPath);
        }