|
-
Jun 12th, 2011, 06:17 AM
#1
Thread Starter
Hyperactive Member
[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
-
Jun 12th, 2011, 08:20 AM
#2
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.
-
Jun 12th, 2011, 08:24 AM
#3
Thread Starter
Hyperactive Member
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)"
-
Jun 12th, 2011, 08:41 AM
#4
Re: Assembly name and exe name
 Originally Posted by wakawaka
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?
-
Jun 12th, 2011, 08:49 AM
#5
Thread Starter
Hyperactive Member
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.
-
Jun 12th, 2011, 09:03 AM
#6
Re: Assembly name and exe name
 Originally Posted by wakawaka
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?
-
Jun 12th, 2011, 09:07 AM
#7
Thread Starter
Hyperactive Member
Re: Assembly name and exe name
 Originally Posted by kevininstructor
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?
-
Jun 12th, 2011, 09:19 AM
#8
Re: Assembly name and exe name
 Originally Posted by wakawaka
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?
-
Jun 12th, 2011, 09:31 AM
#9
Thread Starter
Hyperactive Member
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
-
Jun 12th, 2011, 11:09 AM
#10
Re: Assembly name and exe name
 Originally Posted by wakawaka
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|