I have worked with previous versions of Umbraco in the past but am currently evaluating Umbraco 7 for a new project. I am looking for a more conventional approach than the default "txt" starter project that is suggested by default. Are there any other starter kits that are compatible with Umbraco 7? Preferably one that has good examples of the new MVC Razor code and page hierarchy.
Yep, the local gov, or here, or even here.
Have fun.
Related
I've just started playing around with JetBrains Rider IDE using one of my existing ASP.NET MVC projects. When attempting to create a new Razor View from template, I've been unable to find any templates which refer to Razor as stated here. These are all the templates I can see when adding a file template to a chosen folder.
Am I missing something like a plugin, nuget etc...? If worst comes to worst, then I don't mind creating them, it's just a slight annoyance that it clearly states they should be there.
OS: Windows 10 Build 17134
JetBrains Rider: 2018.1 Build #RD-181.4379.1191, built on April 14,
2018
Update
I've raised this with JetBrains support and so far they've advised that some predefined templates (Razor being one) are only available in subfolders of Views folder. More info can be found here. Sadly it's still not working for me but thought I'd add as it may help someone.
It's a bug! It's seems to be okay when creating a new solution but then at corrupts the template analytics when updating nugets and/or adding OWIN (I'm guessing the Startup.cs in the root of the project has something to do with it as well).
YouTrack: https://youtrack.jetbrains.com/issue/RSRP-469774
Update
It took nearly 5 years but they finally fixed it. I don't even use that IDE anymore lol!
There is already 7th beta version of ASP.NET 5, in which they say localization features are done. How can I use localization to write multi-language applications in asp.net 5 mvc 6 with visual studio 2015? Is there any working example project for beta 7 version? I have already searched and found many examples but they no more work because the code has been changed since that. Can I still use .resx files (because visual studio does not auto-generate Designer.cs files any more) or are there any newer or alternative methods they suggest?
Beta 7 introduced the localization, so it's really brand new. I wrote a short write up of everything that is new on my blog. There are a lot of things new, so if you need the features, I recommend reading it.
You can in fact still use Resx, but you have to understand that the resolution by default is, that the engine tries to find the resx file that matches the view.
For example, if you have a HomeController, and an action called Locpage, you need to have Views.Home.Locpage.cshtml.en-GB.resx to Support en-GB locale. The best part, however, is that you don't really need a resx file anymore :-). You can just implement your own implementation of IStringLocalizer and IStringLocalizerFactory, and it'll work. You can see the code for this on my blog, above.
If you want a working sample, the best place right now is their GitHub, so this right here: https://github.com/aspnet/Mvc/tree/dev/samples/LocalizationSample.Web.
Currently , I am developing a framework , I want to add custom scaffolding option in visual studio menu.
By default "MVC5 Controller with views, using Entity Framework" option 3 from the dialog box chooses "CodeTemplates\MvcControllerWithContext\Controller.cs.t4" , that t4 again targets view t4 templates inside
"CodeTemplates\MvcView\ModelMetadataFunctions.cs.include.cs.t4"
"CodeTemplates\MvcView\Create.cs.t4"
"CodeTemplates\MvcView\Edit.cs.cs.t4"
"CodeTemplates\MvcView\Delete.cs.cs.t4"
"CodeTemplates\MvcView\List.cs.cs.t4"
I have been modifying t4 templates almost a year, I haven't found a single piece of evidence that suggest that how it is targeting those views or how to add option in the scaffolding dialog. I have googled a lot , however haven't found anything close.
In summary , I am only looking for the place where I can add or modify the locations for those t4 templates and add a reference of a new scaffold in the scaffolding dialog box.
Any of the answer will be dearly appreciated. Thank you.
Before continuing to implement your framework using T4, you should be aware that the ASP.Net vNext team have quietly dropped support for T4 from MVC6 projects, so unless that decision is reversed, you will not be able to upgrade your framework.
As of Visual Studio 2015 CTP6, MVC6 projects do not support Single File Generators, which are a requirement for T4. The reasons given by the ASP.Net vNext team are described on the official GitHub repository for ASP.Net.
https://github.com/aspnet/Home/issues/272
UPDATE
David Fowler from the team has now (29-04-2015) confirmed that Single File Generators will be supported in MVC6, which in turn should allow support for T4.
UPDATE 2
To revert back to your original question on the topic of using Custom Code Templates for Scaffolding, this is not finalised for MVC6 and Visual Studio 2015.
I raised this question on the ASP.Net GitHub issue tracker thread mentioned above; Sayed Ibrahim Hashimi (MSFT) replied there will be some discussion regarding which technology and implementation will be followed, and at the moment the main candidates are T4 or Razor generator.
Sayed pointed to the following article that shows some early thoughts, but stresses that this is not finalised, and people should not time invest in this approach as it is likely to change.
http://blogs.msdn.com/b/webdev/archive/2014/08/23/how-to-customize-scaffolding-templates-for-asp-net-vnext.aspx
I need to upgrade an application that runs on ASP.NET MVC 1 to ASP.NET MVC 4.
The new application still uses the Webforms Viewengine. It uses StructureMap for Dependency Injection.
If possible I would like to upgrade manually.
For upgrading from ASP.NET 1 to ASP.NET 2 I found the white paper
http://www.asp.net/whitepapers/aspnet-mvc2-upgrade-notes
The steps described in the document seem to be of little risk:
Fiddle with web.csproj
Replace Version=1.0.0.0 in web.config by Version=2.0.0.0
Reference System.Web.Mvc (v2.0.0.0) in the project
chnange bindingRedirect in web.config
update css and js files
What about upgrading to MVC 4: Will there be different steps involved?
You would follow a similar set of steps to upgrade to MVC 4. Microsoft has a whitepaper that outlines the steps required to manually upgrade a project from MVC 3 to MVC 4.
I have upgraded from 3 to 4 following these steps and it was a pretty simple and smooth process. Going from 1 to 4 is a bigger jump of course, so to minimize headaches you might want to individually upgrade 1->2, 2->3, 3->4: if you run into any breaking code changes it will be easier to identify how to resolve them. But fundamentally, all you're really doing is changing project GUIDs and referencing newer DLLs and such. It's not brain surgery.
To answer Ashok's question, MVC 4 is certainly deployable if you wish to use it today - my public blog is running it (on my own server). Use preview software at your own risk, of course.
My understanding is that MVC 4 is still in developer preview so a lot of features may and likely will change when the RC version is release. Since it is in dev preview is it even deployable as a live site?
We have a web app that is using MVC Preview 3. I'm new to the project and relatively new to ASP.NET MVC itself - soon we will be looking to upgrade to either the Beta or RC version.
Are there any major difference between preview 3 and Beta version that would require extensive refactoring?
Any "gotchas"?
From my understanding the RC will be very close to the current Beta... does anyone have a view on this?
Any advice apprecited really.... thanks.
There were quite a few changes between preview 3 to the beta. IIRC the most pain came between preview 3 - preview 4.
One of the biggest gotchas is some of the functionality in the main dlls got placed into a separate dll because they were not going to be fully supported for the first release.
I suggest you brew a large pot of coffee and go and read everything Phil Haack and Scott Gu wrote around that time.
http://haacked.com/archive/2008/07/16/aspnetmvc-codeplex-preview4.aspx
http://weblogs.asp.net/scottgu/archive/2008/07/14/asp-net-mvc-preview-4-release-part-1.aspx
ASP NET MVC - Beta Release Notes has all the details regarding the changes. It is available at the mvc download page.