I cannot get the current build of T4MVC (2.6.02) to work with an ASP.NET MVC 2 project compiled against .NET 4 in VS2010 Beta 2.
There is one error:
The C# 2.0 and C# 3.5 compilers are no longer supported. Templates will always be compiled with the version 4 compiler instead of 'v3.5' as specified.
Which is easily fixed by changing
...
Hey guys,
I'm trying to switch our links over to T4MVC, and I'm having a small problem with parameters that aren't part of an action's signature. We have a route that goes something like this:
http://www.mydomain.com/{fooKey}/{barKey}/{barID}
==> leads to BarController.Details(barID).
fooKey and barKey are only added to the links fo...
I'm trying to add the T4MVC templates to my project, but I'm experiencing some problems. I went to Codeplex and downloaded the latest version of T4MVC, and according to the instructions I just copied the two files T4MVC.tt and T4MVC.Settings.t4 into the root of my web application.
Immediately, I got the following errors:
From T4MVC.cs ...
#Html.RenderPartial(MVC.Shared.Views._Sorter);
throws error =>
There is no build provider registered for the extension '.spark'. You can register one in the section in machine.config or web.config. Make sure is has a BuildProviderAppliesToAttribute attribute which includes the value 'Web' or 'All'.
Description: An unhandled ...
I have a ASP.NET MVC site and it works just fine when I run it locally. Once I deploy that site to IIS 7 all links to resources are broken (ie. script files, images, css files). Could this be a route issue or would it be an IIS setting?
Here are my routes:
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRou...
I am using T4MVC, and I can't use a pre-build event to run TextTransform.exe as it relies on EnvDTE, and must be run with Visual Studio as host.
If I have run custom tool once, it works nicely because it marks itself dirty when its executed (AlwaysKeepTemplateDirty = true), but when you open the solution, it doesn't run on build, so I w...
I've been using T4MVC (FYI: v2.6.12) for quite some time, and I've been slowly moving over our code to this way of working (less reliance on magic strings).
But I've had to stop because, for some reason, T4MVC is unable to translate objects into urls, and only seems to be able to work on primitive types (int/string/etc).
Here is an exa...
I use T4MVC inside my asp mvc projects, mostly because it's brilliant. Is there an equivalent for asp webforms?
...
I'm trying to use T4MVC in Visual Web Developer 2008 Express Edition and it's not building any files. Is T4 supported in the express editions?
...
I suspected there was some hidden magic somewhere that stopped what looks like actual method calls all over the place in T4MVC. Then I had a view fail to compile, and the stackTrace went into my actual method.
[Authorize]
public string Apply(string shortName)
{
if (shortName.IsNullOrEmpty())
return "F...
I have these 2 routes :
routes.MapRoute("Agenda", ConfigurationManager.AppSettings["eventsUrl"] + "/{year}/{month}", MVC.Events.Index(), new { year = DateTime.Now.Year, month = DateTime.Now.Month });
routes.MapRoute("AgendaDetail", ConfigurationManager.AppSettings["eventsUrl"] + "/{year}/{month}/{day}", MVC.Events.Detail(), new { year =...
T4MVC is cool, but I have a couple of issues integrating it in my project, any help is really appriciated:
I've got such warnings for all my actions (I use SnippetsBaseController as base class for all my controller classes:
Warning 26 'Snippets.Controllers.ErrorController.Actions' hides inherited member 'Snippets.Controllers.Base.Sni...
I'm setting up T4MVC for MVC 2 on my website. I get 2 build errors:
No overload for method 'RenderAction' takes 3 arguments in T4MVC.cs
and
No overload for method 'Action' takes 3 arguments in T4MVC.cs
These are the ones in the T4MVC.cs file:
public static void RenderAction(this HtmlHelper htmlHelper, ActionResult result) {
...
In my application I have controller named Snippets both in default area (in application root) and in my area called Manage. I use T4MVC and custom routes, like this:
routes.MapRoute(
"Feed",
"feed/",
MVC.Snippets.Rss()
);
And I get this error:
Multiple types were found that match the controller named 'snippets'. This c...
I have found the place near the very top in a T4MVC template file (.tt) where assembly references can be added, which looks like:
<#@ assembly name="System.Core" #>
<#@ import namespace="System.Collections.Generic" #>
However, it seems that I can only reference assemblies that are in the GAC. i.e. if I have an assembly MyProject.Stu...
Is there a way to create a strongly typed T4MVC ActionLink with a hash in it?
For example, here is the link I'd like to create:
<a href="/Home/Index#food">Feed me</a>
But there's no extension to the T4MVC object that can do this.
<%= Html.ActionLink("Feed me", T4MVC.Home.Index()) %>
So, what I end up having to do is create an acti...
Async actions in AsyncControllers (in MVC2) have two action methods (ActionNameAsync and ActionNameCompleted) which seem to confuse T4MVC.
If it can't be done with T4MVC, is there a way to disable it from trying to include these methods?
...
Hello, I do use T4MVC v.2.6.15
I have following problem with registering routes. I didn't have it with default MVC route register.
My problem route is following:
AddRoute( routes, "Songs",
//new { controller = "Songs", action = "List", performerUrlTitle = "", page = 1 } );
MVC.Songs.List( "", 1 )
// M...
Hi,
Whenever I use t4Mvc to create a form post Url, e.g.
<% using (Html.BeginForm(MVC.Admin.Login.Index())) { %>
It generates a route like the following:
<form method="post" action="/admin/login/index?RouteValueDictionary=System.Web.Routing.RouteValueDictionary">
or when i use
<% using (Html.BeginForm(MVC.Admin.Login.Index(nul...
How do I test which view was rendered from a controller action if what I get is a T4MVC_ActionResult? Under normal circumstances I should be able to directly use TestHelper's methods, like in the examples:
pooController.Details().AssertViewRendered().ForView("Details")
...but, since through T4MVC I get a T4MVC_ActionResult instead of ...