problem with web site and custom project configurations

G

Guest

Hi everybody,

I've got a solution that has several dll projects and a website.
For the dll projects I've add a configuration 'debug - no code analysis'.

Now for the website I can't create custom configurations...

The fact that I can't create different configuration for running with code
analysis and without code analysis is irritating, but I could live with it.

the problem is this:

Because the web site is in configuration DEBUG it copies the dlls it depends
on from the DEBUG directory of the dll projects, EVEN if the projects are
configured as 'debug - no code analysis' during the solution build!

This means that if the changes I made to the dll projects since the last
time I compiled the debug configuration did not change the public interface
of the dlls (i.e. didn't change the functions the web site are using) then
the web site will compile and run using the OLD dlls and NOT the dlls I just
compiled!
If on the other hand the public interface of the dlls has changed, then I
will get strange errors that the web site can't find functions that DO exist
in the source code.

And the only way I can see to fix it is to recompile the solution in debug
mode...

And another thing:
Why is a failure to find a dll a warning and not an error?

I compile the web site, the web site tries to get a dll that was not
compiled because of the configuration mismatch.
I get a warning:
MSBUILD : warning MSB3021: Unable to copy file
"D:\BacSoft\Client\WebClientLogic\bin\Debug\WebClientLogic.dll" to
"D:\BacSoft\Client\WebClient\Bin\WebClientLogic.dll". Could not find file
'D:\BacSoft\Client\WebClientLogic\bin\Debug\WebClientLogic.dll'.

And then the compilation just goes on as usual...
(including the website deploy and the website setup projects afterwards).

This does not make sense to me.

Thanks,
Nadav
 
S

Steven Cheng[MSFT]

Hello Nadav,

As for the ASP.NET 2.0 Web site project, since it by default use complete
dynamic compilation, there is no precompiled output assembly at development
time(in IDE), this is different from ASP.NET 1.x. And for its dynamic
compiled ans generated assemblies, the debug/release attribute is
determined by the <compilation debug="true/false" /> element in web.config
file.

#Debug and Release Builds in ASP.NET 2.0
http://odetocode.com/Blogs/scott/archive/2005/11/15/2464.aspx

Currently, according to this behavior, the ASP.NET dev team has provided
two add-on projects

"Web Deployment Project" and "Web application Project"

Web deployment project provide you more convenient features for precompile
ASP.NET 2.0 web application:

#VS 2005 Web Deployment Projects
http://weblogs.asp.net/scottgu/archive/2005/11/06/429723.aspx

You need to download it individually and install it.

Web Applciation project provide you a VS 2003/ASP.NET 1.X like project
model for developing ASP.NET 2.0 application, you'll get it after you
install the visual studio 2005 SP1.

Both of the two projects can be configured as "Debug" or "release" (or
other configuration as you've added in the solution's build configuration).

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================



This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top