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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:30:07+00:00 2026-05-23T15:30:07+00:00

I’m currently playing around with the pre and post build events in VS2010, trying

  • 0

I’m currently playing around with the pre and post build events in VS2010, trying to get my SVN version number into the AssemblyInfo.cs file and hence compiled into my build dll.

In the pre-build I run a script which updates the AssemblyInfo.cs file and in my post build step I run a script to reset it to a zero.

I want to do this because if I leave the latest version, then SVN sees this as a change, which will be committed, which updates the SVN version number and hence results in another change; this gets kinda recursive.

The problem I have run into is that the build picks up the original version of the file, not the one updated by the pre-build step.

Therefore:

If (as a test) I manually set the version number in the file to:

[assembly:AssemblyVersion("1.0.0.123")]

Then the pre-build updates it to:

[assembly: AssemblyVersion("1.0.0.456")]

Then the post build updates it to:

[assembly: AssemblyVersion("1.0.0.0")]

And when I look at the dll that gets built, the version is 1.0.0.123

I have checked that pre-build step is completing before the build starts – but even if I enforce a long wait (by calling out to notepad.exe or something) VS2010 still doesn’t manage to pick up the updated file.

You can see this behaviour simply by putting notepad.exe in the pre-build command – then while notepad is running; go and change the AssemblyInfo.cs file by hand. The build won’t start unil you close the notepad – but once you close notepad it will then build with the original version of the file.

Am I missing something here in the way the pre-build is supposed to work? Is there any way to force the build to pick up and use the updated file?

Any clues 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-05-23T15:30:07+00:00Added an answer on May 23, 2026 at 3:30 pm

    Turns out that leaving the computer turned off for a couple days and coming back to it fixes this issue…
    I guess a computer restart might have been enough to shake it loose. Comes back to: Have you tried turning it off and on again. sigh

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am currently running into a problem where an element is coming back from
I'm trying to create an if statement in PHP that prevents a single post
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I want use html5's new tag to play a wav file (currently only supported
I have a French site that I want to parse, but am running into
I am trying to render a haml file in a javascript response like so:

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.