locked
Type is not defined RRS feed

  • Question

  • User-1413454089 posted

    I have a real weird problem. I am running VS2008 SP1 on two seperate VMs (Virtual Machines) both running Win XP PRO SP3. I have an asp.net project which on one machine compiles and run fine, but when I copy it I get Type Exception not defined and Type Serializable not defined errors.

    Both projects are running local to the machines and all I did was to copy the entire directory from one machine to another. 

    The projects are both set to .net framework 3.5 and all references exist on both sides. The files that are giving the error are in the app_code\VBBaseClasses directory and I have 41 files in that specific directory. I also have an entry in the web.config file setting any CodeSubDirectories. the following is just one of the lines where it fails, the <Serializable> attribute. if there are try catch exceptions, then i get errors in those as well.

    Option Strict On

    Option Explicit On

    Option Compare Text

    Imports Microsoft.VisualBasic

    Imports MySql.Data.MySqlClient

    Imports BusinessObjects.DataPortal

    Namespace BaseClasses

    <Serializable()> _

    Public Class UserNotesBase

    ....

    End Class

    The error(s) are all about types not being defined, I have a namespace import in web.config for System, which is where the Seriazable and excpetion classes exist. furthermore, if I correct the entry to <System.Serializable()> then it works fine for that class but then I get an error on another file.

    for example the last 6 files in the list of the directory are the files that contain the error, yes, very specific last 6 files, and if I fix the error on the last file in the directory, then I get the error to move up and I get always errors in 6 files.

    hence, this is very odd and I can't seem to fix the problem and any help would be appreciated.

    Sunday, March 23, 2014 6:59 AM

Answers

  • User-166373564 posted

    Hi,

    Welcome to asp.net forum.

    I have just copied the project to another Win12K vm and it compiled without any problems, so do I attribute the problems that I have down to Mac Parallels,
     

    Appreciate for sharing your experience with us.

    Thanks for raising this issue to us through the forums. I’m sorry for hearing your frustration on this issue. We actively monitor forum conversations in an effort to receive feedback that helps us continually improve our products, I think you could consider submitting this issue to Microsoft connect Site.

     Our engineers will reproduce this issue according to the proof you provide, and we will evaluate this issue seriously.

    Best regards

    Angie Xu

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, March 23, 2014 10:48 PM

All replies

  • User-1413454089 posted

    OK, I have been working on this the all day, and I have maybe narrowed it down to the environment.

    One of the VMs is running on a Win12K server adn the other running on Mac Parallels. These should behave the same, well apparently not. I have just copied the project to another Win12K vm and it compiled without any problems, so do I attribute the problems that I have down to Mac Parallels, well maybe, but I would like anyone that may have had this sort of problem as well to comment. especially the ones working on a Mac with parallels.

     

    Sunday, March 23, 2014 7:07 PM
  • User-166373564 posted

    Hi,

    Welcome to asp.net forum.

    I have just copied the project to another Win12K vm and it compiled without any problems, so do I attribute the problems that I have down to Mac Parallels,
     

    Appreciate for sharing your experience with us.

    Thanks for raising this issue to us through the forums. I’m sorry for hearing your frustration on this issue. We actively monitor forum conversations in an effort to receive feedback that helps us continually improve our products, I think you could consider submitting this issue to Microsoft connect Site.

     Our engineers will reproduce this issue according to the proof you provide, and we will evaluate this issue seriously.

    Best regards

    Angie Xu

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, March 23, 2014 10:48 PM