The module was expected to contain an assembly manifest
Hi, I can get started debugging my application.
When I hit "Run" I'll get error message "Error while trying to run project: Could not load file or assembly 'CANopenConf' or one of it dependecies. The module was expected to contain an assembly manifest
But when I look in my debug folder, all needed dll's are there, and if I start the application by double clicking in Explorer, all works fine.
what is wrong?
thanks in advance, Patrik
Answers
Can you tell us some more details on your application type? Does your solution contain C++ or C# or VB projects? Are you sure that you have set the correct project to be the startup project?
John
All Replies
Is it possible to get a log or some kind of better information, what file it doesn't found or can not load.
I am using Visual Studio 2005 and I am getting craizy of this problem.
Some help, thanks, Patrik
Can you tell us some more details on your application type? Does your solution contain C++ or C# or VB projects? Are you sure that you have set the correct project to be the startup project?
John
Hi
My solution contains C++ native projects and C# managed projects. But I have found the problem. I hade one project creating Canopenconf.exe, and one project creating Canopenconf.dll, concluding that I will have only one Canopenconf.pdb.
So I changed name of the exe file, and now I got everything working.
Patrik
- I had the same error message, I was unable to debug in Visual Studio.
Error was apparently caused by having too assemblies with the same name, project.exe and project.dll.
The solution was just to rename the application. I had the same error. The reason was a bit different, which I'm sure is explained by some under the hood workings of the .NET framework. Due to some issues in doing a create object on a .NET DLL from VB6, we created a VB6 DLL that will shell out a .NET EXE. The VB6 DLL and .NET EXE had the same name.
To work around this problem:
Change the name of the VB DLL while you are debugging the .NET EXE. I put an _ in front of the DLL name. After that I was able to launch the .NET EXE without issue. Runtime environment works just fine with the same name. I wonder why the debugger is trying to load the DLL (which I'm sure fails since it's not a .NET DLL).
Don't forget to change it back for runtime (it'll work fine then) if you don't want to permanently change the name.
- I had the same problem. I renamed my project in the project properties (Name and root namespace), ran the app, and then renamed it back to the original. Worked better than a charm.
Hi,
To resolve it just, clean your solution, go to the menu and select: Build->Clean Solution
This is what MSDN help says:To build, rebuild, or clean an entire solution
-
In Solution Explorer, select or open the desired solution.
-
On the Build menu, choose Build Solution, Rebuild Solution, or Clean Solution.
-
Choose Build or Build Solution to compile only those project files and components that have changed since the last build.
Note: The Build command becomes Build Solution when a solution includes more than one project.
-
Choose Rebuild Solution to "clean" the solution first, and then build all project files and components.
-
Choose Clean Solution to delete any intermediate and output files, leaving only the project and component files, from which new instances of the intermediate and output files can then be built.
-
-
- this is not working ... i even restarted my pc but the problem remains there .
- I have the exact same problem. Found a solution?
Though I use Visual Basic
Info - If I open a new project, and run it, the same still happens. It's not the project, it's Visual Basic, the program.
Once, it actually worked after I pressed Build, but the second time, no way.
It's not even working with it! It pops up on the click. It's like a code, msgbox("damn you") on the run-button. Pops up almost before i click it.
What happened to me:
VB worked perfect for me, until i screwed up the Resource folder etc, (added a picture to the folder, and then added the same picture through picturebox-arrow, and then i deleted one of the files on the wrong place, and it fucked up everything.). After that, I was about to add a video, so I added the Windows Media Player thingy (through COM Components). I hadn't run the project between these two adds, so i don't know which (or if any) were the problem. Now i pressed "Run", and the message poped up right away. Kinda scared me a little..
I searched the internet, and found this place, so I did what it said here, renamed the project, blablabla, but nothing. I restarted my computer, but nothing. After that i even uninstalled the whole ____, and reinstalled it, but still won't work.
I tried to publish the program to see if anything new showed up, and suddenly I had one error in the Error List:
Description
"Problem generating manifest. The module was expevted to contain an assembly manifest. (Exception from HRESULT: 0x80131018)"
File
Line
Column
Project
WindowsApplication1
Once again: Visual Basic worked like a dream, and suddenly, every project i make gets this message.
Error while trying to run project: Could not load file or assembly WindowsApplication1 or one of it dependecies. The module was expected to contain an assembly manifest.
Any help accepted. Really need this..
Thanks
Stii- Edited byStiian Friday, August 07, 2009 3:54 AMWhich language I use
- Hi all,ME too gettig the same problem and all the above solutions did ot seem to work so can plz any1 help me on this.Thanks in advance.
- Hi all,He ya i renamed the project from Windows ad it worked LOL on how thing work and whe the error is dis small...Thnks ppl.
I disabled ClickOnce Security Settings in my project settings. Now reading code access security to find out what just happened there http://msdn.microsoft.com/en-us/library/z17ceyya.aspx
- I got the same problem and nothing will help!
Have someone a solution for this problem that works??
I have rename my application "Assembly name" and "Root namespace", is that correct or have i change another name?
Thanks
- We have the same problem, i even try format my pc and install visual studio 2008, but still not working.Is there somebody who can help this problem?
CHRISTAN - I had the same problem where the DLL i am tryin to load contains native code . The error is
"The module was expected to contain an assembly manifest. (Exception from HRESULT: 0x80131018)"
So basically i couldn't load the dll to the project in powershell using [System.Reflection.Assembly]::LoadFile unless i manually copied the dll to the bin folder.
The other outstanding issue is when i run it on 64 bit machine.
Totally it doesn't work unless i build the project as x86 and come up with exe.
Be happy if anybody resolves this issues well.

