Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / .NET SDK / March 2004

Tip: Looking for answers? Try searching our database.

How to set "SpecialBuild" VersionInfo in C#/VS.NET?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Daniel Redman - 22 Mar 2004 06:20 GMT
I'm searching all over for how to set the "FileVersionInfo.SpecialBuild"
property for my C# app from the VS.NET IDE/build environment, and all I can
see is how to read the property from an external app file.  I need to set
this string in order to embed licensing info for an auxiliary DLL to read.

When I Google for this, all I see is how to do it with a ".rc" file, but
AFAIK I'm not using ".rc" files in my project (I see several "resx" files
and some of these "VersionInfo" values seem to be set in the Assembly, but
not "SpecialBuild").

What's up with that?
Grant Richins [MS] - 22 Mar 2004 22:17 GMT
Good news and Bad news.  The good news is that you've already found most of
your answers.  The bad news is that the IDE won't help you much, if any, to
do this.  You are correct that you're not using .rc files in your project.
What is happening right now is that the compiler is generating the
equivalent of an .rc file for you and using that to set your output's file
version info.  The complier generates this based on several of the assembly
attributes.  Unfortunately there is no attribute that correlates with the
SpecialBuild field.  So if you really want to set it, you'll have to
manually create the .rc file (the VC project system has a great .rc file
editor which includes a rather nice file version info editor).  Hopefully
you're using 2003 or somebody else's build system because you'll need some
custom build rules.  As a pre-build step you need to run rc.exe to compile
the .rc file to a .res file.  Then you need to find some way to pass this
file to the C# compiler's /win32res command-line option (I can't remember
off the top of my head if this is even possible).

Signature

--Grant
This posting is provided "AS IS" with no warranties, and confers no rights.

> I'm searching all over for how to set the "FileVersionInfo.SpecialBuild"
> property for my C# app from the VS.NET IDE/build environment, and all I can
[quoted text clipped - 7 lines]
>
> What's up with that?
Marc Scheuner [MVP ADSI] - 23 Mar 2004 07:59 GMT
>The bad news is that the IDE won't help you much, if any, to
>do this.  The complier generates this based on several of the assembly
>attributes.  Unfortunately there is no attribute that correlates with the
>SpecialBuild field.  

Is this something that's gonna be improved in Whidbey??

Marc
================================================================
Marc Scheuner                        May The Source Be With You!
Bern, Switzerland                         m.scheuner(at)inova.ch
Grant Richins [MS] - 26 Mar 2004 03:26 GMT
There are no plans to add more attributes like this.  I think the
IDE/project system team is working on exposing more of the command-line
options as project settings.

Signature

--Grant
This posting is provided "AS IS" with no warranties, and confers no rights.

> >The bad news is that the IDE won't help you much, if any, to
> >do this.  The complier generates this based on several of the assembly
[quoted text clipped - 7 lines]
> Marc Scheuner                        May The Source Be With You!
> Bern, Switzerland                         m.scheuner(at)inova.ch

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.