예제 #1
0
        public void CreatePackage(DevEnv type)
        {
            string standardOutput, standardError;

            VerifyCloudServiceProjectComponents();
            CsPack packageTool = new CsPack();

            packageTool.CreatePackage(Components.Definition, Paths, type, AzureTool.GetAzureSdkBinDirectory(), out standardOutput, out standardError);
        }
예제 #2
0
        private X509Certificate2 ChooseCertificate()
        {
            X509Certificate2 cert = FindCertificate();

            if (cert == null)
            {
                CsEncrypt csEncrypt = new CsEncrypt(AzureTool.GetAzureSdkBinDirectory());
                csEncrypt.CreateCertificate();
                cert = FindCertificate();
            }
            return(cert);
        }
        public void CreatePackage(DevEnv type)
        {
            string standardOutput, standardError;

            VerifyCloudServiceProjectComponents();
            CsPack packageTool = new CsPack();

            packageTool.CreatePackage(Components.Definition, Paths, type, AzureTool.GetAzureSdkBinDirectory(), out standardOutput, out standardError);
            if (!string.IsNullOrWhiteSpace(standardError))
            {
                //The error of invalid xpath expression about endpoint in the configuration file is expected. Hence, we do not throw.
                if (!standardError.Contains("/RoleEnvironment/CurrentInstance/Endpoints/Endpoint[@name='HttpIn']/@port"))
                {
                    throw new InvalidOperationException(string.Format(Properties.Resources.FailedToCreatePackage, standardError));
                }
            }
        }