Esempio n. 1
0
        private RuntimeFile CreateRuntimeFile(LockFileTargetLibrary library, LockFileItem item)
        {
            //  _packageResolver will be null if _includeRuntimeFileVersions is false, hence the "?."
            var itemFullPath = _packageResolver?.ResolvePackageAssetPath(library, item.Path);

            return(CreateRuntimeFile(item.Path, itemFullPath));
        }
Esempio n. 2
0
        private string FindApphostInRuntimeTarget(string apphostName, LockFileTarget runtimeTarget)
        {
            foreach (LockFileTargetLibrary library in runtimeTarget.Libraries)
            {
                if (!library.IsPackage())
                {
                    continue;
                }

                foreach (LockFileItem asset in library.NativeLibraries)
                {
                    if (asset.IsPlaceholderFile())
                    {
                        continue;
                    }

                    var resolvedPackageAssetPath = _packageResolver.ResolvePackageAssetPath(library, asset.Path);

                    if (Path.GetFileName(resolvedPackageAssetPath) == apphostName)
                    {
                        return(resolvedPackageAssetPath);
                    }
                }
            }

            throw new BuildErrorException(Strings.CannotFindApphostForRid, runtimeTarget.RuntimeIdentifier);
        }