Esempio n. 1
0
        private void CreatePackageFile(IDeploymentArgs deploymentArgs)
        {
            string command     = DeployAgent.BuildCreatePackageCommand(deploymentArgs);
            var    processInfo = new ProcessStartInfo("nuget.exe")
            {
//        CreateNoWindow = true,
                WorkingDirectory = deploymentArgs.ProjectFile.DirectoryName,
                Arguments        = command,
                ErrorDialog      = true
            };

            Process.Start(processInfo);
        }
Esempio n. 2
0
        /// <inheritdoc />
        private void RegisterPackage(string applicationKey, FileInfo assemblyInfo)
        {
            byte[] hashedApplicationKey = SHA512.Create().ComputeHash(Encoding.UTF8.GetBytes(applicationKey));
            var    hashString           = Encoding.UTF8.GetString(hashedApplicationKey);

            if (!AppSettingsConnector.TryReadString(hashString, out string filePath) ||
                !filePath.Equals(
                    assemblyInfo.FullName,
                    StringComparison.OrdinalIgnoreCase))
            {
                RegisterUser(applicationKey, assemblyInfo);
            }


            // Create .nuspec file
            if (!File.Exists(Path.Combine(assemblyInfo.DirectoryName, $"{assemblyInfo.Name}.nuspec")))
            {
                DeployAgent.CreateNuSpecFile(assemblyInfo);
            }
        }