question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Scaffolding empty controller/view in VS 15.4.3 adds EF package references

See original GitHub issue
  • ASP.NET Core 2.0.0
  • Visual Studio 15.4.3

If you right-click in Solution Explorer and add a controller or a view and specify it should be empty - no model, no actions, etc. - the scaffolding still adds references to:

  • Microsoft.EntityFrameworkCore.Design 2.0.0
  • Microsoft.EntityFrameworkCore.SqlServer 2.0.0
  • Microsoft.EntityFrameworkCore.Tools 2.0.0
  • Mcirosoft.VisualStudio.Web.BrowserLink 2.0.0
  • Microsoft.VisualStudio.Web.CodeGeneration.Design 2.0.0.

These get added as application references, not even with <PrivateAssets>all</PrivateAssets> to indicate they’re development dependencies instead of actual project references.

Is this expected? Could there be a way to scaffold an empty controller and/or empty view without adding any of these?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
vijayrkncommented, Nov 11, 2019

Thanks for the confirmation. This build will be released soon.

0reactions
stijnherremancommented, Feb 19, 2020

@deepchoudhery Yes, but only when targetting .NET Framework, which happens to be what my existing project is targetting. It does not happen when targetting .NET Core, but that is probably because the Microsoft.AspNetCore.App package already references the EF Core packages. Not sure where the BrowserLink package comes from.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Scaffold-DbContext from package manager console is ...
It happens because of missing PK . You have 2 options to manage this problem: Discover the table that don't have PK by...
Read more >
Scaffolding (Reverse Engineering) - EF Core
The scaffolder can create EF model and entity types that use C# nullable reference types (NRTs). NRT usage is scaffolded automatically when NRT ......
Read more >
(PDF) ASP NET MVC 4 in Action | jorge santos
This book begins with you working along as Scott Guthrie builds a complete ASP.NET MVC reference application. He begins NerdDinner by using the...
Read more >
Test-Driven JavaScript Development
Includes bibliographical references and index. ... on the qualities of JavaScript that set it apart from the pack, and as such ... 15.4.3...
Read more >
Full text of "Barmaja0000025"
Ad d 1 8 o n • We s I ey Professional Ruby Series THE RAILS 3 WAY Foreword by David H. Hansson...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found