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

    Tuesday, June 5, 2007 1:43 PM


  • 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?



    Wednesday, June 6, 2007 4:35 PM

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

    Wednesday, June 6, 2007 10:19 AM
  • 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?



    Wednesday, June 6, 2007 4:35 PM
  • 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.



    Thursday, June 7, 2007 6:11 AM
  • 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
    Sunday, September 23, 2007 8:33 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.

    Friday, December 7, 2007 12:41 PM
  • 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.
    Friday, January 16, 2009 5:19 PM
  • 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

    1. In Solution Explorer, select or open the desired solution.

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

    Saturday, February 28, 2009 8:05 PM
  • this is not working ... i even restarted my pc but the problem remains there .
    Saturday, June 13, 2009 10:47 PM
  • 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 7, 2009 3:54 AM Which language I use
    Friday, August 7, 2009 3:52 AM
  • 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.
    Thursday, September 10, 2009 7:14 AM
  • 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.
    Thursday, September 10, 2009 7:21 AM
  • I disabled ClickOnce Security Settings in my project settings. Now reading code access security to find out what just happened there 

    Saturday, September 26, 2009 1:30 PM
  • 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?


    Monday, October 5, 2009 1:30 PM
  • 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?
    Sunday, January 10, 2010 4:15 PM
  • 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.
    • Proposed as answer by Vishuv Thursday, May 26, 2011 9:29 AM
    • Unproposed as answer by Vishuv Thursday, May 26, 2011 9:29 AM
    Thursday, January 21, 2010 8:03 PM
  • Hey,

    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
    Thursday, May 26, 2011 9:28 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,,,,,,
    Wednesday, January 25, 2012 5:34 AM
  • I formatted my system and Installed VS2010 Freshly and using the project....

    and We need to have good antivirus activated in our system..


    Wednesday, February 8, 2012 5:06 AM
  • 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!


    Tuesday, February 28, 2012 10:14 AM
  • 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
    Monday, September 17, 2012 8:30 AM
  • I am also having the same problem

    Plz tell me how to solve it.........

    Monday, February 10, 2014 8:33 AM
  • I am also having the same problem,

     i think its visual studio problems ,

    i try to compiling using vbc.exe and its Ok,

    Friday, February 21, 2014 7:06 AM
  • Try to Install Fresh MSE then update and scan ur computers,

    Open ur Visual studio again

    Friday, February 21, 2014 7:52 AM
  • I started facing this problem today on a project that had been working fine for last one month. Here is how I resolved it in my VS2010 express

    Open the project

    Go to Project -> "Project" properties

    Click Application tab on the left side

    On the right side you will see "Icon and Manifest" radio button.

    Select that button.

    There will be a drop down to select  a manifest. Select "Create application without a manifest". 

    Run the project

    Works like a Charm

    I dont know what the hell is a manifest. But the application is working great without it.

    Thursday, May 1, 2014 6:57 PM
  • Old one, I know, but just ran into it and maybe this'll help others. I was trying to install a windows service using a 86-bit version of the installUtil tool. The 64-bit version (in C:\Windows\Microsoft.NET\Framework64\v4.0.30319) worked better. 

    HTH someone.

    Planet Earth, Europe, Denmark, Sealand, Copenhagen, Morten

    • Proposed as answer by eldeo Monday, July 9, 2018 6:35 PM
    Thursday, February 15, 2018 7:37 AM
  • Thanks, Morten Norgaard, Your idea of using the 64-bit version worked for me
    Monday, July 9, 2018 6:36 PM