2

Im a bit new to this stuff. I Want to generate a .rc file that would include Version Information & Also contain Icons in it..

Version Information:

VS_VERSION_INFO VERSIONINFO
FILEVERSION    1,0,0,0
PRODUCTVERSION 1,0,0,0
{
    BLOCK "StringFileInfo"
    {
        BLOCK "040904b0"
        {
            VALUE "CompanyName",        "JACK Inc.\0"
            VALUE "FileDescription",    "MyApp\0"
            VALUE "FileVersion",        "1.0.0.0\0"
            VALUE "LegalCopyright",     "© 2017 JACK Inc. All Rights Reserved\0"
            VALUE "OriginalFilename",   "MyApp\0"
            VALUE "ProductName",        "MyApp\0"
            VALUE "ProductVersion",     "1.0.0.0\0"
        }
    }
    BLOCK "VarFileInfo"
    {
        VALUE "Translation", 0x409, 1200
    }
}

The icons Portion:

// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_MYAPP_ICON          ICON                    "icon1.ico"
IDI_MYAPP_ICON_SMALL    ICON                    "icon2.ico"

I already have windows sdk wherein i will use the rc.exe to compile it to a .res file to be used as a Win32Resource in a csproj file . Im only confused on how to correctly script the .rc file to include both of the above contents.. Please Help...

CrazyFirewall
  • 33
  • 2
  • 7
  • Why don't you use the AssemblyInfo.cs and the assembly attributes that go in that file? Or you want this for a c++ program, in which case the tag is wrong – rene Jun 04 '17 at 17:37
  • Its for a C# assembly file a .dll. I need to include the version info & icons.. to be then compiled using msbuild.. I want to include the .res file in the csproj (win32resource) – CrazyFirewall Jun 04 '17 at 17:40
  • https://msdn.microsoft.com/en-us/library/4w8c1y2s(v=vs.110).aspx – rene Jun 04 '17 at 17:43
  • It looks like it is possible: https://blogs.msdn.microsoft.com/astebner/2006/02/28/how-to-build-a-managed-assembly-that-contains-win32-resources-using-visual-studio-2005/ – rene Jun 04 '17 at 17:46
  • yes... im only confused on how to place the above contents & correctly to build the res file successfully – CrazyFirewall Jun 04 '17 at 17:53
  • For which toolstack do you need this? Is this still .Net 4/ .Net 4.5? – rene Jun 04 '17 at 19:09
  • You'll have to stop using the resource identifiers, just use plain numbers. And you *have* to use an application manifest. [Look here](https://stackoverflow.com/a/8914810/17034). – Hans Passant Jun 04 '17 at 21:28
  • The toolstack is 4.0 – CrazyFirewall Jun 05 '17 at 04:52
  • How to create a app.manifest file, Im a bit confused – CrazyFirewall Jun 05 '17 at 05:43

1 Answers1

-1

Probably you can generate this.

-------VB6-------
"%ProgramFiles%\Microsoft Visual Studio\VB98\Wizards\rc.exe" /r /fo "Resources.res" "Resources.rc"

-------project.vbp-------
ResFile32="Resources.res"
Alan Turing
  • 2,482
  • 17
  • 20