Beispiel #1
0
        public override string ResolveReference(string reference, string baseFilePath)
        {
            if (PathUtilities.IsFilePath(reference))
            {
                return(_pathResolver.ResolveReference(reference, baseFilePath));
            }

            if (_packageResolver != null)
            {
                // TODO: Call _packageResolver.ResolveNuGetPackage when
                // this method supports returning a collection of results.
            }

            if (_gacFileResolver != null)
            {
                return(_gacFileResolver.ResolveReference(reference));
            }

            return(null);
        }
Beispiel #2
0
        public override string ResolveReference(string reference, string baseFilePath)
        {
            if (PathUtilities.IsFilePath(reference))
            {
                return(_pathResolver.ResolveReference(reference, baseFilePath));
            }

            if (_packageResolver != null)
            {
                string path = _packageResolver.ResolveNuGetPackage(reference);
                if (path != null && PortableShim.File.Exists(path))
                {
                    return(path);
                }
            }

            if (_gacFileResolver != null)
            {
                return(_gacFileResolver.ResolveReference(reference));
            }

            return(null);
        }