Connecting Tech Pros Worldwide Help | Site Map

VS2005 Web Project - No DLL for Nunit

 
LinkBack Thread Tools Search this Thread
  #1  
Old September 8th, 2006, 12:15 AM
Steven Nagy
Guest
 
Posts: n/a
Default 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


  #2  
Old September 8th, 2006, 10:35 PM
Ben Voigt
Guest
 
Posts: n/a
Default Re: VS2005 Web Project - No DLL for Nunit

"Steven Nagy" <learndotnet@hotmail.comwrote in message
news:1157675407.156825.156500@m79g2000cwm.googlegr oups.com...
Quote:
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.
Quote:
>
Many thanks in advance,
Steven Nagy
>

  #3  
Old September 8th, 2006, 11:55 PM
Steven Nagy
Guest
 
Posts: n/a
Default 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?

  #4  
Old September 10th, 2006, 04:55 PM
gh0st54
Guest
 
Posts: n/a
Default Re: VS2005 Web Project - No DLL for Nunit

The dll's are created when you publish your site

"Steven Nagy" <learndotnet@hotmail.comwrote in message
news:1157675407.156825.156500@m79g2000cwm.googlegr oups.com...
Quote:
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
>

  #5  
Old September 10th, 2006, 10:25 PM
Steven Nagy
Guest
 
Posts: n/a
Default 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.

  #6  
Old September 11th, 2006, 01:25 PM
Ben Voigt
Guest
 
Posts: n/a
Default Re: VS2005 Web Project - No DLL for Nunit


"Steven Nagy" <learndotnet@hotmail.comwrote in message
news:1157760205.218739.116640@m79g2000cwm.googlegr oups.com...
Quote:
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?


  #7  
Old September 11th, 2006, 09:15 PM
Steven Nagy
Guest
 
Posts: n/a
Default Re: VS2005 Web Project - No DLL for Nunit

Quote:
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
misunderstanding the question.

  #8  
Old September 12th, 2006, 06:55 PM
Ben Voigt
Guest
 
Posts: n/a
Default Re: VS2005 Web Project - No DLL for Nunit


"Steven Nagy" <learndotnet@hotmail.comwrote in message
news:1158010073.584564.160100@p79g2000cwp.googlegr oups.com...
Quote:
>
Quote:
>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
misunderstanding 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.


  #9  
Old September 12th, 2006, 10:45 PM
Steven Nagy
Guest
 
Posts: n/a
Default 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

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,662 network members.