public static FromNupkgFile ( string nupkgFilepath ) : |
||
nupkgFilepath | string | The filepath to the .nupkg file to load. |
리턴 |
/// <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); }
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() }