PC Review


Reply
Thread Tools Rate Thread

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

 
 
Daniel Redman
Guest
Posts: n/a
 
      22nd Mar 2004
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?



 
Reply With Quote
 
 
 
 
Grant Richins [MS]
Guest
Posts: n/a
 
      22nd Mar 2004
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).

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


"Daniel Redman" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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?
>
>
>



 
Reply With Quote
 
 
 
 
Marc Scheuner [MVP ADSI]
Guest
Posts: n/a
 
      23rd Mar 2004
>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
 
Reply With Quote
 
Grant Richins [MS]
Guest
Posts: n/a
 
      26th Mar 2004
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.

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


"Marc Scheuner [MVP ADSI]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> >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



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compare data set 1 with data set 2. Add to data set 2 if not found omar6881 Microsoft Excel Programming 0 21st Jul 2012 02:01 PM
VersionInfo (VB6) attributes in C# Glen Appleton Microsoft C# .NET 0 13th Jun 2006 04:51 PM
netsh set firewall set notifications not working? =?Utf-8?B?Y2hhcmxpZQ==?= Windows XP Security 0 29th Mar 2005 08:39 AM
How to set Administrator account, and how to set limited account for other User? cubus Windows XP General 4 3rd Feb 2005 01:01 PM
How to set "SpecialBuild" VersionInfo in C#/VS.NET? Daniel Redman Microsoft Dot NET Framework 3 26th Mar 2004 03:26 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:25 PM.