Error with Visual Studio 12 with Visual Cobol

Hi,


I started receiving error when I try to create a new project with Visual Cobol on Visual Studio 12. Trying to create Managed  Windows Form project I receive Method 'Message' in type 'MicroFocus.COBOLServicesImplementations.ParseHarvester' for assembly 'MicroFocus.COBOLServices, Version 4.0.....does not have an implementation. And creating a console projects returns an exception. 

License is installed and the Eclipse versions works fine.


I reinstalled multiple times and also installed updates to Visual Studio 12 but nothing solves the problem.

I run on Windows 7.

Regards

  • I have never seen that particular error before.

    What Visual Studio Edition are you using, i.e. Professional, Premium, Ultimate, shell, etc?

    You state that the Eclipse version is running fine, do you have Visual COBOL for Eclipse installed on the same computer? Is it at the same version level?

    Can you open up one of the existing managed code sample programs from the samples browser?

    Thanks.

  • Hi Chris,

    I just install the Visual Studio 12 that comes with the Visual Cobol installation.

    Yes I have both product in my machine: VC for Visual Studio 12 and VC for Eclipse. I installed the Eclipse version when the problem appeared with Visual Studio.

    I tried to open WINBook sample. The solution explorer shows all the content but when I click to open BookException.cbl an exception error (attached) is shown.

    ActivityLog.xml show this error:

    <entry>

       <record>302</record>

       <time>2014/02/28 21:54:43.727</time>

       <type>Error</type>

       <source>Editor or Editor Extension</source>

       <description>System.TypeInitializationException: The type initializer for 'MicroFocus.COBOL.Services.CobolServicesFactory' threw an exception. ---> System.TypeLoadException: Method 'Message' in type 'MicroFocus.COBOL.Services.Implementations.ParseHarvester' from assembly 'MicroFocus.COBOL.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0412c5e0b2aaa8f0' does not have an implementation.&#x000D;&#x000A;   at System.Reflection.RuntimeAssembly.GetExportedTypes(RuntimeAssembly assembly, ObjectHandleOnStack retTypes)&#x000D;&#x000A;   at System.Reflection.RuntimeAssembly.GetExportedTypes()&#x000D;&#x000A;   at MicroFocus.COBOL.Runtime.Common.ReflectionUtils.GetExportedTypes(Assembly assembly)&#x000D;&#x000A;   at MicroFocus.COBOL.Runtime.Common.LoadedAssembly..ctor(Assembly assembly)&#x000D;&#x000A;   at MicroFocus.COBOL.Runtime.Common.Global.RegisterAssembly(Assembly assembly)&#x000D;&#x000A;   at MicroFocus.COBOL.Program.Control.Init(RuntimeTypeHandle rth)&#x000D;&#x000A;   at MicroFocus.COBOL.Services.CobolServicesFactory..cctor()&#x000D;&#x000A;   --- End of inner exception stack trace ---&#x000D;&#x000A;   at MicroFocus.COBOL.Services.CobolServicesFactory.CreateServices(IProject project)&#x000D;&#x000A;   at MicroFocus.COBOL.Editor.ProjectManagement.CblPrjProject..ctor(IVsHierarchy hier)&#x000D;&#x000A;   at MicroFocus.COBOL.Editor.ProjectManagement.ProjectManager.ConstructProjectRealization(IVsHierarchy item, UInt32 itemid)&#x000D;&#x000A;   at MicroFocus.COBOL.Editor.ProjectManagement.ProjectManager.ConstructProjectMap(IVsHierarchy hier, UInt32 itemid)&#x000D;&#x000A;   at MicroFocus.COBOL.Editor.ProjectManagement.ProjectManager.GetProjectForHierarchy(IVsHierarchy hier, UInt32 itemid)&#x000D;&#x000A;   at MicroFocus.COBOL.Editor.ProjectManagement.ProjectManager.GetProjectForBuffer(IVsTextLines buffer)&#x000D;&#x000A;   at MicroFocus.COBOL.Editor.Extensions.WpfEditorExtensions.GetProject(ITextView textView)&#x000D;&#x000A;   at MicroFocus.COBOL.Editor.Mef.SmartTags.ImplementsSmartTaggerProvider.CreateTagger(ITextView textView, ITextBuffer buffer)&#x000D;&#x000A;   at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.GatherTaggers(ITextBuffer textBuffer)</description>

     </entry>

     <entry>

       <record>303</record>

       <time>2014/02/28 21:54:44.038</time>

       <type>Error</type>

       <source>Editor or Editor Extension</source>

       <description>System.TypeInitializationException: The type initializer for 'MicroFocus.COBOL.Services.CobolServicesFactory' threw an exception. ---> System.TypeLoadException: Method 'Message' in type 'MicroFocus.COBOL.Services.Implementations.ParseHarvester' from assembly 'MicroFocus.COBOL.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0412c5e0b2aaa8f0' does not have an implementation.&#x000D;&#x000A;   at System.Reflection.RuntimeAssembly.GetExportedTypes(RuntimeAssembly assembly, ObjectHandleOnStack retTypes)&#x000D;&#x000A;   at System.Reflection.RuntimeAssembly.GetExportedTypes()&#x000D;&#x000A;   at MicroFocus.COBOL.Runtime.Common.ReflectionUtils.GetExportedTypes(Assembly assembly)&#x000D;&#x000A;   at MicroFocus.COBOL.Runtime.Common.LoadedAssembly..ctor(Assembly assembly)&#x000D;&#x000A;   at MicroFocus.COBOL.Runtime.Common.Global.RegisterAssembly(Assembly assembly)&#x000D;&#x000A;   at MicroFocus.COBOL.Program.Control.Init(RuntimeTypeHandle rth)&#x000D;&#x000A;   at MicroFocus.COBOL.Services.CobolServicesFactory..cctor()&#x000D;&#x000A;   --- End of inner exception stack trace ---&#x000D;&#x000A;   at MicroFocus.COBOL.Services.CobolServicesFactory.CreateServices(IProject project)&#x000D;&#x000A;   at MicroFocus.COBOL.Editor.ProjectManagement.CblPrjProject..ctor(IVsHierarchy hier)&#x000D;&#x000A;   at MicroFocus.COBOL.Editor.ProjectManagement.ProjectManager.ConstructProjectRealization(IVsHierarchy item, UInt32 itemid)&#x000D;&#x000A;   at MicroFocus.COBOL.Editor.ProjectManagement.ProjectManager.ConstructProjectMap(IVsHierarchy hier, UInt32 itemid)&#x000D;&#x000A;   at MicroFocus.COBOL.Editor.ProjectManagement.ProjectManager.GetProjectForHierarchy(IVsHierarchy hier, UInt32 itemid)&#x000D;&#x000A;   at MicroFocus.COBOL.Editor.ProjectManagement.ProjectManager.GetProjectForBuffer(IVsTextLines buffer)&#x000D;&#x000A;   at MicroFocus.COBOL.Editor.Extensions.WpfEditorExtensions.GetProject(ITextView textView)&#x000D;&#x000A;   at MicroFocus.COBOL.Editor.Mef.SmartTags.NamespaceSmartTag.NamespaceSmartTaggerProvider.CreateTagger(ITextView textView, ITextBuffer buffer)&#x000D;&#x000A;   at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.GatherTaggers(ITextBuffer textBuffer)</description>

     </entry>

    Regards,

    Juan Urraburu

  • This is the error when creating a new Managed Cobol Win Form project

    The problem seems to be related to the Form Designer because that´s where the error appears. I can open the cobol source files

  • I now tried uninstalling and installing Visual Cobol with Visual Studio 2010 but has problems too. :(

  • This sounds to us like you have installed a mismatch of Visual COBOL product versions on your system.

    If you have Visual COBOL for Visual Studio 2.2 installed and Visual COBOL Eclipse 2.1 installed you can run into these types of problems.

    Please uninstall ALL Visual COBOL products from your computer and then just install the one product that you wish to work with and see if that fixes the problem.

    Thanks