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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:17:30+00:00 2026-05-26T21:17:30+00:00

I have an issue figuring out how to escape double quotes properly in my

  • 0

I have an issue figuring out how to escape double quotes properly in my MSBuild FileUpdate target, in the ReplacementText attribute.

What I’m trying to do is very simple. I want to search for AssemblyFileVersion("1.0.0.0") and replace it with AssemblyFileVersion("1.0.0.<revision number here>"). I’m using a FileUpdate element that looks like this:

<FileUpdate Files="Properties\AssemblyInfo.cs" Regex="AssemblyFileVersion(\(\x22)(\d+)\.(\d+)\.(\d+)\.(\d+)" ReplacementText="AssemblyFileVersion$1$2.$3.$4.$(build_vcs_number_1)" />

This works fine, but it sure seems like a strange way to do it! Basically, since I wasn’t able to get double quotes to work in the ReplacementText attribute, I had to group the ” from the Regex string, and then use the group number to insert the ” into the ReplacementText (actually, I grouped the ( and the “, but I only needed to group the “).

I’ve tried all of the standard methods — \”, “”, \x22, \x22, \”, and nothing works. I must be missing something obvious here, but what is it?

Embarrassed…

  • 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-05-26T21:17:31+00:00Added an answer on May 26, 2026 at 9:17 pm

    In *ML in quoted strings use &quot; to represent quotes.

    For example:

    <FileUpdate Files="Properties\AssemblyInfo.cs" Regex="(AssemblyFileVersion\(&quot;\d+\.\d+\.\d+\.)\d+(&quot;\))" ReplacementText="$1$(build_vcs_number_1)$2" />
    

    You could probably also use single quotes instead, like so:

    <FileUpdate Files="Properties\AssemblyInfo.cs" Regex='(AssemblyFileVersion\("\d+\.\d+\.\d+\.)\d+("\))' ReplacementText="$1$(build_vcs_number_1)$2" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having some problems figuring out this issue. I have a server that
I'm having trouble figuring out how to solve this issue. I have a file
I am having issues figuring out what this issue is. I have googled around
just having a little issue figuring this jquery problem out. I have a table
I have an issue while getting the file name with out extension from a
I'm having a tough time figuring out a tricky issue. Here is what I
I am having an issue figuring out what I thought would be a simple
Hi I have a nasty memory management issue under ARC and cannot figure out
I am a developer trying to assist my server admin in figuring out how
I am figuring out binding in WPF, and running into an issue with object

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.