Esempio n. 1
0
        public static void Main(string[] args)
        {
            CommandLineArguments cla;

            if (!TryParseArguments(args, out cla))
            {
                WriteError();
                return;
            }

            if (cla.Mode != Mode.Solution)
            {
                NusPecCreatorFactory.GetCreator(cla.ProjPath).CreatePackage(
                    cla.ProjPath, cla.DllPath, cla.IsDebug, cla.DoCreateNuPkg, cla.DoIncludeCurrentProj, cla.PreReleaseSuffixOverride);
            }
            else
            {
                NuspecCreatorBase.SlnOutputFolder = cla.BinFolder;

                NuspecCreatorHelper.CreatePackages(
                    cla.BinFolder, cla.SolutionFolder, cla.IsDebug, cla.DoCreateNuPkg, cla.DoIncludeCurrentProj, cla.PreReleaseSuffixOverride);
            }

            //Console.ReadKey();
        }
Esempio n. 2
0
        public static void CreatePackages(
            string binFolder, string solutionFolder, bool isDebug,
            bool doCreatePkg = true, bool doIncludeCurrentProj = false,
            string preReleaseSuffixOverride = null)
        {
            var projects = new LinkedList <string>();

            FindProjects(solutionFolder, projects);

            foreach (var projectPath in projects)
            {
                var creator = NusPecCreatorFactory.GetCreator(projectPath);
                creator.GetAssemblyNameAndPath(
                    projectPath, out string assemblyName, isDebug, binFolder, out var assemblyPath);

                if (assemblyName == null)
                {
                    continue;
                }

                creator.CreatePackage(
                    projectPath, assemblyPath, isDebug, doCreatePkg, doIncludeCurrentProj,
                    preReleaseSuffixOverride);
            }
        }