Last active
March 4, 2017 16:50
-
-
Save aswad32/10b79cc645879dcdf42089b540e3f14a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Project Structure | |
MyCode | |
--MyCode.sln | |
--src | |
--MyCode.Common | |
--MyCode.WebApi | |
#Create Main Solution | |
> dotnet new sln --name MyCode | |
#Create Class Library Project | |
> dotnet new classlib --name MyCode.Common --framework netcoreapp1.1 | |
#Create WebApi Project | |
> dotnet new webapi --name MyCode.WebApi --framework netcoreapp1.1 | |
#Add Project to Solution (inside root directory) | |
> dotnet sln MyCode.sln add ./src/MyCode.Common/MyCode.Common.csproj | |
> dotnet sln MyCode.sln add ./src/MyCode.WebApi/MyCode.WebApi.csproj | |
#Add References from one project to another | |
#Change directory to source where you want to add references to (in this case MyCode.WebApi) | |
> dotnet add reference ../MyCode.Common/MyCode.Common.csproj | |
#Build Project (inside root directory if want to build all project) | |
> dotnet build |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment