1 Solution
For some time now, CodeRush has detected and emitted Razor compatible code using the same templates as used in Pre Razor Views.
See attached image
Edit: It turns out that while MVC3 (Webforms) has been supported since 11.1, full razor templates were added in 11.2
-
Hi Rory,
I'm using 11.1 version and the templates are aspx not razor.
In razor project i get aspx templates as seen in the two screenshhots attched. -
Sounds like you have upgraded from a point where there were no Razor templates.
You may need to merge these new templates into your existing collectionSee this link http://community.devexpress.com/blogs/rorybecker/archive/2010/12/02/merging-coderush-templates-via-export-and-import.aspx
-
I read the article carefully and and made two root folders "Custom" for Html and in C#
In step 3( Reimport your Custom Templates )
I do not get the folder for HTML for C# I get.
The result like the reoprt before (14 hours ago).If these templates are integrated into CodeRush 11.1,
How I clean everythink before unistaling and insatlling CR again
and get these templates correctly in the instalations.
I think is a bug, since I have the same results in other comuter which
insalled CR 11.1. -
All CodeRush settings are held (by default) in your user profile.
You can reset all CodeRush settings by...
* Visiting %AppData%\CodeRush for VS .NET\1.1\ in explorer
* Rename (Or Delete if you don't need to backup your settings) the Settings.xml folderWhen next you restart CodeRush, your settings will be rebuilt from defaults (and these should include the Razor templates.
NOTE: Deleting Settings.XML will wipe all settings (including shortcuts, formatting preferences and templates). Only delete if you're sure you don't require these settings.
-
I backup and later !!delete!! Settings.xml folder and restart vs
and still in razor page I get aspx template as shown in the attched screenshot. -
Hi Daniel.
It looks like we added support for MVC3 (with WebForms) in 11.1
However it looks like we did not add explicit razor support until 11.2
To get this functionality you'll need to upgrade from 11.1 -> 11.2
-
I upgraded to 12.1.4 and the templates are not availble.
I attched screenshhot.
xhl not expanded while hl expanded. -
Hi Daniel,
We do not provide the 'xhl' template. Would you please clarify what expansion you expect? -
Please look in this post in the begining..
http://community.devexpress.com/blogs/markmiller/archive/2011/03/18/high-speed-mvc-development-in-visual-studio-with-coderush-and-devexpress-mvc-extensions.aspx -
Thank you for the clarification. I understand now what templates you mean. These templates are designed to easily exploit MVC Extensions from DevExpress. However, these templates are not shipped with the default CodeRush installation. Thus, you will have to manually download them from the link you provided and import to your CodeRush installation. Have you tried that?
-
I will try.
I tried it in 11.1 version and is not working and it said that it will be added from version 11.2 .
I advise to add it the default CR. -
Thank you for your advice. We agree that these templates should be included in the default CodeRush installation. We will consider moving them.
-
Hi Alex,
No it is not working.
I used the following post and all templates not expanded in razor cs.html files.
http://community.devexpress.com/blogs/markmiller/archive/2011/03/18/high-speed-mvc-development-in-visual-studio-with-coderush-and-devexpress-mvc-extensions.aspx -
Hi Daniel,
Those templates work as expected on my side. Let's find out why these templates do not work for you. To do this, would you please clarify the following questions?
- Have you downloaded both files from the original blog post?
1. HTML_MVC_DevEx Extensions.xml
2. CSharp_ASP.NET_MVC_DevEx Extensions.xml- Have you imported them into appropriate languages?
HTML_MVC_DevEx Extensions.xml in HTML
CSharp_ASP.NET_MVC_DevEx Extensions.xml in CSharp- Have you replaced the existing templates while importing?
We appreciate your assistance.
-
In first time it didn'tt ask me to relplace
and later i made again all process and now it asked me to replace it.
I follow exatly what u said and what said in the blog.
And is not working. -
Daniel,
Your issue with these code templates aroused our interest. Would you please create a screen recording illustrating the problem in action, or a few screenshots where the imported templates are shown in the Templates option page and how they behave in an MVC application? For instance, you can capture it using the free Jing tool from TechSmith. -
On sunday.I'm at home today I will recorde it.
-
Take your time, Daniel. Thank you in advance.
-
Added.
-
Hi Daniel,
Thank you for recording a screencast. We have reviewed it and see that your reproduction steps are the same as ours.
To investigate the issue further, would you please zip and share your code template setting files? You can obtain them here:
%AppData%\CodeRush for VS .NET\1.1\Settings.xml\Editor\Templates\
We need all the files located in this folder.
In addition, please clarify if other templates are expanded as expected? Have you switched the profile of your settings scheme by chance? We have introduced the Friction Free setting scheme, where the Template Expansion key has been changed from Space to Tab. Are other built-in CodeRush templates expanded as expected? Thank you for your cooperation in advance.
-
The templates.
-
This link not work:
http://community.devexpress.com/AppError.aspx?aspxerrorpath=/blogs/markmiller/archive/2011/03/18/high-speed-mvc-development-in-visual-studio-with-coderush-and-devexpress-mvc-extensions.aspx
Once it will be fixed I will test other DevExpress Templates as u reuested.
al =>
@Html.ActionLink("linkText", "actionName", "controllerName") -
Hi Daniel,
I've applied your templates and see that they do not contain the imported code templates from the blog post. The correct link to the block post is the following - http://community.devexpress.com/blogs/markmiller/archive/2011/03/18/high-speed-mvc-development-in-visual-studio-with-coderush-and-devexpress-mvc-extensions.aspx.
I have imported DevExpress MVC code templates into your collection. I'm attaching this collection to this comment. Would you please try to replace your current templates in the following folder:
%AppData%\CodeRush for VS .NET\1.1\Settings.xml\Editor\Templates\
with the attached ones? I hope that this will fix the issue.
-
Where the attchments ?
-
Here you are.
-
Now
xtv =><% Html.DevExpress().TreeView( settings => { settings.Name = "treeViewName"; settings.EnableAnimation
= true; settings.EnableHotTrack = true; settings.ShowTreeLines = true; settings.ShowExpandButtons
= true; settings.Width = 300; var node = settings.Nodes.Add("Root"); var subNode
= node.Nodes.Add("Child Node"); }) .Render(); %>Not razor syntax and not arrange the code like in doc:
each value pair in new row like in the post above. -
Hi Daniel,
You are correct, these templates were not updated appropriately. We will update them when we ship them out-of-the-box. But for now, you will have to manually tweak them on the Templates option page in the Options Dialog.
Is your intention to post an answer to your own question?
- If so, then proceed.
- If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
- If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.
Facebook
Twitter
Google+