If you encounter below error when running Visual Studio .NET but compilation is successful.
System.BadImageFormatException: Could not load file or assembly 'xxx.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Resolution:
1) Ensure that all projects have the same .net framework version you can check this from each project properties.
2) Ensure that the target platform is Any CPU on solution properties and each project properties (for .NET it's under Compile section, for C# it's under Build section).
Reference: here
Showing posts with label visual-studio. Show all posts
Showing posts with label visual-studio. Show all posts
Tuesday, November 19, 2013
Thursday, December 10, 2009
Could not find file 'Microsoft.Windows.CommonLanguageRuntime, Version=2.0.50727.0'
Problem:
Encountered this error in Microsoft Visual Studio 2005 while building the web project.
Resolution:
Do not use project reference, but use the dll or exe reference instead.
Then try to compile again.
It should work.
Reference: here
Encountered this error in Microsoft Visual Studio 2005 while building the web project.
Error 123 Could not find file 'Microsoft.Windows.CommonLanguageRuntime, Version=2.0.50727.0'.
Resolution:
Do not use project reference, but use the dll or exe reference instead.
Then try to compile again.
It should work.
Reference: here
Wednesday, November 19, 2008
Unable to read the project file 'something.vbproj'. The system cannot find the path specified
I have encountered this error and tried to debug it for quite sometime.
It's kinda annoying as I cannot open the web application.
My solution has reference to this vbproj file as etp file.
I have checked that the reference path to this vbproj file is correct in the etp file (http://localhost/something).
I have tried adding the virtual directory 'something' manually on IIS, but yet it didn't work.
How to work around this problem?
There is a file that contains the visual studio settings for the solution. Not sure what it holds. Things like startup project, page.
If the solution is called mysolution.sln then the file is mysolution.suo. It is a hidden file so you will need to turn on the display of hidden files in windows explorer or use dos.
Delete it and all will be fine. VS will create a new one.
Make a backup of the whole directory if it makes you more comfortable.
Reference: here
And I tried that.. and wala... I can open successfully.
It's kinda annoying as I cannot open the web application.
My solution has reference to this vbproj file as etp file.
I have checked that the reference path to this vbproj file is correct in the etp file (http://localhost/something).
I have tried adding the virtual directory 'something' manually on IIS, but yet it didn't work.
How to work around this problem?
There is a file that contains the visual studio settings for the solution. Not sure what it holds. Things like startup project, page.
If the solution is called mysolution.sln then the file is mysolution.suo. It is a hidden file so you will need to turn on the display of hidden files in windows explorer or use dos.
Delete it and all will be fine. VS will create a new one.
Make a backup of the whole directory if it makes you more comfortable.
Reference: here
And I tried that.. and wala... I can open successfully.
Subscribe to:
Posts (Atom)