ASP.NET Core 3.x Stuff
We'll want to create a local repo.
- (do this just once):
git init
- (do this just once):
git remote add origin https://github.com/gherreragonzalez1/CIDM3312.git
- (do this just once):
dotnet new gitignore --output <Name>
- (do this whenever there are new files):
git add -A
- (do this on every commit - kinda like a save):
git init -m 'a descriptive message indicating what is new'
- (do this every time you want to save to the server):
git push -u origin master
- Create a repository on GitHub
- Create a README.MD file inside ~Documents/Code
git init
git add -A
git commit -m 'added README.MD'
git branch -M master
git remote add origin https://github.com/gherreragonzalez1/{repository-name}.git
git push -u origin master
- Create a new folder inside ~Documents/Code
- cd .. Documents/Code/{folder}
dotnet new globaljson --sdk-version 3.1.402
dotnet new gitignore
git add -A
git commit -m 'added globaljson and gitignore'
git push -u origin master
- cd .. Documents/Code/{folder}
- Create a library and a client folder inside ~Documents/Code/{folder}
- cd .. Documents/Code/{folder}/library
dotnet new classlib
- cd .. Documents/Code/{folder}/client
dotnet new console
- cd .. Documents/Code/{folder}
dotnet new sln
- cd .. Documents/Code/{folder}/library
- Create contents of the new project
- cd .. Documents/Code/{folder}
dotnet new mvc --no-https --framework netcoreapp3.1
- cd .. Documents/Code/{folder}
- Add library and client to solution file
- cd .. Documents/Code/{folder}
dotnet sln add ./client/client.csproj
dotnet sln add ./library/library.csproj
- cd .. Documents/Code/{folder}
- Letting client know that there is a library to use
- cd .. Documents/Code/{folder}/client
dotnet add reference ../library/library.csproj
- cd .. Documents/Code/{folder}/client
We can also create a repository and a new web project template in one sitting, as seen next.
- Create a repository on GitHub
- Create a README.MD file inside ~Documents/Code/{folder}
dotnet new globaljson --sdk-version 3.1.402 --output {folder}
(just once)git init
(do this just once inside ~Documents/Code)git add -A
(do this whenever there are new files)git commit -m 'added README.MD'
(do this after every git add -A)git branch -M master
git remote add origin https://github.com/gherreragonzalez1/{repository-name}.git
(just once)git push -u origin master
(do this everytime you want to upload to GitHub)dotnet new gitignore --output {folder}
(just once for every project)dotnet new --no-https --output {folder} --framework netcoreapp3.1
(just once for every project)- This command creates the contents of the web project
- These next commands should be performed frequently:
git add -A
git commit -m 'added project files'
git push -u origin master