Results 1 to 10 of 10

Thread: [RESOLVED] Assembly name and exe name

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2010
    Posts
    259

    Resolved [RESOLVED] Assembly name and exe name

    Perhaps someone can shed some light on this for me.

    I have a project, we will call it Asynchronous UPC Scanner (AUS for short). I saved the project with the name of "Asynchronous UPC Scanner" but changed the assembly name and project name to AUS.

    When I build the exe and run it, the program does nothing but use up 30k memory and they throws an "Failed to initalize..." error. The really weird this is if I change the name of the program to "Asynchronous UPC Scanner" the exe works with no problems....so what is up with that?!


    EDIT: OK it seems if I name it anything other that AUS, it works fine...is it possible there is another assembly registered with the same name?
    Last edited by wakawaka; Jun 12th, 2011 at 06:54 AM. Reason: Additional Information

  2. #2
    Karen Payne MVP kareninstructor's Avatar
    Join Date
    Jun 2008
    Location
    Oregon
    Posts
    6,714

    Re: Assembly name and exe name

    What is the full error message, assuming "Failed to initalize..." error is not the entire message.

    Have you tried cleaning the project, rebuild then run to see if the error persist.

    Does your application is an app.config file? If so is there a user.config file that is read on program startup? If there is can you comment code that uses it and see if the problem persist.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2010
    Posts
    259

    Re: Assembly name and exe name

    That's the thing. The program only throws the error on the release version when the name of the exe is "AUS", if I change it to anything else, it works fine. Also, this only affects my computer. The AUS.exe works on others but not mine, weird (Although the release did work several times before this error started on my computer). The debugger version also works.

    It isn't THAT huge of a deal, I can just change the exe name, but I would like to know why this is happening and if I can avoid it in the future.

    The error is: "The application failed to initialize properly (0x80000003)"

  4. #4
    Karen Payne MVP kareninstructor's Avatar
    Join Date
    Jun 2008
    Location
    Oregon
    Posts
    6,714

    Re: Assembly name and exe name

    Quote Originally Posted by wakawaka View Post
    That's the thing. The program only throws the error on the release version when the name of the exe is "AUS", if I change it to anything else, it works fine. Also, this only affects my computer. The AUS.exe works on others but not mine, weird (Although the release did work several times before this error started on my computer). The debugger version also works.

    It isn't THAT huge of a deal, I can just change the exe name, but I would like to know why this is happening and if I can avoid it in the future.

    The error is: "The application failed to initialize properly (0x80000003)"
    Did you try what I suggested?

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2010
    Posts
    259

    Re: Assembly name and exe name

    It does have the app.config, but it doesn't use a user.config

    I have "cleaned" the project. I have excluded whole custom classes from the main code and the issue still persists. I have even created a whole new project and moved the code over, no difference. I have removed all unneeded references.

    Like I said, I don't think my code has anything to do with the issue, because if I change the file name to anything else, it executes correctly and does exactly what it was designed to do.

  6. #6
    Karen Payne MVP kareninstructor's Avatar
    Join Date
    Jun 2008
    Location
    Oregon
    Posts
    6,714

    Re: Assembly name and exe name

    Quote Originally Posted by wakawaka View Post
    It does have the app.config, but it doesn't use a user.config

    I have "cleaned" the project. I have excluded whole custom classes from the main code and the issue still persists. I have even created a whole new project and moved the code over, no difference. I have removed all unneeded references.

    Like I said, I don't think my code has anything to do with the issue, because if I change the file name to anything else, it executes correctly and does exactly what it was designed to do.
    The reason for asking about config files and cleaning was an effort to see if the auto-generated code of VS was not picking up on My.Settings which would not be your code as I have seen this happen before and a clean may cause VS to fix the namespace not being correct in the app.config file.

    Have your tried creating a new project, not moving code over, not adding any code at all and changing the namespace to AUS, build/run?

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2010
    Posts
    259

    Re: Assembly name and exe name

    Quote Originally Posted by kevininstructor View Post
    The reason for asking about config files and cleaning was an effort to see if the auto-generated code of VS was not picking up on My.Settings which would not be your code as I have seen this happen before and a clean may cause VS to fix the namespace not being correct in the app.config file.

    Have your tried creating a new project, not moving code over, not adding any code at all and changing the namespace to AUS, build/run?
    Good idea, I created a new project with just the designer generated form code, switched it the othe AUS namespace and built the project. The same thing happens. It just sits there and then crashes with the same error....could it be a already existing namespace or something?

  8. #8
    Karen Payne MVP kareninstructor's Avatar
    Join Date
    Jun 2008
    Location
    Oregon
    Posts
    6,714

    Re: Assembly name and exe name

    Quote Originally Posted by wakawaka View Post
    Good idea, I created a new project with just the designer generated form code, switched it the othe AUS namespace and built the project. The same thing happens. It just sits there and then crashes with the same error....could it be a already existing namespace or something?
    I do not believe that is possible.

    Just did a search on MSDN, there seem to be a lot of hits on this error nothing to suggest this is caused by an existing namespace conflict.

    http://social.msdn.microsoft.com/sea...9&startindex=0

    Do you have any third party libraries installed?

  9. #9

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2010
    Posts
    259

    Re: Assembly name and exe name

    I got it working, I haven't researched it yet, but there was a registry key that I deleted that did the trick.

    HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\AUS.exe


    EDIT: It seems the registry key is used for debugging programs and can mess with your application if it is ran outside of a debugger. You can read more on it here: http://blogs.msdn.com/b/greggm/archi...21/377663.aspx
    Last edited by wakawaka; Jun 12th, 2011 at 09:38 AM. Reason: Update

  10. #10
    Karen Payne MVP kareninstructor's Avatar
    Join Date
    Jun 2008
    Location
    Oregon
    Posts
    6,714

    Re: Assembly name and exe name

    Quote Originally Posted by wakawaka View Post
    I got it working, I haven't researched it yet, but there was a registry key that I deleted that did the trick.

    HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\AUS.exe


    EDIT: It seems the registry key is used for debugging programs and can mess with your application if it is ran outside of a debugger. You can read more on it here: http://blogs.msdn.com/b/greggm/archi...21/377663.aspx
    This is something that a developer does manually not VS so I would have to wonder how did it get set?

    http://msdn.microsoft.com/en-us/libr...(v=VS.90).aspx

    Any ways good to hear you are free of this problem

Posting Permissions

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



Click Here to Expand Forum to Full Width