Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8172155
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T21:41:41+00:00 2026-06-06T21:41:41+00:00

I have a situation where we have a solution that uses Portable Areas and

  • 0

I have a situation where we have a solution that uses Portable Areas and T4MVC which has a separate project for T4MVC where all the generated files for the 7 portable areas and main MVC3 application. We have followed the instructions here we are automatically generating the classes when building the solution.

Whilst in VS2010 this all works fine in both Debug & Release builds but where I am running into issues is where I am trying to get this to run on TeamCity.

I have followed the instructions on setting up T4 on a build server here and if run msbuild on the build server I can see that it is able to fire up TextTemplate.exe and look to generate files, the problem is that it never finds the files to transform.

I have managed to reproduce the same behavior on my local machine when executing the same build script as is run on TeamCity.

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">

  <PropertyGroup>
    <Configuration>Release</Configuration>
    <TransformOnBuild>true</TransformOnBuild>
    <TransformFile>T4MVC\T4MVC.tt</TransformFile>
    <OverwriteReadOnlyOutputFiles>true</OverwriteReadOnlyOutputFiles>
  </PropertyGroup>


  <ItemGroup>
    <None Include="T4MVC\T4MVC.tt">
      <OutputFilePath>$(MSBuildProjectDirectory)\T4MVC</OutputFilePath>
    </None>
  </ItemGroup>

  <ItemGroup>
    <ProjectsToBuild Include="**\*proj" Exclude="ThemeGenerator\**" />
  </ItemGroup>

  <Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\TextTemplating\v10.0\Microsoft.TextTemplating.targets" />

  <Target Name="Clean">
    <ItemGroup>
      <BinFiles Include="*\bin\*.*" />
    </ItemGroup>
    <Delete Files="@(BinFiles)" />
  </Target>

  <Target Name="Build" DependsOnTargets="Clean;Transform">
    <MSBuild Projects="@(ProjectsToBuild)"
             ContinueOnError="false"
             Properties="Configuration=$(Configuration)" /> 
  </Target>
</Project>

When this executes I get the following output from msbuild with /v:diag set:

Building with tools version "4.0".
Target "CreateCandidateT4ItemList: (TargetId:2)" in file "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\TextTemplating\v10.0\Microsoft.TextTemplating.targets" from project "C:\TeamCity\buildAgent\work\daad348639a87062\Project_Build.xml" (target "Transform" depends on it):
Using "Message" task from assembly "Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
Task "Message" (TaskId:2)
  Creating a list of candidate items that might need to be processed by T4 items (TaskId:2)
Done executing task "Message". (TaskId:2)
Using "CreateItem" task from assembly "Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
Task "CreateItem" (TaskId:3)
Done executing task "CreateItem". (TaskId:3)
Done building target "CreateCandidateT4ItemList" in project "Project_Build.xml".: (TargetId:2)
Target "SelectItemsForTransform: (TargetId:3)" in file "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\TextTemplating\v10.0\Microsoft.TextTemp
lating.targets" from project "C:\TeamCity\buildAgent\work\daad348639a87062\Project_Build.xml" (target "Transform" depends on it):
Task "Error" skipped, due to false condition; ($(TransformFile)=='') was evaluated as (C:\TeamCity\buildAgent\work\daad348639a87062\T4MVC\T4MVC.tt=='').
Initializing task factory "CodeTaskFactory" from assembly "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Build.Tasks.v4.0.dll".
Using "FilterCandidatesBasedOnItemSpec" task from the task factory "Code Task Factory".
Task "FilterCandidatesBasedOnItemSpec" (TaskId:4)
Done executing task "FilterCandidatesBasedOnItemSpec". (TaskId:4)
Done building target "SelectItemsForTransform" in project "Project_Build.xml".: (TargetId:3)
Target "CreateT4ItemLists: (TargetId:4)" in file "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\TextTemplating\v10.0\Microsoft.TextTemplating.targets" from project "C:\TeamCity\buildAgent\work\daad348639a87062\Project_Build.xml" (target "ExecuteTransformations" depends on it):
Task "Message" (TaskId:5)
  Creating T4 items lists for project  ()... (TaskId:5)
Done executing task "Message". (TaskId:5)
Done building target "CreateT4ItemLists" in project "Project_Build.xml".: (TargetId:4)
Target "ExecuteTransformations: (TargetId:5)" in file "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\TextTemplating\v10.0\Microsoft.TextTemplating.targets" from project "C:\TeamCity\buildAgent\work\daad348639a87062\Project_Build.xml" (target "Transform" depends on it):
Using "TransformTemplates" task from assembly "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\TextTemplating\v10.0\Microsoft.TextTemplating.Build.Tasks.dll".
Task "TransformTemplates" (TaskId:6)
  Directive processors: (TaskId:6)
    {none} (TaskId:6)
   (TaskId:6)
  Include folders: (TaskId:6)
    {none} (TaskId:6)
   (TaskId:6)
  Assembly references: (TaskId:6)
    {none} (TaskId:6)
   (TaskId:6)
  Reference paths: (TaskId:6)
    {none} (TaskId:6)
   (TaskId:6)
  Parameter values: (TaskId:6)
    {none} (TaskId:6)
   (TaskId:6)
  Full list of templates passed in : (TaskId:6)
    {none} (TaskId:6)
   (TaskId:6)
  Performing full T4 transformation (TaskId:6)
    MinimalRebuildFromTracking = True (TaskId:6)
    forcedRebuildRequired = False (TaskId:6)
  \tTrackerLogDirectory = <null> (TaskId:6)
  Tracking is disabled. TrackerLogDirectory has not been specified (TaskId:6)
Done executing task "TransformTemplates". (TaskId:6)
Using "PreprocessTemplates" task from assembly "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\TextTemplating\v10.0\Microsoft.TextTemplating.Build.Tasks.dll".
Task "PreprocessTemplates" (TaskId:7)
  Directive processors: (TaskId:7)
    {none} (TaskId:7)
   (TaskId:7)
  Include folders: (TaskId:7)
    {none} (TaskId:7)
   (TaskId:7)
  Assembly references: (TaskId:7)
    {none} (TaskId:7)
   (TaskId:7)
  Reference paths: (TaskId:7)
    {none} (TaskId:7)
   (TaskId:7)
  Parameter values: (TaskId:7)
    {none} (TaskId:7)
   (TaskId:7)
  Full list of templates passed in : (TaskId:7)
    {none} (TaskId:7)
   (TaskId:7)
  Performing full T4 preprocessing (TaskId:7)
    MinimalRebuildFromTracking = True (TaskId:7)
    forcedRebuildRequired = False (TaskId:7)
  \tTrackerLogDirectory = <null> (TaskId:7)
  Tracking is disabled. TrackerLogDirectory has not been specified (TaskId:7)
Done executing task "PreprocessTemplates". (TaskId:7)

It would appear that on the build server T4 seems unable to find the projects that it needs to reference to generate the necessary classes. I have tried various combinations of input folders and assembly references but see unable to get T4 to “see” the files it needs.

Does anybody have any ideas how to resolve this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T21:41:42+00:00Added an answer on June 6, 2026 at 9:41 pm

    Frankly, I’m not sure that you can get that to work at all because T4MVC needs the VS host in order to access the DTE object model. See this related thread: Using T4MVC with build script

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a c99 function that uses openmp, which works as expected. I also
I have an application that uses data from a table which is almost always
Current situation: I have the current version of my MVC Framework which uses classes
I've heard before that including project and workspace/solution files in source control is generally
Hereis the situation: I have a folder that contains library DLLs, which are not
I am working on my first large project that uses EF4 and have been
I have a situation: In a single Solution I have two Projects. I need
I'm forced to find a solution for the following situation: I have a h1
I have situation, where running a query that filters by an indexed column in
I have situation in which I read a record from a database. And if

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.