ResGen.exe 64-bit VS2010 .NET 4- Bug
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: ResGen.exe 64-bit VS2010 .NET 4- Bug

  1. #1
    Join Date
    Oct 2012
    Posts
    6

    ResGen.exe 64-bit VS2010 .NET 4- Bug

    This is a good link describing Mickeysoft's unrelenting quality of support:
    http://social.msdn.microsoft.com/For...2-4f0c1e32d3b4
    So impressed was I that I decided to come and post it here.
    Can anyone come up with an error description for this?:
    "ResGen.exe" exited with code -1073741701.

    Platform: Windows 7 Ultimate, 64-bit

    Environment: Visual Studio 2010 Enterprise SP1 (x86 of course) (Office Professional 2010 is installed (x86) also, if relevent - it's not).

    Create a new windows custom user control project with .NET 3.5 as the target platform.

    Add a control and throw an image on it.

    Right-click solution and Build. Error may or may not occur.

    Change the target platform to .NET 4. Compile again (no error).

    Change the platform back to .NET 3.5 and compile again (error occurs).

    Compile one more time (doing nothing else). Error goes away.

    From this point you can play in the project and the error will return intermittantly. Changing the resource contents should cause the error to reoccur.

    Thanks!
    WindowsTeamFoundationWuzIntelligentThinking

  2. #2
    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    3,634

    Re: ResGen.exe 64-bit VS2010 .NET 4- Bug

    I can't reproduce that since I don't have that environment but searching developer studio include files gives that the error could be STATUS_INVALID_IMAGE_FORMAT. From ntstatus.h (VS2005)
    // MessageId: STATUS_INVALID_IMAGE_FORMAT
    //
    // MessageText:
    //
    // {Bad Image}
    // The application or DLL %hs is not a valid Windows image. Please check this against your installation diskette.
    //
    #define STATUS_INVALID_IMAGE_FORMAT ((NTSTATUS)0xC000007BL)
    So it might be something in your setup that isn't 100% valid. Do the VS shells for those setups look alright?

    Of course there are always the possibility of some hardware issues like disk/file, RAM issues but I guess that you already have checked that?
    Debugging is twice as hard as writing the code in the first place.
    Therefore, if you write the code as cleverly as possible, you are, by
    definition, not smart enough to debug it.
    - Brian W. Kernighan

    To enhance your chance's of getting an answer be sure to read
    http://www.codeguru.com/forum/announ...nouncementid=6
    and http://www.codeguru.com/forum/showthread.php?t=366302 before posting

    Refresh your memory on formatting tags here
    http://www.codeguru.com/forum/misc.php?do=bbcode

    Get your free MS compiler here
    http://www.microsoft.com/visualstudio/eng/downloads

  3. #3
    Join Date
    Oct 2012
    Posts
    6

    Re: ResGen.exe 64-bit VS2010 .NET 4- Bug

    Thanks for the response.
    The error you're describing is relevent to a 64-bit assembly being called from a 32-bit assembly (possibly vice-versa, but I've never seen the reverse).
    This is definately not that error. If you click on the link to the MSDN forum entry, you'll see what I'm talking about.

    The problem is with VS 2010 SP1 (only) and has to do with ResGen.exe failing to swap bit architecture during compile in the IDE. It was a known bug prior to Beta 2 that was fixed for .NET 4 in Beta 2, but apparently never addressed for lower .NET versions than 4.
    The "MVP" responding to my posts in the MSDN forum doesn't seem to really be doing anything other than keeping the plate spinning After posting TWICE that it works from the command line, his first post was "does it work from the comand line?", followed by asking for my code (NFW), followed by describing a .NET 4 error that shows he didn't duplicate my replication steps. Sigh...

    I've been coding professionally for 20 years, 36 as an amateur. I think I know more about the VS IDE than the guys posting in the MSDN forum. Wondering if I shouldn't go back to Java... At least the low-level errors aren't so obfuscated that I have to rely on a helpdesk guy to translate...

  4. #4
    Join Date
    Oct 2012
    Posts
    6

    Re: ResGen.exe 64-bit VS2010 .NET 4- Bug

    I replied to your post, but apparently it didn't get posted for some reason.
    The messageId you're describing is typically when a 64-bit assembly is called from a 32-bit application.
    That's not the case here. I posted a lot in my previoous about that, but I don't have time to post it twice... :\

  5. #5
    Join Date
    Oct 2012
    Posts
    6

    Re: ResGen.exe 64-bit VS2010 .NET 4- Bug

    Also, ResGen won't generate that error, as it's not a 64-bit assembly anyway.
    The problem has to do with bit architecture, I'm sure, which is always a pain wityh Visual Studio. If you read the post on MSDN, it describes the error conditions in greater detail.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center