locked
Version tab didn't show up in file properties dialog box RRS feed

  • Question

  • I got a c# project, and its assemblyInfo.cs, with specified assembly description, file version, etc.

    I also used one old win32 resouce file to only store some bitmaps.

     

    I followed the instructions here to include that rc file.

    But when I used explorer to view properties on the assembly, there is not a version tab, so I cannot see the assembly version or file version or other assembly attributes. The only tabs that showed up were General, Security, and Summary.

     

    Did I miss sth?

    Thanks.

    Tuesday, September 4, 2007 10:19 AM

Answers

  • I believe the native resource is wiping out the existing VERSIONINFO structure that was auto-generated.  I vaguely remember having this problem in VS2002 when I worked with native resources.  Looking at the documentation for /win32res confirms my suspicions.  It says that if you don't specify the option then it'll generate a VERSIONINFO for you.  Therefore if you use it you must generate the entry yourself.

     

    Michael Taylor - 9/4/07

    http://p3net.mvps.org

     

    Tuesday, September 4, 2007 1:23 PM
    Moderator

All replies

  •  

    The resource file is overwriting the version information that was generated by the managed assembly.  I don't remember if this is an automatic thing or whether it only occurs if the resource file contains a VERSIONINFO resource.  You'll have to either remove the VERSIONINFO resource from the native resource or build an equivalent one. 

     

    Is there any reason why you feel the need to create a native resource to store bitmaps when you can just extract/store the bitmaps in a managed resource?  It would simplify things greatly.

     

    Michael Taylor - 9/4/07

    http://p3net.mvps.org

     

    Tuesday, September 4, 2007 12:07 PM
    Moderator
  • however, I just checked that rc file, only icons, no VERSIONINFO.

     

    I missed one thing. In fact, my app includes many projects, but I used one project to generate 3 apps, by use of different compiling paramters. All 3 app exes don't get version tab.

    Tuesday, September 4, 2007 12:40 PM
  • You are including the AssemblyInfo.cs (or whatever) file that contains the versioning information, correct?  How exactly (and why) are you generating apps through a project?

     

    Michael Taylor - 9/4/07

    http://p3net.mvps.org

    Tuesday, September 4, 2007 12:50 PM
    Moderator
  •  

    Right, I used AssemblyInfo.cs to include versioning info.

    I manually modified another csproj file to repeatly build this project 3 times, with different constant passed in, to generated different bits. 

    The reason is I use the same source code to generate different versions of my app.

    Tuesday, September 4, 2007 12:56 PM
  • I believe the native resource is wiping out the existing VERSIONINFO structure that was auto-generated.  I vaguely remember having this problem in VS2002 when I worked with native resources.  Looking at the documentation for /win32res confirms my suspicions.  It says that if you don't specify the option then it'll generate a VERSIONINFO for you.  Therefore if you use it you must generate the entry yourself.

     

    Michael Taylor - 9/4/07

    http://p3net.mvps.org

     

    Tuesday, September 4, 2007 1:23 PM
    Moderator
  •  

    Looks like you're right. I just removed all rc files, then got right.

    So I gotta create those icons in managed way.

     

    btw, I did use /win32res option. Weird!

     

    Thanks a lot.

    Tuesday, September 4, 2007 1:27 PM
  • If you still have the original image files then creating the managed resource is straightforward.  If not then use VS to extract the images from the native resource and save them locally.  You'll need to embed the resource into a DLL or EXE before VS can extract them.

     

    Michael Taylor - 9/4/07

    http://p3net.mvps.org

     

    Tuesday, September 4, 2007 1:44 PM
    Moderator