Coder Social home page Coder Social logo

carps's Introduction

StartDotNet

C# Automated Rapid Project Setup (CARPS)

Overview

CARPS is a Python script that automates the setup of new C# projects. It streamlines the project initialization process by generating a series of commands to create a .NET project and solution file.

Features

  • Interactive prompts for project name input.
  • Validation of project name.
  • Creation of a new directory for the project.
  • Initialization of a new .NET solution.
  • Creation of a new console application.
  • Addition of the application to the solution.
  • Building and running the application.
  • Error handling for command execution.

Download the latest release

  • Download CARPS v4 for Microsoft.exe
    • Place into the directory you want your project to be in.
    • Run.
    • It will ask you for the name of your project.
    • Click enter
    • It will create, build and test your project in the directory. Or
  • Download the python script
    • Use python to run it in your favorite IDE (hopefully VsCode ;) )

Functions

greeting()

Prints a welcome message to the user.

get_project_name()

Prompts the user to input the name of the project and returns the input as a string.

validate_project_name(project_name)

Validates the project name. The project name must be non-empty and can only contain alphanumeric characters and underscores. If the project name is invalid, it raises a ValueError.

execute_single_command(single_command)

Executes a single command using the subprocess module. It prints the command being executed and the output of the command. If the command fails, it prints an error message and stops the execution of the program.

execute_dotnet_commands(project_name)

Creates the necessary directories for the project and constructs a list of .NET commands to be executed. It then calls execute_single_command for each command in the list.

main()

The main function of the program. It parses command line arguments, gets the project name if not provided, validates the project name, and executes the necessary commands to set up the .NET project.

Usage

Run this script in a Python environment. Follow the prompts to input the name of the new project. The script will generate a series of commands to set up the project.

Requirements

  • Python 3.x
  • .NET SDK

Created by

John Akujobi

Date

January 2024

Version

4.0

carps's People

Contributors

jakujobi avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.