C# "... is not a valid Win32 application"

I am trying to run an Application created using VS 2010 on a Win 7 64bit system and get the above error.
At first I thought it must be the project not targeting "anyCPU" but this has proved not to be the case.
I have tried running other applications (created with VS) on the machine and get the same error.
Other applications (VIZ engine, VLC, etc all run fine on the machine.

Could a corrupt .Net installation cause the error to be generated?
LVL 1
jetbetAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

brendanmeyerCommented:
What versions of .NET are installed?
Which Version of .NET is the project targeting?
0
jetbetAuthor Commented:
.NET 4.5.1
The applications starts on another machine (same specs etc) also with only 4.5.1 installed.
0
Network ZeroCloud Engineer Commented:
Try recreating the application and try again. maybe it's corrupted on that computer and not the other one.
0
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

jetbetAuthor Commented:
I have upgrade my environment to VS 2013 and rebuilt the application. It still only works on the test machine with the same OS, dotNET, etc.

One clue is that dotNet applications that do not use a .dll seem to be fine on both machines.
0
vo1dCommented:
do you use interop or pinvoke in your application?
Could you please check your Windows EventViewer for Runtime Failure entries?
0
jetbetAuthor Commented:
I have checked the event viewer but there is nothing to show the issue.

I do not believe I use pinvoke or interop.
0
jetbetAuthor Commented:
After I transfer the files all the .dlls are missing the File Version, Product Name, Product Version, Copyright etc. values from the properties.
When I try and start the exe I get a “… is not a valid Win32 application” error and it will not start.
If I try and send the Zip file and extract it up there I get an error saying the zip file cannot be extracted because it is empty. This is the same zip file I used earlier to get the files I transferred, so originally it is fine.
If I unzip the files to the local test Viz preview machine, I have no problems and it starts fine.

I created a small Hello World application with a .dll and transferred these to the same machine, via the same VNC connection, and this started fine. The Version info etc. was also showing on this .dll.

I have even reinstalled the .Net Framework 4.5.1 on the target machine but this made no difference.
0
vo1dCommented:
Could you please compile the whole solution as x86 and test it on the development and the  "problematic" machine?
0
jetbetAuthor Commented:
The solution is compiled by a 3rd party vendor.

Could you please advise what you believe the issue may be before I arrange this.
0
jetbetAuthor Commented:
I have copied the file to a shared folder and had someone copy this to a flashdrive. I have then unzipped the files from there to the correct folder and it works fine.
All Version info etc is also showing.

The issue is somehow related to the way the vendor compiles the code and the interaction between that and the RealVNC transfer.

I do know the vendor uses Obfuscation in some of his code and that may be the cause of the incorrect interaction.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
vo1dCommented:
so that version works fine on the "problematic" machine?
0
jetbetAuthor Commented:
Yes, it looks like it ws not the machine that was problematic but the transfer reaction with the files
0
jetbetAuthor Commented:
The answer I came up with is the reason for the error. As to what caused the corruption I will not know at this stage.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.