none
METAGEN Files

    Question

  • When I build in VS2010 I get generated files with extensions .exe.metagen and .dll.metagen that are put with my exe and dll. What are these files? How can I customize their output location in Project Properties? Also to note, they are not deleted when I perform a clean operation and these files were not generated in VS2008 by the same project. The files are ascii.

     


    Friday, April 15, 2011 7:29 PM

All replies

  • Hi Jo,

      Could you please tell us some more detail about your issue? Fox example, which kind of project do you have created? Or can you post the metagen files to us in order to analyse this issue.

      I'm glad to receive your relpy and help you to resolve your issue.

     

    Best Regards,

    Rob

     


    Rob Pan [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, April 18, 2011 6:54 AM
  • Contents of MbConfig.exe.metagen

    -----

    ImageRuntimeVersion: v4.0.30319
    Assembly MbConfig, Version=0.0.*, Culture=Invariant Language (Invariant Country):
     hash=SHA1, flags=PublicKey
    Assembly mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:
     hash=None, flags=None
    Assembly MBConfigPropControl, Version=2.0.*, Culture=Invariant Language (Invariant Country):
     hash=None, flags=None
    Assembly System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:
     hash=None, flags=None
    Assembly System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:
     hash=None, flags=None
    Assembly System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:
     hash=None, flags=None
    Assembly System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a:
     hash=None, flags=None
    Assembly MFCMIFC80, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a:
     hash=None, flags=None
    Assembly Microsoft.VisualC, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a:
     hash=None, flags=None
    Class Microsoft.VisualC.MFC.CWin32Window: AutoLayout, AnsiClass, Class, Public, BeforeFieldInit
        Void .ctor(HWND__*): PrivateScope, Public, HideBySig, SpecialName, RTSpecialName
      Interfaces:
        System.Windows.Forms.IWin32Window
      Properties:
        IntPtr Handle 'get ' :
      Methods:
        get_Handle(): PrivateScope, Public, Virtual, HideBySig, VtableLayoutMask, SpecialName
    Class Microsoft.VisualC.MFC.CWinFormsEventsHelper: AutoLayout, AnsiClass, Class, Public, BeforeFieldInit
        Void .ctor(): PrivateScope, Public, HideBySig, SpecialName, RTSpecialName
      Fields:
        System.Windows.Forms.Control m_pControl : Public
        Microsoft.VisualC.MFC.IHandleEvents* m_pSink : Public
      Properties:
        System.Windows.Forms.Control Control 'get set' :
      Methods:
        get_Control(): PrivateScope, Public, HideBySig, SpecialName
        set_Control(Control): PrivateScope, Public, HideBySig, SpecialName
        Advise(IHandleEvents*): PrivateScope, Public, HideBySig
        Unadvise(IHandleEvents*): PrivateScope, Public, HideBySig

    Monday, April 18, 2011 9:31 PM
  • It is a MFC C++ application. It is also interesting that the solution contains an exe and two DLLs, but the metagen files are only created for one of the DLLs. That DLL has a managed resource.
    Monday, April 18, 2011 9:35 PM
  • Hi,

    According to your description, I still cannot find the metagen file in my project. Could you please show me the detail steps of creating your MFC project? Or if you don't mind can you send me your MFC project??

    I'm glad to receive you reply and try my best to resolve your issue.

    Thanks for your understanding.

     

    Best Regards,

    Rob


    Rob Pan [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, April 20, 2011 6:03 AM
  • I did the following and created a .metagen file:

     

    Visual Studio 2010 (Version 10.0.40219.1 SP1Rel)  on Windows XP

    1. File / New Project
    2. Visual C++ / CLR / Windows Forms Application
    3. Name --> SimpleProject
    4. Press OK
    5. Press F6 to compile (Debug was set as build option)  (I use C# key bindings)
    6. Open Explorer to SimpleProject\Debug and a file named SimpleProject.exe.metagen is there. 

     

    I can also select Build / Clean and all files in the Debug folder are removed except SimpleProject.exe.metagen

     

     

    Contents of SimpleProject.exe.metagen

     SimpleProject.Form1.resources - Embedded, ContainedInManifestFile, 
    ImageRuntimeVersion: v4.0.30319
    Assembly SimpleProject, Version=1.0.*, Culture=Invariant Language (Invariant Country): 
    	hash=SHA1, flags=PublicKey
    Assembly mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089: 
    	hash=None, flags=None
    Assembly System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089: 
    	hash=None, flags=None
    Assembly System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089: 
    	hash=None, flags=None
    Assembly System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089: 
    	hash=None, flags=None
    Assembly System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a: 
    	hash=None, flags=None
    Assembly System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089: 
    	hash=None, flags=None
    Assembly System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089: 
    	hash=None, flags=None
    Assembly Microsoft.VisualC, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a: 
    	hash=None, flags=None
    Class SimpleProject.Form1: AutoLayout, AnsiClass, Class, Public, BeforeFieldInit
     :System.Windows.Forms.Form
      Void .ctor(): PrivateScope, Public, HideBySig, SpecialName, RTSpecialName
    

    Thursday, May 05, 2011 9:02 PM
  • Dear all,

    Thanks for your reply and suggestion. I have follow Hu' step. however I still haven't create a metagen file. According to the file, it seems that the metagen file records some metadata. So the application can run without this file.  However in order to know the issue more clearly. Could you please send your sample to me?

    Thanks for your understanding,

    Best Regards,

    Rob


    Rob Pan [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, May 10, 2011 7:52 AM
  • I believe that these files appeared after updating to SP1 version of Visual Studio 2010.
    Thursday, August 25, 2011 8:12 AM