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
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.
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.
- Proposed as answer by vineeth030 Wednesday, March 21, 2012 7:16 AM
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.
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.
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.
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:
"Problem generating manifest. The module was expevted to contain an assembly manifest. (Exception from HRESULT: 0x80131018)"
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..
- Edited by Stiian Friday, August 07, 2009 3:54 AM Which language I use
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 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.
I am facing the same problem since the time i got thi new laptop.. and installed Windows 7 on it.. The applications used to get compiled on it earlier. I added a project to it which was built in Windows XP SP3 (both 32 bit machines). The project had a Web Service reference attached to it.
When i built that app, it started giving me this error. The same as discussed in the previous posts.. the assembly manifest error.
Tried to resolve it by re-installing the .Net Framework, the applications started to run but again the same problem arised when i tried to compile an application with .NET framework 2.0.
Again no application is working and i am back at stage 1.
So i also think it might be a .Net Framework issue..
Please help me out if anyone can.. and in the meanwhile i'll try re-installing the .NET Framework and post the result here.
If anyone tries this.. do let me know the result in either case please.
- Proposed as answer by Vishuv Thursday, May 26, 2011 9:29 AM
I am facing the same problem with my project Yesterday it worked good.. I shutdown my system and came back to my work with the project, it is showing th error Error while trying to run project: Could not load file or assembly 'WindowsApplication1' or one of its dependencies. The module was expected to contain an assembly manifest. I had created a new appliction and run(F5) it,,, but the same error is coming.. I am not understanding the problem,,, wheather it is in my project or visual studio my entire one month work is seems to be gone,,,,,,,,,,,,,,,plz help me,,,,,,
I guys, i found out what is the issue about.
1) make sure to include the manifest in the project. How?
A) Open the property page of the service
B) in the application tab, in the box icon and manifest you need to chose manifest: Properties\app.manifest
2) open a shell command in administrator mode and run this command installutil [winservice.exe] make sure that you run installutil against the winservice.exe file. No the setup file.
I hope it helps!
I hate this Microsoft product. since I started its ok but now it pisses me off. Before, when i close the project and then come back it runs with no problem but now i cant c the sheet of my project!
- Edited by alrajhi20 Monday, September 17, 2012 8:33 AM