Visual Studio Developer Center > Visual Studio Forums > Visual Studio Debugger > The module was expected to contain an assembly manifest
Ask a questionAsk a question
 

AnswerThe module was expected to contain an assembly manifest

  • Tuesday, June 05, 2007 1:43 PMpatti_nyl Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    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

  • Wednesday, June 06, 2007 4:35 PMJohn Cunningham - MSFTModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    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

  • Wednesday, June 06, 2007 10:19 AMpatti_nyl Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    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 06, 2007 4:35 PMJohn Cunningham - MSFTModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    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

  • Thursday, June 07, 2007 6:11 AMpatti_nyl Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    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

  • Sunday, September 23, 2007 8:33 AMAnonymous15574 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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.
  • Friday, December 07, 2007 12:41 PMGreg Bogumil Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

     

    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, January 16, 2009 5:19 PMStephen Kaiser Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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.
  • Saturday, February 28, 2009 8:05 PMAlvaro PG Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    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.

        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.

  • Saturday, June 13, 2009 10:47 PMthe.Programmer1 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    this is not working ... i even restarted my pc but the problem remains there .
  • Friday, August 07, 2009 3:52 AMStiian Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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
    •  
  • Thursday, September 10, 2009 7:14 AMIMBA.CODER Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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:21 AMIMBA.CODER Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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.
  • Saturday, September 26, 2009 1:30 PMbizl Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    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 

  • Monday, October 05, 2009 1:30 PMRobin van der End Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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

  • Sunday, January 10, 2010 4:15 PMchriscode Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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
  • Thursday, January 21, 2010 8:03 PMyeniye Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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.