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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T08:19:08+00:00 2026-06-10T08:19:08+00:00

Has anyone had experience performing xml transform on resx files before? I would like

  • 0

Has anyone had experience performing xml transform on resx files before? I would like to transform a resx file per configuration. Each configuration’s tranform file may replace some string values in the resource file. For example:

<None Include="Resources\Label.Release.resx.config">
  <DependentUpon>Label.resx</DependentUpon>
</None>
<EmbeddedResource Include="Resources\Label.resx">
  <Generator>PublicResXFileCodeGenerator</Generator>
  <LastGenOutput>Label.Designer.cs</LastGenOutput>
</EmbeddedResource>

I’m trying to tranform some data values in the resx file.
In Label.Release.resx.cofing:

<?xml version="1.0" encoding="utf-8" ?>
<root xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
  <data name="Title" xml:space="preserve"  xdt:Locator="Match(name)">
    <value  xdt:Tranform="Replace">CEO</value>
  </data> 
</root>

I tried playing with this in the BeforeBuild task:

<Target Name="BeforeBuild">
<MakeDir Directories="$(IntermediateOutputPath)\Resources" 
    Condition="!Exists('$(IntermediateOutputPath)\Resources')"/>
<TransformXml Source="Resources\Label.resx" Transform="Resources\Label.$(Configuration).resx.config" Destination="$(IntermediateOutputPath)\Resources\Label.resx" />

The Label.resx that results in $(IntermediateOutputPath)\Resources folder after has had no transformation. I’m also not sure if that’s the location that I would output the transformation result to because Lable.resx should be an embedded resorce in the end.

any help is appreciated

  • 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-10T08:19:10+00:00Added an answer on June 10, 2026 at 8:19 am

    Here’s what I ended up doing:

    <Target Name="TransLabel">
    <MakeDir Directories="$(IntermediateOutputPath)\Resources" Condition="!Exists('$(IntermediateOutputPath)\Resources')" />
    <TransformXml Source="Resources\Label.resx" Transform="Resources\Label.$(Configuration).resx.config" Destination="$(IntermediateOutputPath)\Resources\Label.resx" />
    <GenerateResource Sources="$(IntermediateOutputPath)\Resources\Label.resx" OutputResources="@(Resx->'$(IntermediateOutputPath)%(Identity).resources')">
    </GenerateResource>
    <Copy OverwriteReadOnlyFiles="true" SourceFiles="$(IntermediateOutputPath)\Resources\Label.resources" DestinationFiles="$(IntermediateOutputPath)\Ccwa.Resources.Label.resources" />
    <RemoveDir Directories="$(IntermediateOutputPath)\Resources" />
    </Target>
    
    <Target Name="AfterResGen">
    <CallTarget Targets="TransLabel" />
    

    I transform the resx file by hooking into the AfterResGen target, in which the normal resource generating process has taken place. Then I perform my own transformation and generate my own resource file. Then I replace the one already generated before the transformation. When the build continues and the project dll is generated, my transformed resource file is picked up.

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

Sidebar

Related Questions

Has anyone had this unusual(recurring) experience before? I'm trying to check out the project
Has anyone had experience generating files that have filenames containing non-ascii international language characters?
Has anyone had experience writing a game engine or demo engine using something like
Has anyone had experience using SSL with net.tcp binding in WCF? Ive read its
Has anyone had any experience in saving app preferences (within app, not in Settings
Has anyone had any experience using Adobe Air to create BitTorrent application? Is there
Has anyone had any experience writing a web control (in either ASP.net, or javascript/HTML/CSS),
Has anyone had any experience of talking between an iSeries (using IBM's Websphere MQ)
ORIGINAL Q: I'm wondering if anyone has had experience of migrating a large Cobol/PL1
Has anyone had experience canceling a workflow via webservices? Is it possible?

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.