///<summary> /// Get the application major/minor version values. ///</summary> ///<param name="projectStructureType"></param> ///<param name="sourceCodeRootFolder"></param> ///<param name="majorVersion"></param> ///<param name="minorVersion"></param> /// <param name="release"></param> /// <param name="build"></param> public static void GetApplicationVersion(Options.ProjectStructureTypeEnum projectStructureType, string sourceCodeRootFolder, out string majorVersion, out string minorVersion, out string release, out string build) { majorVersion = "1"; minorVersion = "0"; release = "0"; build = "0"; string configFileName; string sourceRootFolder = Path.GetDirectoryName(sourceCodeRootFolder); if (string.IsNullOrEmpty(sourceRootFolder)) { throw new Exception(string.Format("sourceCodeRootFolder: '{0}', empty folder!!", sourceCodeRootFolder)); } switch (projectStructureType) { case Options.ProjectStructureTypeEnum.ACVCSC: configFileName = new DirectoryInfo(sourceRootFolder).FullName.TrimEnd(new char[] { '\\' }) + "\\config.xml"; GetVersion2(configFileName, out majorVersion, out minorVersion, out release, out build); break; default: configFileName = new DirectoryInfo(sourceRootFolder).FullName.TrimEnd(new char[] { '\\' }) + "\\Setup\\config.xml"; GetVersion(configFileName, out majorVersion, out minorVersion); break; } }
private static Options.ProjectStructureTypeEnum GetProjectStructureType() { Options.ProjectStructureTypeEnum projectStructureType = Options.ProjectStructureTypeEnum.Default; try { Options.OptionPageGrid page = (Options.OptionPageGrid)Package.GetDialogPage(typeof(Options.OptionPageGrid)); projectStructureType = page.ProjectStructureType; } catch { } return(projectStructureType); }
///<summary> /// Get the list of AssemblyInfo files - used to change the version - ///</summary> ///<param name="projectStructureType"></param> ///<returns></returns> public static string GetAssemblyInfoFiles(Options.ProjectStructureTypeEnum projectStructureType) { string assemblyInfoFiles; switch (projectStructureType) { case Options.ProjectStructureTypeEnum.ACVCSC: assemblyInfoFiles = "$(MSBuildProjectDirectory)\\..\\BizTalkAssemblyInfo.cs"; break; default: assemblyInfoFiles = "$(MSBuildProjectDirectory)\\..\\Setup\\BizTalkAssemblyInfo.cs"; break; } return(assemblyInfoFiles); }
/// <summary> /// Get the directory containing the external assemblies /// </summary> /// <param name="projectStructureType"></param> /// <param name="sourceCodeRootFolder"></param> /// <returns></returns> public static string GetExternalAssembliesPath(Options.ProjectStructureTypeEnum projectStructureType, string sourceCodeRootFolder) { string path; switch (projectStructureType) { case Options.ProjectStructureTypeEnum.ACVCSC: path = Path.GetDirectoryName(sourceCodeRootFolder) + "\\..\\Install\\Assemblies"; break; default: path = Path.GetDirectoryName(sourceCodeRootFolder) + "\\Setup\\Assemblies"; break; } return(path); }
/// <summary> /// Get the directory containing the Application references /// </summary> /// <param name="projectStructureType"></param> /// <param name="sourceCodeRootFolder"></param> /// <returns></returns> public static string GetApplicationReferencesPath(Options.ProjectStructureTypeEnum projectStructureType, string sourceCodeRootFolder) { string applicationReferencesPath; switch (projectStructureType) { case Options.ProjectStructureTypeEnum.ACVCSC: applicationReferencesPath = Path.GetDirectoryName(sourceCodeRootFolder) + "\\..\\Install"; break; default: applicationReferencesPath = Path.GetDirectoryName(sourceCodeRootFolder) + "\\Setup"; break; } return(applicationReferencesPath); }
/// <summary> /// Get the directory containing the Rules /// </summary> /// <param name="projectStructureType"></param> /// <param name="sourceCodeRootFolder"></param> /// <returns></returns> public static string GetRulesPath(Options.ProjectStructureTypeEnum projectStructureType, string sourceCodeRootFolder) { string rulesPath; switch (projectStructureType) { case Options.ProjectStructureTypeEnum.ACVCSC: rulesPath = Path.GetDirectoryName(sourceCodeRootFolder) + "\\..\\Install\\Policies"; break; default: rulesPath = Path.GetDirectoryName(sourceCodeRootFolder) + "\\Setup\\Rules"; break; } return(rulesPath); }
/// <summary> /// Get the directory containing the BAM activities /// </summary> /// <param name="projectStructureType"></param> /// <param name="sourceCodeRootFolder"></param> /// <returns></returns> public static string GetBamPath(Options.ProjectStructureTypeEnum projectStructureType, string sourceCodeRootFolder) { string bamPath; switch (projectStructureType) { case Options.ProjectStructureTypeEnum.ACVCSC: bamPath = Path.GetDirectoryName(sourceCodeRootFolder) + "\\..\\Install\\BAM"; break; default: bamPath = Path.GetDirectoryName(sourceCodeRootFolder) + "\\Setup\\BAM"; break; } return(bamPath); }
/// <summary> /// Get the directory containing the Rules used in the MSBUILD script /// </summary> /// <param name="projectStructureType"></param> /// <returns></returns> public static string GetRulesTargetsPath(Options.ProjectStructureTypeEnum projectStructureType) { string rulesPath; switch (projectStructureType) { case Options.ProjectStructureTypeEnum.ACVCSC: rulesPath = "$(SourceCodeRootFolder)\\..\\Install\\Policies"; break; default: rulesPath = "$(SourceCodeRootFolder)\\Setup\\Rules"; break; } return(rulesPath); }
/// <summary> /// Get the path where we publish the msi /// </summary> /// <param name="projectStructureType"></param> /// <returns></returns> public static string GetPublishMsiPath(Options.ProjectStructureTypeEnum projectStructureType) { string publishMsiPath; switch (projectStructureType) { case Options.ProjectStructureTypeEnum.ACVCSC: publishMsiPath = "$(SourceCodeRootFolder)\\..\\Install\\MSI"; break; default: publishMsiPath = "$(SourceCodeRootFolder)\\Publish"; break; } return(publishMsiPath); }
/// <summary> /// Get the binding used during the deploy after build. /// </summary> /// <param name="projectStructureType"></param> /// <returns></returns> public static string GetBindingFilePath(Options.ProjectStructureTypeEnum projectStructureType) { string bindingFilePath; switch (projectStructureType) { case Options.ProjectStructureTypeEnum.ACVCSC: bindingFilePath = "$(SourceCodeRootFolder)\\..\\Install\\Bindings\\LOC\\$(ProductName).BindingInfo.LOC.xml"; break; default: bindingFilePath = "$(SourceCodeRootFolder)\\Bindings\\$(ProductName).BindingInfo.xml"; break; } return(bindingFilePath); }