Scenario: I have windows form application, it was working fine before two days but after last two days it is giving me error:
Error While trying to run the project: could not load file or assembly 'Windows form application 1' or one of its dependencies
I have tried two days to find solutions but all in vain.
Could any body please help me or suggest me some suggestions.
There are some workarounds for this issue: The dll file may not be in /bin folder. Just copy the dll file to /bin folder or set this preference Copy Local = True from Visual Studio. If the problem persists, check if the version of the assembly that is referenced is different than the version it is looking for.
In summary if you get the "Could not load file or assembly error", this means that either your projects or their references were built with a reference to a specific version of an assembly which is missing from your bin directory or GAC.
“An attempt was made to load a program with an incorrect format.” That means that the assembly, which was to be loaded, was in an unexpected format. The format, in this case, refers most likely to the 64-bit build of an application being deployed to IIS, which is being run in 32-bits.
This error usually means that the assembly was not found. Try verifying that the file exists in the directory where your application is running.
Make sure your project's name doesn't have an apostrophe, as they can cause errors.
I have found three simple steps:
GO TO START ---> RUN
prefetch
and delete all filesrecent
and delete all files%temp%
and delete all filesIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With