NuGetGallery.FunctionalTests.CommandlineHelper.PackPackageAsync C# (CSharp) Метод

PackPackageAsync() публичный Метод

public PackPackageAsync ( string nuspecFileFullPath, string nuspecDir ) : Task
nuspecFileFullPath string
nuspecDir string
Результат Task
        public async Task<ProcessResult> PackPackageAsync(string nuspecFileFullPath, string nuspecDir)
        {
            var arguments = new List<string>
            {
                PackCommandString, nuspecFileFullPath, OutputDirectorySwitchString, nuspecDir
            };
            return await InvokeNugetProcess(arguments, Path.GetFullPath(Path.GetDirectoryName(nuspecFileFullPath)));
        }

Usage Example

Пример #1
0
        private async Task <string> CreatePackageWithTargetFrameworkInternal(string nuspecFileFullPath, string frameworkVersion)
        {
            string nuspecDir = Path.GetDirectoryName(nuspecFileFullPath);

            AddContent(nuspecDir, frameworkVersion);
            AddLib(nuspecDir, frameworkVersion);

            var commandlineHelper = new CommandlineHelper(TestOutputHelper);
            await commandlineHelper.PackPackageAsync(nuspecFileFullPath, nuspecDir);

            string[] nupkgFiles = Directory.GetFiles(nuspecDir, "*.nupkg").ToArray();
            return(nupkgFiles.Length == 0 ? null : nupkgFiles[0]);
        }
All Usage Examples Of NuGetGallery.FunctionalTests.CommandlineHelper::PackPackageAsync