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

  • Home
  • SEARCH
  • 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 8294081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T14:04:45+00:00 2026-06-08T14:04:45+00:00

I have two different ways to deploy my web app – one via IIS

  • 0

I have two different ways to deploy my web app – one via IIS Web Deploy, hooked up via MSBuild arguments in a custom build template, and using the One-click publish built into Visual Studio. I have also installed the Slow Cheetah transforms, and can successfully transform Web.config files.

However, I’m stuck on the Nlog.config files. If I use One-click publish, the webapp deploys fine with the updated config file. However, using the actual build process, nothing gets transformed. The source Nlog.config file is copied to the drop locations, the deployment package, and the output folder on the remote server.

The .csproj file has Nlog set up the same way as web.config, i.e.

<Content Include="NLog.config">
  <TransformOnBuild>true</TransformOnBuild>
    <Content Include="Web.config">
  <SubType>Designer</SubType>
  <TransformOnBuild>true</TransformOnBuild>
<Content Include="NLog.Debug.config">
  <DependentUpon>NLog.config</DependentUpon>
  <IsTransformFile>True</IsTransformFile>

The SlowCheetah preview function lets me know that my transform files are well-formed, as well. Not sure what I could be missing.

  • 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-08T14:04:46+00:00Added an answer on June 8, 2026 at 2:04 pm

    Well, I really biffed that one. After much poking, I found that I needed to include the following –

     <Import Project="TransformsFiles.targets" />
       <PropertyGroup>
         <TransformOnBuild>true</TransformOnBuild>
       </PropertyGroup>
    

    right above the final Project tag, as Sayed mentions here. This will actually transform the files, but they still won’t deploy successfully. I’ll have to add in some post-build events or something to take care of that. Not the best solution, but it’s working, at least.

    UPDATE: Just for comprehension, to deploy the files, I had to edit the .csproj file to include a new target and dump them manually to the remote server, but only after the transformation had completed. Take a look at your log file to see what’s going on, then just pick up the transformed file and move it to the remote server. That part of the code looks like this –

    <Target Name="PostTransformNLogConfig" AfterTargets="TransformAllFiles">
      <Copy Condition="Exists('d:\Builds\Binaries\NLog.config' )"
            SourceFiles="d:\Builds\NLog.config"
            DestinationFiles="\\remoteserver\NLog.config" />
    </Target>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a two different ways of representing data in my app: via UITableView
I have a web page which loads in two different ways; user can click
I have two different libGL libraries on the same Ubuntu 11.04 machine. One library
I have two different web applications running on two different instances of tomcat. I
I have two different arrays, one with strings and another with ints. I want
I have a table view that gets refreshed two different ways. Both are through
I have seen programs exporting to Excel in two different ways. Opening Excel and
We can write the same statement in two different ways as follows. I have
I have seen two different ways of merging local branches. git checkout master git
We have two different (maybe much more) ways to get an access to x

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.