SDG .NET Core templates
These are the templates SDG uses during C#
lessons.
How to work with Custom Templates
First, read the docs.
Now with that in mind, The project has 3 main parts:
-
sdg-*.nuspec
. This file contains the meta data for the package that is built, The only items that need touched are the<files>
and the<version>
-
SampleApi
. This is sample project. Any changes to the template happen here. -
SampleApi\template.config
. This contains the behavior of the package. This generally isn't touch unless you are changing the project type.
How to update something
To update, I would recommend opening the SampleApi
Folder and working in that project like it was just a normal C# app. Get things working and then test it out.
./build helper script
Running ./build
will run nuget pack
for all the folders.
How to deploy
Install nuget
- for Windows follow these instructions
- on the Mac:
brew install nuget
Then set your API key for nuget.org
- Delete the
bin
and theobj
folder - Bump the version number in the
sdg-console-template.nuspec
. - run
nuget pack -NoDefaultExcludes .
- run
nuget push OUTPUTFILE.nupkg -Source https://www.nuget.org
whereOUTPUTFILE.nupkg
is the output file from thenuget pack .
step.
This will push it to Nuget. Nuget will index the package, and when it's done indexing (~ 1-30 minutes), it will available for install. To install, or upgrade:
dotnet new --install PACKAGE-NAME