code generator received malformed input

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alex

    #1

    code generator received malformed input

    Hello all.

    I have been using visual studio 2003 for several months, and today, I
    suddenly recieved the following error when I tried to open the web project I
    have been working on for the last 2 months:

    "Visual Basic .NET compiler is unable to recover from the following error:
    Internal compiler error: code generator received malformed input. Save your
    work and restart Visual Studio .NET"

    I have no idea would could have caused this error. I have tried
    reinstalling IIS, re-registering ASP.NET (regiis -r), removing and re-adding
    the web development component of visual studio 2003. I have found several
    others on the web who have experienced this issue, but no solutions. The
    microsoft KB article at
    http://support.microsoft.com/d­efaul...en-us;3165­11 does not
    apply in this case, as I am not using any of the controls mentioned.

    I created a new web application in an attempt to solve this issue, and added
    all items. I was able to repeatedly attempt to build the solution - I added
    in all the namespace imports required by the project, was able to recompile,
    until I got to the last namespace. Once I added this in (after which I
    would expect the project to build successfully), the compilation just hangs
    after the message "Performing main compilation..." All I can do from this
    point is to cancel the build.

    I am at a loss, can anyone suggest a course of action? The only thing I
    have left to try is uninstalling and re-installing visual studio, as I know
    this could take hours to complete.

    Kind Regards,

    Alex


  • Cor Ligthert

    #2
    Re: code generator received malformed input

    Alex,

    An application will normally be build all new if you have in windowforms

    All the .vb files, the resx, and the vbproj file

    When you copy those to a new folder and click than on the vbproj it should
    create everything new.

    I hope this helps,

    Cor




    Comment

    • Alex

      #3
      Re: code generator received malformed input

      Hi Cor,

      Thanks for your suggestion though I am a little confused... I have already
      tried creating a new web application (in a different folder) and copying in
      all of hte required core VB files. This has not solved the problem though -
      When I try to open the web application, I receive a message saying that
      "Visual Studio cannot create or open the application. The likeliest problem
      is that required components are not installed on the local Web server. Run
      Visual Studio .NET setup and add the Web Development component." Needless
      to say I have already done this, but it does not fix the problem.

      I guess this means I will be reinstalling visual studio, again. lets hope
      2005 is more stable. If I had a penny for every project I've had corrupted
      over the years....

      "Cor Ligthert" <notmyfirstname @planet.nl> wrote in message
      news:uB3tL4zeFH A.1504@TK2MSFTN GP15.phx.gbl...[color=blue]
      > Alex,
      >
      > An application will normally be build all new if you have in windowforms
      >
      > All the .vb files, the resx, and the vbproj file
      >
      > When you copy those to a new folder and click than on the vbproj it should
      > create everything new.
      >
      > I hope this helps,
      >
      > Cor
      >
      >
      >
      >[/color]


      Comment

      • Cor Ligthert

        #4
        Re: code generator received malformed input

        Alex,

        Sorry I readed it completly wrong, I was to quick with my answer while yours
        was well described. I readed the part where you wrote reinstalled IIS to
        quick and I readed VisualStudio.

        What I do in the case of a WebApllication with that (it is really what we
        call here "houtje touwtje". I don't know the words in English. (Very simple
        done without really thinking about it, only for the result)

        I create a new Web application and close that. Than I copy all old aspx and
        aspx.vb files etc (or saying it better all files except things as bin etc)
        in the webroot folder of that.

        Than I open the project again (if I don't do it in this sequence it won't
        work). Than I set while a webpage is visible in top of your solution
        explorer "show all files".

        Than I in solution explorer I include with a right click (a rightclick
        function) one by one all the files that I copied in the new project (It is
        as well posible to select more and include them, however not folders).

        Now I can normally go on with the new project..

        (A little bit a problem is the name of the project if to keep that the same
        because that is everywhere registered).

        If that is important, than I copy the complete project from IIS to another
        folder. Remove the old from Visual Studio, Remove it from IIS and check if
        there is nothing stayed. Than I do what I wrote above.

        This is one of the parts that would in my opinion need a lot of
        improvements. I don't know if that is done in the next version of Visual
        Studio Net.

        However as I said, "Houtje Touwtje" and absolute not any guarantee. As
        normal, however here even extra.Therefore don't forget to save everything
        very well in advance if you want to do the same method.

        I hope this helps anyhow something.

        Cor



        Comment

        • alex.butcher@gmail.com

          #5
          Re: code generator received malformed input

          I got to the bottom of this. The real issue was that the VB compiler
          was failing at some point. I added files individually to a new web
          app, and tracked the problem down to a comparison between an object
          property and an enumeration value in an IF statement - removing this
          line allowed compilation to complete, adding it back in caused the
          compiler to fail.

          Now The enumeration originally had 2 items in it when the IF statement
          was written. I had subsequently added a third, and put it first, as
          the default enumeration item. When I looked at the enumeration in the
          object browser, there was also a fourth value! it was called
          '_Deleted'.

          So I renamed and recreated the enumeration, rebuilt the project, and
          the VB compiler now works fine.

          Comment

          Working...