ConsoleMVC.Framework 1.1.0

dotnet add package ConsoleMVC.Framework --version 1.1.0
                    
NuGet\Install-Package ConsoleMVC.Framework -Version 1.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ConsoleMVC.Framework" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ConsoleMVC.Framework" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="ConsoleMVC.Framework" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ConsoleMVC.Framework --version 1.1.0
                    
#r "nuget: ConsoleMVC.Framework, 1.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ConsoleMVC.Framework@1.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ConsoleMVC.Framework&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=ConsoleMVC.Framework&version=1.1.0
                    
Install as a Cake Tool

ConsoleMVC

An MVC framework for console applications, inspired by ASP.NET Core MVC.

ConsoleMVC brings the familiar Controller-ViewModel pattern to console apps — with convention-based routing, reflection-based auto-discovery, and Razor-like .cvw view templates powered by a C# source generator.

Quick Start

# Install the template
dotnet new install ConsoleMVC.Template

# Create a new project
dotnet new consolemvc -n MyApp
cd MyApp
dotnet run

How It Works

Program.cs — familiar ASP.NET-style builder:

var builder = MvcApplication.CreateBuilder(args);
var app = builder.Build();
app.Run();

Controllers — inherit from Controller, return ActionResult:

public class HomeController : Controller
{
    public ActionResult Index()
    {
        var model = new HomeViewModel { Title = "Hello!" };
        return View(model);
    }
}

Views.cvw files with @model directive, no class boilerplate:

@model MyApp.Models.HomeViewModel

Console.WriteLine(Model.Title);
Console.Write("Press any key...");
Console.ReadKey();

return NavigationResult.To("Home", "Index");

Models — simple DTOs:

public class HomeViewModel
{
    public string Title { get; set; } = "";
}

Features

  • Convention-based routing — Controllers and Views are auto-discovered via reflection and namespace conventions
  • Razor-like view engine.cvw files are compiled into ConsoleView<TModel> classes at build time by a source generator
  • No boilerplate — Views are plain C# code with an @model directive, no class inheritance required
  • Familiar APIView(), RedirectToAction(), ViewData — all the patterns you know from ASP.NET Core MVC
  • Navigation — Views return NavigationResult to control app flow (NavigationResult.To(), NavigationResult.Quit())
  • Form data posting — Views collect user input via Console.ReadLine() and post it to controller actions using NavigationResult.To("Controller", "Action", formData). The framework automatically binds the data to action method parameters — either as individual simple types (int, string, etc.) or as a complex model class with matching property names

IDE Support

For .cvw file recognition, syntax highlighting, and icon support in JetBrains Rider, install the ConsoleMVC CVWSupport plugin:

Documentation

For full documentation and source code, visit the GitHub repository.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.0 58 4/14/2026
1.0.3 57 4/14/2026
1.0.2 71 4/13/2026 1.0.2 is deprecated because it has critical bugs.
1.0.1 79 4/13/2026 1.0.1 is deprecated because it has critical bugs.
1.0.0 76 4/13/2026 1.0.0 is deprecated because it has critical bugs.