Atalasoft error: attempt made to load a program with an incorrect format

My company has used Atalasoft for as long as I've been here, almost a year, and just recently we started getting this error.
 
It is a very large application, with a couple of dozen modules, each in its own solution.  The project that I'm working on is the only one which uses Atalasoft.  If I check a fresh copy of the project out of Subversion, it compiles just fine.  But if I open one of the Windows Forms in the designer and save it, then compile, I get this error: "Could not load file or assembly 'file:///ThirdParty/Atalasoft/DotImage 9.0/Atalasoft.DotAnnotate.dll' or one of its dependencies.  An attempt was made to load a file with an incorrect format"

DotAnnotate is the first of the references in my project file and if I switch the order it still fails on the first reference to Atalasoft.

When I check the saved version against the original in Subversion, I can see that some of the form controls' locations were changed, though I didn't deliberately change anything.  Some of the lines which Subversion thinks were changed look exactly the same to me.  There were other syntax changes, order changes, etc.

Any ideas as to how to get the error to go away?  We are running VS 2008, Net 3.5 and the version of Atalasoft is for net 2.0 (since they only have 2.0 and 4.0 and we haven't yet migrated to 4.0).

I have tried setting Enable 32 bit application to true for IIS Application Pools.  I have tried compiling for x86 instead of Any CPU.  Nothing has worked so far.
LVL 1
FrancineTaylorAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
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.

anarki_jimbelSenior DeveloperCommented:
Did you try to simply remove a reference and then create a new one pointing to a new executables/libraries?
0
FrancineTaylorAuthor Commented:
Just tried that, still getting the error.
0
FrancineTaylorAuthor Commented:
Further research reveals that the problem seems to be that the very act of opening a form causes some kind of corruption in the embedded resources (ImageStream, DataSource).  Still trying to figure out why or how to fix it...
0
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.

FrancineTaylorAuthor Commented:
Okay, I figured it out.  It is caused by a bug in Visual Studio 2010, which causes an extra letter to be inserted at the beginning of each block of embedded resource in a windows form .resx file.

In order to fix it, you need to manually edit the .resx file each time you save the form after altering it with VS 2010 Designer.  Because I am using Subversion, I can just do a compare with the saved (uncorrupted) version.  At the beginning of each block of resource, the first line will be marked as changed.  If you do a character-by-character comparison, you will find an extra letter that shouldn't be there (can't remember what but I think it might be a 'y').  Just use the original from Subversion to restore that line to its original form.

This bug is a real pain, as you will have to do the manual editing every time you make changes with the designer.
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
FrancineTaylorAuthor Commented:
Here's the fix in a bit more detail; look for all the embedded resource blocks in the .resx file.  Most of them should have the 71st and 72nd characters changed to "00".  They *should* be "0y".  If you make that change, the file should compile.  If it still doesn't compile, check again, you may have missed one.
0
anarki_jimbelSenior DeveloperCommented:
Interesting info, thanks!
0
FrancineTaylorAuthor Commented:
Figured it out on my own...
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.