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

Discussion in 'Microsoft C# .NET' started by Daniel Redman, Mar 22, 2004.

  1. 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?
     
    Daniel Redman, Mar 22, 2004
    #1
    1. Advertisements

  2. 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" <> wrote in message
    news:...
    > 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], Mar 22, 2004
    #2
    1. Advertisements

  3. >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
     
    Marc Scheuner [MVP ADSI], Mar 23, 2004
    #3
  4. 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]" <> wrote in message
    news:...
    > >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], Mar 26, 2004
    #4
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guest
    Replies:
    1
    Views:
    656
    babylon
    Mar 8, 2004
  2. Guest

    Translating VB.NET-code into C#.NET + ASP.NET

    Guest, Aug 10, 2004, in forum: Microsoft C# .NET
    Replies:
    1
    Views:
    187
    Your_name
    Aug 10, 2004
  3. Beenz
    Replies:
    2
    Views:
    193
    Beenish Sahar Khan
    Nov 17, 2005
  4. Glen Appleton

    VersionInfo (VB6) attributes in C#

    Glen Appleton, Jun 13, 2006, in forum: Microsoft C# .NET
    Replies:
    0
    Views:
    150
    Glen Appleton
    Jun 13, 2006
  5. Guest
    Replies:
    0
    Views:
    136
    Guest
    Nov 17, 2006
Loading...

Share This Page