public static ProjectFilePath GetCSharpProjectFilePath(ProjectDirectoryPath projectDirectoryPath, ProjectName projectName, DotnetNewConventions conventions)
        {
            var projectFileName = Utilities.GetCSharpProjectFileName(projectName, conventions);

            var projectFilePath = VsIoUtilities.GetProjectFilePath(projectDirectoryPath, projectFileName);

            return(projectFilePath);
        }
        public static ProjectFilePath CreateProjectFile(DotnetNewProjectType projectType, ProjectName projectName, ProjectDirectoryPath projectDirectoryPath, ILogger logger)
        {
            var projectFilePath = Utilities.GetCSharpProjectFilePath(projectDirectoryPath, projectName);

            logger.LogDebug($"{projectName} - Creating project file:\n{projectFilePath}");

            var dotnetCommandProjectType = projectType.ToDotnetCommandProjectType();

            // Notes:
            //  --language: This is hard-coded to C#.
            //  --output: This must be the directory in which the solution file should be placed (tested).
            //  --name: This is the name of the solution, to which the .sln extension will be added. If .sln is suffixed to the name argument the resulting solution file will be .sln.sln!
            var arguments = $@"new {dotnetCommandProjectType} --language ""C#"" --output ""{projectDirectoryPath}"" --name {projectName}";

            ProcessRunner.Run(DotnetCommand.Value, arguments);

            logger.LogInformation($"{projectName} - Created project file:\n{projectFilePath}");

            return(projectFilePath);
        }
        public static ProjectDirectoryPath AsProjectDirectoryPath(this string value)
        {
            var projectDirectoryPath = new ProjectDirectoryPath(value);

            return(projectDirectoryPath);
        }
        /// <summary>
        /// Uses the <see cref="DotnetNewConventions.Instance"/>.
        /// </summary>
        public static ProjectFilePath GetCSharpProjectFilePath(ProjectDirectoryPath projectDirectoryPath, ProjectName projectName)
        {
            var projectFilePath = Utilities.GetCSharpProjectFilePath(projectDirectoryPath, projectName, DotnetNewConventions.Instance);

            return(projectFilePath);
        }