Devart T4 Editor Supporting Additional Extensions - editor

Does anyone know if it is possible to associate the Devart T4 Editor for Visual Studio add-in to additional file extensions. I am currently creating some custom MVCScaffolding T4 templates and their file extension is .t4 However, it looks like the Devart T4 Editor currently only is associated with .tt files. I know as a workaround that I can just rename my file until I am finished editing it, then rename back to run... But this is a pain when in an edit/debug cycle.

Thank you for the inquiry. We will add this extension in the nearest build.
This build will be available in several days.
Update. We have published the new build.

Related

How to reuse class library from existing solution

I would like some advice please.
I am about to start a new MVC application using Visual Studio 2013. I would like the new solution to reuse 3 projects (Class Libraries) from an older solution which was created in Visual Studio 2010.
I don't understand how I should reference these 3 class library projects in my new solution. Should I from my new solution:
Add --> Existing Project --> locate the .csproj file of the project I want to reuse
OR
Add Reference --> locate the .dll file of the project I want to reuse
Would either of these be the correct approach?
Any feedback much appreciated.
Thanks.

ASP.NET MVC source code missing solution file

I recently inherited some source code developed by someone else who is no longer with the company. However, the solution file was missing and I'm not even sure which version of MVC it was using. I'm experienced with ASP.NET, but not well-versed in MVC so I'm unsure how to go about rebuilding the solution the proper way. Looking for any tips/guidance on how to go about this.
Create a new, blank solution.
Open the solution in Windows Explorer.
Copy the project files into the solution folder.
Within Visual Studio, right-click the solution in Solution Explorer, and then chose the option to Add Existing Project....
Navigate to the solution folder (if necessary), and then select the .csproj (or .vbproj) file. The project will added into the solution.
Now, whether you can compile the solution/project depends on whether the version of MVC is compatible with the tooling installed in your instance of Visual Studio. If the project has NuGet dependencies, they should be restored the first time you build, depending (again) on your version of Visual Studio and tooling.
Edited:
Since you say that even the project file is missing, you can, assuming there are no external dependencies, create a new MVC project and then copy/paste the files into it (or drag & drop the files from Windows Explorer). Assuming there is a Views folder, it will have it's own web.config file. That config file will have bindings for the version of MVC the project was developed with.
MVC4 and newer projects tended to default to using Razor syntax, so the views will be littered with stuff like #Model. If it's using the older WebForms syntax (like <asp:ContentPlaceholder>), it's probably MVC3 or older.
Go to web.config file in the project and look for:
assembly="System.Web.Mvc,Version=3.0.0.0 ..."
In this example is.MVC 3, look for your version

how I can edit the asp.net mvc project direct from ftp using visual studio 12?

I have a mvc3 project on ftp server. The project is live runing. I want to edit the views without downloading them. I want to edit the file direct on FTP.
Have any clue how i can edit the file direct on FTP using Visual Studio.
I got a good sollution called Komodo Edit. What I want is simple edit my aspx razor file so Going with Komodo Edit is a good idea.
I want to edit the views without downloading them. I want to edit the file direct on FTP.
That does not exist. You must download a file before you can edit it, and re-upload it when done. There are IDE's and FTP programs that abstract this behavior by using a kind of temp folder and a FileSystemWatcher, but to my knowledge this isn't built in to Visual Studio.
And that is a good thing, because you do not want to edit live files through the IDE. How will you revert an accidental file deletion or other screwup? Use versioning, work locally, test locally, then publish to the server.

C++ Builder XE2 - custom component as part of the project/project group

Is it possible to use custom component derived from default one to be visible only as part of the project? The advantage of this solution is that I need not to distribute source code of component separately from that of application. Also there is no need for other developers to always check if they have installed the latest version. I need not to manage various versions and copy them somewhere to share my changes with other developers in team (whether it be network disk or SVN server). They get new version with every SVN update from server.
If i used delphi there would be solution - interposer class but this is not applicable to me. MS Visual Studio has possibility to use component only as part of Solution (analogy to MS VS Solution is ProjectGroup in C++ Builder).
What you are asking for is only possible if the component is created dynamically at run-time only. If the component needs to be accessible at design-time, then it must be installed into the IDE before the project can then use it.

Where to put custom view templates in MVC 3?

I want to create a replacement T4 template that can be called from Visual Studio's "add view". Where should I put the file? I'm not sure I should put it in
C:\Program Files\Microsoft Visual Studio 10.0\
Common7\IDE\ItemTemplates\VisualBasic\Web\
MVC 3\CodeTemplates\AddView\VBHTML
I suspect it will get wiped during repair etc if I put it there.
You can put your custom T4 template under your project like this:
{YourProjectFolder}\CodeTemplates\AddView
Of course this way it will only be enabled for this specific project, while putting them in the location you mention in your question will enable it for all your projects system wide.
Here you can find an interesting article going further into the details:
T4 Templates: A Quick-Start Guide for ASP.NET MVC Developers
There's even already a nuget package who does all the plumbing for you:
Add the ASP.NET MVC 3 Code Templates to your application with Nuget
create the following structure in the ROOT of your Project (Not solution):
CodeTemplates\AddView\VBHTML (in your case, or CSHTML for C# razor views) and copy the templates from that folder into the newly created VBHTML folder.
Also in set the Tool property in the files' Property to empty, otherwise it will ask to build the *.tt file every time you save. Also consider using Tangible T4 Editor extension for Visual Studio to edit the templates. It's available on http://visualstudiogallery.msdn.microsoft.com/
There are two possible locations. Either the one you showed which will be global for all projects on the system or in ~\CodeTemplates\AddView\VBHTML\MyTemplate.tt if you want this template to be available only for a given project. Here's a blog post about it.

Resources