-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cannot generate scaffolded in visual studio 2015 #330
Comments
What happens then? Do you get an error? |
Yes it show error as below: |
I have the same problem while following MVA course "Build Responsive UI with Bootstrap," module 4 "Visual Studio and ASP.NET Integration," near timestamp 00:33:45. To follow along, I installed SideWaffle today, modified "CodeTemplates/MvcView/List.cs.t4" as shown in the presentation, and tried to add the AlbumsController scaffold. However I got a similar error in the unmodified Create.cs.t4 file. I spent some time trying to debug Create.cs.t4 without success, so I started over: deleted the entire CodeTemplates folder, saved and closed the solution to get rid of the persistent MvcView error, reopened the solution, added SideWaffle back in, and tried again to add the AlbumsController scaffold without modifying List.cs.t4. No luck... same error in Create.cs.t4. So I started over again: deleted the entire CodeTemplates folder, saved and closed the solution to get rid of the persistent MvcView error, reopened the solution, added SideWaffle back in, and deleted Create.cs.t4. This time, when trying to add AlbumsController scaffold, the error moved to Edit.cs.t4. I am attaching a screen shot of the error. I posted the problem in the MVA forum for "Building Responsive UI with Bootstrap" in a thread started by someone else (who could proceed by deleting both Create.cs.t4 and Edit.cs.t4). See But otherwise I am giving up and just editing my views manually until you guys fix this issue. |
Even the most simple use case doesn't work. Installing SideWaffle ASP.NET T4 templates to a project then trying to add a Create view for a view model. Error There was an error running the selected code generator: 'Failed to render template because of the following errors: ''Compiling transformation: } expected' at line number '168' and column number '33','Compiling transformation: } expected' at line number '537' and column number '33''.' |
Using templates for Details view does work however. |
updating t4 from prog files #330
Here is what I tried
The controller was added with my customizations fine. I went ahead and refreshed the t4 files and created a new vsix at https://ci.appveyor.com/project/sayedihashimi/side-waffle/build/1.21.404/artifacts. I'm wondering what's different from what I'm doing versus you. Are you running VS Community edition by chance? |
@sayedihashimi as you can see from the screenshot @wkrasl attached and my posting we were both having issues wtih the View templates. Please also give it a try with MvcView templates. Other than that, I am in fact using VS Community. I am also VS Enterprise user but I'll be only able to try it out with VS Enterprise tomorrow. Will let you know how it goes. |
Thanks for the notes. This sounds like a bug in Visual Studio community edition and not SideWaffle. I would expect that you get the same result if you copied .t4 template files from When you use SideWaffle in that scenario all it is doing is dropping the files in the right folder. When you invoke the Add New Scaffolded item dialog from there it's responsible for what happens after that. I'll open a bug on in https://github.com/aspnet/Tooling for this. |
OK I've opened aspnet/Tooling#585. Let's us that for follow up going forward. I'd be interested in hearing over there if any .t4 file works with VS Community edition, maybe that's the issue? |
@sayedihashimi Do you think this should be reported to VS's Connect rather than on ASP.NET Core tooling site? |
No this is better in the repo put it in. My team should do initial investigation since we own ASP.NET scaffolding. If T4 doesn't work at all in Community that's good for Connect. |
Reopening based on #384 (comment) for discoverability here. |
had a similar problem with the model that I was trying to use. I commented out the OnModelCreating override, then I could add the scaffolded item, and uncommented the OnModelCreating ovveride and ran the program it worked. |
so... here we are in Q1 of 2017 and this is still and issue. Fricken amazing. VS 2015 Community and Sidewaffle v1.21.400 Compiling transformation: } expected (Lines 169 and 538) |
Without Sidewaffle all generate well. But after install T4 template to project cannot generate anymore
The text was updated successfully, but these errors were encountered: