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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:55:19+00:00 2026-05-22T20:55:19+00:00

I am totally new in building Visual Studio Project through a script, so feel

  • 0

I am totally new in building Visual Studio Project through a script, so feel free to correct me if you feel that my understanding about the process is incorrect.

I have a visual studio solution which consists of a Wpf.exe project and few class library projects.

Currently I am successfully building .sln file using script below

"%VS_IDE_DIR%devenv.com" "...Solution-File-Path.sln" /rebuild Release /useenv

Currently the Wpf.exe file gets the File Version and Product Version 1.0.0.0 which is the default specified in Publish -> Publish Version Property of Wpf project.
enter image description here

I want to somehow set the File Version and Product Version through my script. How can I achieve that?

I have an environment variable which contains the Product Version and File Version, Basically I want to set value of Product Version and File Version equal to my environment variable.

  • 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-22T20:55:19+00:00Added an answer on May 22, 2026 at 8:55 pm

    There’s a simple way to do this. In the WPF project, open the Properties node and double-click AssemblyInfo.cs. The [assembly: AssemblyFileVersion] attribute sets the File Version number. Add this to set the Product Version number:

    [assembly: AssemblyInformationalVersion("1.2.3.4")]
    

    Doing this from the command line is only technically possible. You’d have to create the native file version resource and compile it with rc.exe. And use Project + Properties, Resource file option to tell the compiler to use the custom .res file produced by rc.exe. You’d need scripting to get the version resource updated. Given how easy it is to do this by editing AssemblyInfo.cs, I’d recommend you don’t bother.

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

Sidebar

Related Questions

I keep reading about C99 and C++11 and all these totally sweet things that
First, I'm totally new to Obj-C please go easy on me :D I'm building
Totally new to custom control creation in Silverlight. I'm wanting a custom control that
I am totally new to SQL Server CLR. I understand that we should use
I have an exe that depends on multiple static libs and in visual studio,
I am totally new to SQL . I have a simple select query similar
I am totally new to XSLT and can't work out where I am going
Are there any good books for a relatively new but not totally new *nix
I've heard that unit testing is totally awesome, really cool and all manner of
I am totally new to SWIG interfaces and how to use this with C

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.