VS2005 Web Project - No DLL for Nunit

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

    VS2005 Web Project - No DLL for Nunit

    Hi,

    Creating a new website and building, there's no DLL. Apparently it
    builds it on first request and sticks it in some temp cache somewhere.
    That's all fine and dandy, except how do I reference my web project
    from my test project if there's no DLL to reference?

    I found the Web Application Project Template download from MS so that I
    can create traditional VS2003 style projects, and this solves the
    problem because I have a DLL.
    But MS seems to plug this project template ONLY for converting 2003
    projects to 2005.
    They make no mention of testing.

    So this makes me think that I've missed something?
    I'd rather develop my website projects using the default VS2005 web
    project rather than the new one I downloaded, because thats how MS
    wants me to develop (I'm very impressionable) . So how do I get a
    seperate test project to test my web project classes?
    (WITHOUT having to move those classes into a seperate assembly).

    Many thanks in advance,
    Steven Nagy

  • Ben Voigt

    #2
    Re: VS2005 Web Project - No DLL for Nunit

    "Steven Nagy" <learndotnet@ho tmail.comwrote in message
    news:1157675407 .156825.156500@ m79g2000cwm.goo glegroups.com.. .
    Hi,
    >
    Creating a new website and building, there's no DLL. Apparently it
    builds it on first request and sticks it in some temp cache somewhere.
    That's all fine and dandy, except how do I reference my web project
    from my test project if there's no DLL to reference?
    >
    I found the Web Application Project Template download from MS so that I
    can create traditional VS2003 style projects, and this solves the
    problem because I have a DLL.
    But MS seems to plug this project template ONLY for converting 2003
    projects to 2005.
    They make no mention of testing.
    >
    So this makes me think that I've missed something?
    I'd rather develop my website projects using the default VS2005 web
    project rather than the new one I downloaded, because thats how MS
    wants me to develop (I'm very impressionable) . So how do I get a
    seperate test project to test my web project classes?
    (WITHOUT having to move those classes into a seperate assembly).
    Can't you use a "reference to project" instead of "reference to DLL"?...
    that way it follows the project output, whether it's debug/release, etc.
    >
    Many thanks in advance,
    Steven Nagy
    >

    Comment

    • Steven Nagy

      #3
      Re: VS2005 Web Project - No DLL for Nunit

      No it doesn't even see the project under the project references.
      And I'm assuming this is because the DLL doesn't exist for the web
      project.
      Does it work for you in VS2005, new web site?

      Comment

      • gh0st54

        #4
        Re: VS2005 Web Project - No DLL for Nunit

        The dll's are created when you publish your site

        "Steven Nagy" <learndotnet@ho tmail.comwrote in message
        news:1157675407 .156825.156500@ m79g2000cwm.goo glegroups.com.. .
        Hi,
        >
        Creating a new website and building, there's no DLL. Apparently it
        builds it on first request and sticks it in some temp cache somewhere.
        That's all fine and dandy, except how do I reference my web project
        from my test project if there's no DLL to reference?
        >
        I found the Web Application Project Template download from MS so that I
        can create traditional VS2003 style projects, and this solves the
        problem because I have a DLL.
        But MS seems to plug this project template ONLY for converting 2003
        projects to 2005.
        They make no mention of testing.
        >
        So this makes me think that I've missed something?
        I'd rather develop my website projects using the default VS2005 web
        project rather than the new one I downloaded, because thats how MS
        wants me to develop (I'm very impressionable) . So how do I get a
        seperate test project to test my web project classes?
        (WITHOUT having to move those classes into a seperate assembly).
        >
        Many thanks in advance,
        Steven Nagy
        >

        Comment

        • Steven Nagy

          #5
          Re: VS2005 Web Project - No DLL for Nunit

          Ok thats cool, so how do I do testing then?
          Its too late once I've published the site.

          Comment

          • Ben Voigt

            #6
            Re: VS2005 Web Project - No DLL for Nunit


            "Steven Nagy" <learndotnet@ho tmail.comwrote in message
            news:1157760205 .218739.116640@ m79g2000cwm.goo glegroups.com.. .
            No it doesn't even see the project under the project references.
            And I'm assuming this is because the DLL doesn't exist for the web
            project.
            Does it work for you in VS2005, new web site?
            >
            Nope, you're right, the web project can't be referenced. Can you explain
            your rationale for not putting your testable classes in a reusable assembly?


            Comment

            • Steven Nagy

              #7
              Re: VS2005 Web Project - No DLL for Nunit

              Nope, you're right, the web project can't be referenced. Can you explain
              your rationale for not putting your testable classes in a reusable assembly?
              But thats just it... I _am_ putting my test cases in a seperate
              assembly.
              But this seperate assembly is in a seperate project, so essentially I
              have 2 projects:

              MySite.Web
              MySite.Tests

              But I can't reference MySite.Web from within MySite.Tests without
              adding a reference.

              Unless you ment something different, in which case I'm sorry for
              misunderstandin g the question.

              Comment

              • Ben Voigt

                #8
                Re: VS2005 Web Project - No DLL for Nunit


                "Steven Nagy" <learndotnet@ho tmail.comwrote in message
                news:1158010073 .584564.160100@ p79g2000cwp.goo glegroups.com.. .
                >
                >Nope, you're right, the web project can't be referenced. Can you explain
                >your rationale for not putting your testable classes in a reusable
                >assembly?
                >
                But thats just it... I _am_ putting my test cases in a seperate
                assembly.
                But this seperate assembly is in a seperate project, so essentially I
                have 2 projects:
                >
                MySite.Web
                MySite.Tests
                >
                But I can't reference MySite.Web from within MySite.Tests without
                adding a reference.
                >
                Unless you ment something different, in which case I'm sorry for
                misunderstandin g the question.
                >
                No need to be sorry, but I asked why the testable classes, not the tests,
                couldn't go into a new project.

                So you'd have something like:

                MyLogic
                MyLogic.Tests
                MySite

                where MyLogic is referenced by both MySite and MyLogic.Tests

                I know you already said you didn't want that, but I was trying to find out
                why, because maybe there's another way to get the behavior you want.


                Comment

                • Steven Nagy

                  #9
                  Re: VS2005 Web Project - No DLL for Nunit

                  Ah ok I see what you are saying.

                  Yes there are a number of work arounds, and I have already continued on
                  with the project with one such work around. I was just more interested
                  in the design reason for the lack of availability of the assembly for
                  testing; the 'why' of it all, and if there is a way to do it against
                  the web site classes, rather than the way you suggested, or resorting
                  to the web application templates you can download from Microsoft.

                  Cheers,
                  SN

                  Comment

                  Working...