FromNupkgFile() публичный статический Метод

Loads the .nuspec file inside the .nupkg file at the given filepath.
public static FromNupkgFile ( string nupkgFilepath ) : NuspecFile
nupkgFilepath string The filepath to the .nupkg file to load.
Результат NuspecFile
Пример #1
0
        /// <summary>
        /// Loads a <see cref="NugetPackage"/> from the .nupkg file at the given filepath.
        /// </summary>
        /// <param name="nupkgFilepath">The filepath to the .nupkg file to load.</param>
        /// <returns>The <see cref="NugetPackage"/> loaded from the .nupkg file.</returns>
        public static NugetPackage FromNupkgFile(string nupkgFilepath)
        {
            NugetPackage package = FromNuspec(NuspecFile.FromNupkgFile(nupkgFilepath));

            package.DownloadUrl = nupkgFilepath;
            return(package);
        }
Пример #2
0
        protected static void TestNUPKG()
        {
            var files = Directory.GetFiles("C:/Users/Administrator/AppData/Local/NuGet/Cache", "*.nupkg", SearchOption.AllDirectories);

            foreach (var f in files)
            {
                UnityEngine.Debug.Log("==============>" + Path.GetFileName(f));
                //解析Npkg,剔除无用的dll
                var nupkg = NuspecFile.FromNupkgFile(f);
                foreach (var nf in nupkg.Files)
                {
                    UnityEngine.Debug.Log(nf.Source + "\n" + nf.Target);
                }
            }

            // typeof(int).Assembly.GetReferencedAssemblies()
        }