madskristensen / AddAnyFile

A Visual Studio extension
Apache License 2.0
262 stars 119 forks source link

Add missing Microsoft.AspNetCore.Mvc reference for controller template #136

Open cbonezzi opened 1 year ago

cbonezzi commented 1 year ago

Describe the bug When you add a controller and you use Microsoft.AspNetCore.Mvc library for your dependency, the using statement on the newly created file is missing, and the controller base is also missing.

To Reproduce Steps to reproduce the behavior:

  1. Add Microsoft.AspNetCore.Mvc to dependencies on the project that you will create the controller file on.
  2. Add a controller file
  3. file will be missing the using statement for Microsoft.AspNetCore.Mvc and controller from base

Expected behavior the controller file should be

using Microsoft.AspNetCore.Mvc;

namespace ConsoleApp1.Controllers
{
    public class NameController : Controller
    {

    }
}

Screenshots

Additional context Add any other context about the problem here.