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));
}
}
}