DEV Community

Kashif Soofi
Kashif Soofi

Posted on

1

GTK4 `dotnet new` Project Template

I have been writing some samples using GTK4 using GirCore so its time to reduce the manual project setup steps and turn it into a dotnet new project template.

Project Template

Time to follow the excellent article by Syed Ibrahim.

I have taken out the project setup section from my GTK 4 tutorials and turned it into the template. I have created a console application, added GirCore.Gtk-4.0 nuget package to the project and updated the Program.cs to create a main Gtk window with Hello World label.

Next tutorial for GTK4 hopefully I will use this template to bootstrap the project. And I will keep it updated with new releases of GirCore.

Usage

  1. Clone repository locally
  2. Build nuget package dotnet pack -o .
  3. Install template for dotnet new using following command dotnet new install Gtk4.Templates.1.0.0.nupkg
  4. Create new project using template dotnet new gtk4-app --param:name [ProjectName] OR dotnet new gtk4-app -p:n [ProjectName]
  5. Uninstall template using following command dotnet new uninstall Gtk4.Templates

Source

Source code for the template is available on GitHub in gtk4-dotnet-template repository.

References & Resources

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay