Could not load type - not obvious

Discussion in 'ASP .Net' started by ChrisC, May 10, 2005.

  1. ChrisC

    ChrisC Guest

    Ive been fortunate enough to inherit a vs project that is causing me
    problems. It compiles and runs absolutely fine on my development
    machine (local), but if I deploy the generated files to one of my other
    servers I get 'could not load type x.x' errors. The namespaces and
    class names are correct as it works on my local machine and ive checked
    them. The bin folder and its contents are all present and correct. Ive
    cleared my cache, restarted iis and the aspnet process.... now im
    stuck. im going to try reinstalling the .net framework on one of the
    servers.

    vb.net btw

    Help. Ta.
    ChrisC, May 10, 2005
    #1
    1. Advertising

  2. ChrisC

    Patrice Guest

    Do you have the same file in your own bin folder. I would say something is
    outdated on the target mahcine. In partiuclr note that if youi have unused
    files with conflicting types it might welel happens...

    --

    "ChrisC" <> a écrit dans le message de
    news:...
    > Ive been fortunate enough to inherit a vs project that is causing me
    > problems. It compiles and runs absolutely fine on my development
    > machine (local), but if I deploy the generated files to one of my other
    > servers I get 'could not load type x.x' errors. The namespaces and
    > class names are correct as it works on my local machine and ive checked
    > them. The bin folder and its contents are all present and correct. Ive
    > cleared my cache, restarted iis and the aspnet process.... now im
    > stuck. im going to try reinstalling the .net framework on one of the
    > servers.
    >
    > vb.net btw
    >
    > Help. Ta.
    >
    Patrice, May 10, 2005
    #2
    1. Advertising

  3. ChrisC

    Guest

    does the project refernece and libs in the GAC?
    , May 10, 2005
    #3
  4. ChrisC

    ChrisC Guest

    How do i check the contents of the gac? I have deleted the entire
    project folder and replaced it on the target machines plenty of
    times...

    If I reference the project from another one it shows the class with the
    expected namespace etc.
    ChrisC, May 10, 2005
    #4
  5. Go to your "Administrative Tasks" folder in Start Menu, Control Panel,
    and run the .NET Framework 1.1, or 2.0, Configuration tool.

    It has options to list and manage all the assemblies in the GAC.



    Juan T. Llibre
    ASP.NET MVP
    http://asp.net.do/foros/
    Foros de ASP.NET en Español
    Ven, y hablemos de ASP.NET...
    ======================

    "ChrisC" <> wrote in message
    news:...
    > How do i check the contents of the gac? I have deleted the entire
    > project folder and replaced it on the target machines plenty of
    > times...
    >
    > If I reference the project from another one it shows the class with the
    > expected namespace etc.
    >
    Juan T. Llibre, May 10, 2005
    #5
  6. ChrisC

    Patrice Guest

    What is the type that can't be loaded ? Do you know from the name you see in
    which DLL it should be located ?
    Use perhaps the VS.NET objet browser to make sure it's available in one of
    the files in /bin.

    Make sure also it is not available in some other outdated file...

    Patrice

    --

    "ChrisC" <> a écrit dans le message de
    news:...
    > How do i check the contents of the gac? I have deleted the entire
    > project folder and replaced it on the target machines plenty of
    > times...
    >
    > If I reference the project from another one it shows the class with the
    > expected namespace etc.
    >
    Patrice, May 10, 2005
    #6
  7. ChrisC

    ChrisC Guest

    Referencing the class from another project the object browser shows it
    all up fine. Basically everything compiles and builds and looks like it
    should work. but it doesnt.

    The dll is not listed in the gac on the machine on which it works, or
    on the target machines. If you try and add it it reports that it must
    have a strong name, key and something else.

    Still stuck. Thanks for your help so far.
    ChrisC, May 10, 2005
    #7
  8. ChrisC

    ChrisC Guest

    Still stuck here guys. Ive tried renaming the project etc so it builds
    to a different dll but still no joy. I hate hand-me-downs
    ChrisC, May 11, 2005
    #8
  9. ChrisC

    ChrisC Guest

    Eventually solved - I renamed all the classes and namespaces, removed
    the project and solution files and all autogenerated stuff like global
    / assembly. Then created a new solution, project and brought the code
    into that. Then it decided it could work. Why? I dont know, but my
    money is on there being more potential causes to this 'Could not load
    type' stuff than microsoft is willing to admit, and they dont want to
    sift through the host of 'i havent compiled my project why doesnt it
    work' people who get this error to find genuine problems.
    ChrisC, May 12, 2005
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?Q2hyaXM=?=

    dataset question, might be obvious

    =?Utf-8?B?Q2hyaXM=?=, Feb 12, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    278
    Scott Allen
    Feb 12, 2005
  2. Kapt. Boogschutter

    Debug Assertion Failed! and no obvious Error

    Kapt. Boogschutter, Jun 23, 2004, in forum: C++
    Replies:
    1
    Views:
    594
    red floyd
    Jun 23, 2004
  3. Michele Simionato

    what's the only one obvious way?

    Michele Simionato, Jul 11, 2004, in forum: Python
    Replies:
    1
    Views:
    250
    Paul Rubin
    Jul 11, 2004
  4. Steven D'Aprano
    Replies:
    2
    Views:
    360
    Dan Christensen
    Feb 20, 2006
  5. TBM

    .pl -> .exe not so obvious ...

    TBM, Aug 12, 2004, in forum: Perl Misc
    Replies:
    5
    Views:
    118
Loading...

Share This Page