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 9151543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:49:44+00:00 2026-06-17T11:49:44+00:00

In my t4 template file, I have the following line which definitely will break

  • 0

In my t4 template file, I have the following line which definitely will break in build mode.

<#@ assembly
name=”$(SolutionDir)\MYNAMESPACE.MYLIBRARY\bin\debug\MYLIBRARY.dll”> #>

In order to run this template from my asp.net web project, I have to hard code bin\debug in the above path.

Originally I had the following line,

<#@ assembly
name=”$(SolutionDir)\MYNAMESPACE.MYLIBRARY\$(OutDir)\MYLIBRARY.dll”

>

but having (OutDir) did not work because my web project outpath is bin\ folder and it kept looking for MYLIBRARY.DLL in bin folder as opposed to bin\debug folder. and I got the following error:

Compiling transformation: Metadata file
mynamespace.mylibrary\bin\mylibrary.dll’ could not be found

I can not update my web project output path property to bin\debug as opposed to bin\ because then the web project just would not run as explained in the article.

Q.. how can I get rid of hard coded bin\debug path in t4 template file??

  • 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-17T11:49:45+00:00Added an answer on June 17, 2026 at 11:49 am

    I updated the first line in my t4 template file as follows:

    <#@ assembly
    name=”$(SolutionDir)\MyNameSpace.MyLibrary\bin\$(ConfigurationName)\MyLibrary.dll”

    >

    Since, t4 template is only executed when I am developing software in debug mode, and I am using it to generate classes, its okay to even hard code it as bin\debug. Once class is generated using t4 template, its checked in and ready to be deployed to build machine.

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

Sidebar

Related Questions

I have a file template.txt which contains the following: Hello ${something} I would like
I have this code which will include template.php file from inside each of these
I have the following line in my url file url(r'^confirm/$', 'confirm', {'status':'live'}, name=confirm), As
I have a template file in a folder c:\template_folder. At runtime, I will create
Let's assume I have the following file - template.php : <?php $string = 'Hello
I've created my own theme. In the template.php file, I have the following code:
In my global.css file which is loaded by application.html.erb , I have the following
I have an XML Template file. This file contains a header and some predefined
I have a template file( template.txt ): Hello, $x Hello, $y I have a
Absolute beginner question: I have a template file index.html that looks like this: ...

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.