-
Notifications
You must be signed in to change notification settings - Fork 124
Add new scaffolded item missing #290
Comments
Hi @rhegner the scaffolding support is there but it's not feature complete yet. Scaffolding has some dependencies which are included in the Web + Individual Auth template. If the dependencies are not there then the menu item will not appear. In later releases we will update the support to edit If you have an existing project which was created with the Empty template (or any template besides Web + Individual Auth) you may need to make some edits to enable the option. @prafullbhosale @abpiskunov @balachir could you describe the requirements for the Add Scaffolded Item to be enabled? |
Thanks for your response! |
@rhegner lets see what @prafullbhosale has to say about the dependencies. |
Hi @rhegner, Scaffolding does indeed depend on EntityFramework. EntityFramework.MicrosoftSqlServer |
Thanks for this clarification. However to me it is not immediately obvious why scaffolding should depend on EntityFramework. In my opinion it would be desirable to be able to scaffold views and controllers based on arbitrary (non-EntityFramework) models. |
@rhegner this is just a point in time dependency. We will enable it w/o requiring EF in the next release hopefully. |
I have the same problem. I'm new to VS 2015 and I was following an example "Your First ASP.NET 5 Web App Using Visual Studio" |
@KimHojJ AFAIK you can add it using NuGet Packages (right-click on project - > manage NuGet Packages -> in search bar, type names of dependencies) @prafullbhosale Unfortunately, after adding those dependencies (and restarting Visual Studio) the "New Scafollded Item..." [mentioned in tutorial in asp.net docs] still doesn't appear. |
Adding the NuGet Packages mentioned by prafullbhosale enabled me to get the "Add Scaffold Item..." option. The pre-release NugetPackages I used : "EntityFramework.MicrosoftSqlServer": "7.0.0-rc1-final", |
@prafullbhosale I wish I had known this earlier. Added all dependencies and now I got options item for scaffolding functionality. |
This functionality seems to have disappeared. It was working a couple of weeks ago for me and I started a new project and I can't get it to work now. There is no context option for "Add new scaffolded Item...". Here is my project.json below. Any thoughts or comments would be appreciated { "dependencies": { "commands": { "frameworks": { "exclude": [ |
@RossAndrewMcLeod Did you ever find a solution for this? Just installed VS Community 2015 + ASP.NET 5 RC1 and I do not see this option. I've made sure I have the required dependencies that every other post references, but no joy at all. |
I can't even find most of those dependencies.
is installed, but
aren't even found by NuGet |
For those of you having issues, do you see the menu option if you use a project created from File->New Project and then select Web Application with Individual User Accounts auth setting? |
yes the issues still remain after using individual accounts Sayed. i have read this text which says scaffolding as been moved to command line, is this true, https://social.msdn.microsoft.com/Forums/vstudio/en-US/26298ce7-9491-48cb-8de0-10c8aa35f5ab/scaffolding-not-installed-on-visual-studio-2013-and-2015?forum=vssetup ? |
@marengz are you using Community edition of VS 2015? If not what version do you have installed. |
I ended up totally reinstalling VS 2015 (Community edition)... It's working now. |
VStudio 2015, i ended up reinstalling it twice, then the solution came with upgrading to ASP.NET 5 RC1, and adding the dependencies mentined above then its now working. phewwwww |
I'm still trying to reproduce this and still unsuccessful. One combo that I have not yet tried (because I'm having a hard time finding the installers) is having ASP.NET 5 RC1 + Azure SDK 2.8.1. If you are running into this and you have Azure SDK 2.8.1, try upgrading to the latest Azure SDK (2.8.2 at this time) and let me know if that fixes it. |
That is old info. See my update at dotnet/Scaffolding#135. |
I think that the ones still experiencing problems might have an invalid dependency: "Microsoft.Extensions.CodeGenerators.Mvc" used to be "Microsoft.Framework.CodeGenerators.Mvc" which won't work in RC1. So, check your dependencies and try using "Microsoft.Extensions.CodeGenerators.Mvc". I obviously figured this out the hard way myself... :) |
@timotahti the dependencies don't seem to be the problem. Here are the dependencies of a new project that I made that doesn't have the context option:
|
Hi, it seems I've lost MVC6 scaffolding (running rc1-final) for some reason. It's not available even if I create a new project using Individual User Accounts. Here's what I have installed (Help --> About Microsoft Visual Studio) - any ideas? The dependencies are OK and I have the latest ASP.NET RC1 (same version that 2J is using) + the latest Azure SDK (2.8.2.1) installed. Scaffolding used to work fine for me. Microsoft Visual Studio Enterprise 2015 Installed Version: Enterprise Architecture and Modeling Tools 00322-80000-00000-AA165 UML® and Unified Modeling Language™ are trademarks or registered trademarks of the Object Management Group, Inc. in the United States and other countries. Visual Basic 2015 00322-80000-00000-AA165 Visual C# 2015 00322-80000-00000-AA165 Visual C++ 2015 00322-80000-00000-AA165 Application Insights Tools for Visual Studio Package 4.2.60128.3 ASP.NET and Web Tools 2015 (RC1 Update 1) 14.1.20203.0 ASP.NET Web Frameworks and Tools 2012.2 4.1.41102.0 ASP.NET Web Frameworks and Tools 2013 5.2.40204.0 Azure App Service Tools v2.8.2 14.0.20201.0 Common Azure Tools 1.7 DataFactoryProject 1.0 GitHub.VisualStudio 1.0 Microsoft Azure Data Factory Node Node 1.0 Microsoft Azure HDInsight HQL Service 2.0.2900.0 Microsoft Azure HDInsight Tools for Visual Studio 2.0.2900.0 Microsoft Azure Mobile Services Tools 1.4 Microsoft Azure Tools 2.7 Microsoft Azure Tools 2.8 NuGet Package Manager 3.3.0 PreEmptive Analytics Visualizer 1.2 SQL Server Data Tools 14.0.50730.0 TypeScript 1.7.6.0 Xamarin 4.0.1.96 (dcea9c1) Xamarin.Android 6.0.1.10 (e98e962) Xamarin.iOS 9.4.1.24 (47eb74b) |
Fixed my problem by repairing Visual Studio and ASP.NET RC1 installations, in this order. |
I was using SQLite as my database provider for EF7 Adding the MicrosoftSqlServer nupkg again, made the menu item reappear. Glad I got it back. It got me stumped for a while, so I thought I'd mention it. It might help someone else out. But still that raises the question why the scaffolding should be disabled when using another EF database provider. Scaffolding should be database agnostic. This should definitely be fixed, since not everybody is targeting SQL Server/Windows, specially the new Linux and Mac guys (like me). |
Also missing in VS 2015 update 3. My project is updated from RC2 version... |
Hello, I have the same problem, even new project, hope this information will help you reproduce this problem. |
I had this same problem as well, but I was able to remedy it by comparing my project.json (Empty ASP.NET Core Web App without Auth) to the project.json generated when you create a full ASP.NET CORE Web App with Single User Auth. Make sure the files listed below are using the same versions: "Microsoft.EntityFrameworkCore.SqlServer" The final dependency I updated was "Microsoft.VisualStudio.Web.CodeGeneration.Tools", so it's possible some of the others before it may not be essential. Nonetheless, this is what worked for me. I am now able to add scaffolded items. I hope this helps someone! |
I was able to get it to show and work in a empty project by adding the following dependencies to my project. Hope this helps get people by with scaffolding for now until its baked into web projects.
|
@ddeamaral Thx, it works! |
Sorry but this still doesn't work for me. The option shows up now but nothing happens when I click it. (using Visual Studio 2017 RC, so no project.json but .csproj). |
@newton3 can you share you csproj file? |
Please find here - |
Please let me know if I am doing anything wrong here or if the functionality is not supported. |
@newton3 these package references are no longer valid for MSBuild based projects. https://gist.github.com/newton3/3a9f5a2105614177bd0d2620ec379691#file-project-csproj-L64-L69 Unfortunately for MSBuild based projects targeting 1.1 runtime, currently the scaffolding packages are not available publicly. (They will be available with the next VS 2017 RC release) Below is how you would update the project in case you are targeting 1.0 runtime Remove the highlighted package references from your csproj and add below to your project (add <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="1.0.0-msbuild2-final" />
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="1.0.0-msbuild2-final" /> Note that Once the scaffolding packages supporting 1.1 projects using MSBuild are available, you would just need to update the version numbers in the above items |
Ok.. Thanks! I hope adding packages from nuget as |
An update to this thread: If the project doesn't have the necessary package references, Visual studio will launch a dependency scaffolder to install the necessary packages to the project (and optionally add some files to the project). |
Hey all. Anyone know why I cannot install Entity Framework or even Microsoft.AspNet.Mvc? I can't install any of the above mentioned frameworks as I get this error message... NU1002 The Dependency Microsoft.AspNet.Mvc 5.2.3 does not support framework .NetCoreApp, Version=v1.0... I've got all updates offered to me installed so I have no idea what the problem is. I then remove the dependencies that won't work and now my project is broken, so I have to transfer everything to a new project. Anyone know why I'm having this much of an issue and I cannot add these nuget packages? |
The GitHub Issue Tracker for the aspnet/Tooling repo is being deprecated in favor of Visual Studio's Report a Problem tool. If this issue is still a problem with the RTW release of Visual Studio 2017, please report a new issue using the Report a Problem tool. While you can still use .NET Core and ASP.NET Preview tools with Visual Studio 2015, Visual Studio 2017 is now the officially supported tool for developing .NET Core and ASP.NET Core projects. By using the Report a Problem tool (available in both VS 2017 and VS 2015), you can collect detailed information about the problem, and send it to Microsoft with just a few button clicks. See Visual Studio's Talk to Us page for more details. Please use the discussion topic here for feedback and questions on the deprecation of this issue tracker. Thanks! |
This seems to no longer be an issue in VS2017 so that has been absolutely fantastically awesome! |
I am using Visual Studio Community for mac version 7.1.5 and I am experiencing this issue. Shouldn't this issue be fixed now? |
I'm having a similar problem in VS2017. I'm really stuck. I created a Core MVC project, which deployed and ran fine. I added Identity UI through Identity Scaffolding. It initially had an error when attempting to show the Login page (from the Identity UI scaffolding files). I found a workaround by adding MS.AspNetCore.Razor to the csproj. It apparently couldn't compile the scaffold pages at runtime without it. But the pages rendered with no style or codebehind-generated content. That's when I noticed that the codebehind files were missing from the deploy. All of them were set to "Do Not Copy." I changed them to "Copy Always." But they are still not present. Am I to assume they were included in the compiled DLL? If I deploy to a folder then all of the files are there. How can I verify that they are in the compiled DLL? BTW, I'm deploying to Azure. |
To report new issues, use the Report a Problem tool. The GitHub Issue Tracker for the aspnet/Tooling repo is now deprecated in favor of the Report a Problem tool. If you encounter a problem with Visual Studio, we want to know about it so that we can diagnose and fix it. By using the Report a Problem tool, you can collect detailed information about the problem, and send it to Microsoft with just a few button clicks. See here for more details. |
Im using Visual Studio 2015 with ASP.NET 5 RC1.
In the announcment (http://blogs.msdn.com/b/webdev/archive/2015/11/18/announcing-asp-net-5-release-candidate-1.aspx) it says that there should be a 'Add -> New Scaffolded Item' context menu, but it doesn't appear in my project.
The text was updated successfully, but these errors were encountered: