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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:32:13+00:00 2026-06-09T23:32:13+00:00

I am trying to find version numbers in AssemblyInfo.cs files that don’t start with

  • 0

I am trying to find version numbers in AssemblyInfo.cs files that don’t start with the Major.Minor numbers I am building. I have tried various versions of this but it doesn’t do what I want – can anyone help with my RegEx?

        <MSBuild.ExtensionPack.FileSystem.File Condition="'$(BuildNumber)' != ''"
                                           TaskAction="Replace"
                                           RegexPattern="Version\(\&quot;(?:![$(VersionMajor).$(VersionMinor)])\d\.\d\.\d\.\d)\&quot;\)"
                                           Replacement="Version(&quot;$(VersionMajor).$(VersionMinor).0.0&quot;)"
                                           Files="$(AssemblyInfoFiles)" />

Note that I am using the AssemblyInfo class inthe extension pack but the above is for the initial set.

EDIT
Here is the working version I am using with @Omega’s help. Note that i am using a VersionMajorMinor property I already have.

        <!-- Update all the assembly info files with generated version info -->
    <MSBuild.ExtensionPack.FileSystem.File TaskAction="Replace"
                                           RegexPattern="Version\(\&quot;(?!$(VersionMajorMinor)\.)\d+\.\d+\.\d+\.\d+\&quot;\)"
                                           Replacement="Version(&quot;$(VersionMajorMinor).0.0&quot;)"
                                           Files="@(AssemblyInfoFiles)" />
  • 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-09T23:32:14+00:00Added an answer on June 9, 2026 at 11:32 pm

    Try Version\(\&quot;(?!$(VersionMajor)\.$(VersionMinor)\.)\d+\.\d+\.\d+\.\d+\&quot;\)

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

Sidebar

Related Questions

Below, I am trying to find the latest version of a file that could
I am trying to extract numbers from a typical scoreboard that you would find
I'm trying to find some solid information on the version numbers and branching/merging with
Basically i am trying to find out what version of ArcGIS the user currently
I'm trying to find any research/academic/journal papers/articles that analyze recent versions of Qt and
I have a C/C++ program which is a Firefox plugin. I'm trying to find
I have a web application that is deployed to a server. I am trying
I'm trying to find the count of the number of devices that are greater
Ok folks I have bombed around for a few days trying to find a
I have been trying to format regional (locale) specific numbers, dates etc using Jquery.

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.