dll missing when debugging ASP.Net WebApp?

G

Guest

Hi,

Everytime I change my code and hit the start debug button on the ASP.Net
WebApp project I often get a very annoying message saying such and such dll
is missing from ASP.Net temporary directory.

This is really strange it seems that there is a problem with Visual
Studio.Net compiler because to fix this I had to stop the webserver,
recompile (VS.Net rebuild), restart IIS and then start debugging.

Anyone has any suggestion about this problem?
 
S

Steven Cheng[MSFT]

Hi Victor,

From your description, when you changed some code in your asp.net project
and hit F5 to debug the application, you'll often get message saying some
temp dll is not found ,yes?

As for the problem, I'd like to confirm the following things:
1. Is the problem occurs if you use Ctrl+F5 to run the project rather than
F5 DEBUG?

2. Any other asp.net web project also suffer this problem or just this one?


I suggest you try creating a new empty web project and add a simple asp.net
page (just use Response.Write to output some string) and perform the same
test to see whether the problem occurs.

Also, if you have anyother findings, please feel free to post here. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
V

Victor Hadianto

Hi Steven thanks for your help.
1. Is the problem occurs if you use Ctrl+F5 to run the project rather than
F5 DEBUG?

It happen in both Ctrl+F5 and F5/Debug. I probably should also said that
this ASP.Net project share some common dll with another Windows Form project
in my solution. Now if I change the Windows Form project as the startup
project when I recompile the Windows Form project it seems to 'break' the
ASP.Net project as well. IE: my colleague who is using my box as the
webserver (sharing the same project but only working on JavaScript) also see
the missing *.dll problems (after I recompile)
2. Any other asp.net web project also suffer this problem or just this
one?
I don't have any other ASP.Net web project so I can't confirm this issue :)
However I will try to create some new one to follow your suggestion and I
will post more finding here.

Update:

I got frustrated so I delete the temporary directory in
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\[My web
project name]

and it seems to fix the problem for a couple of hours before this problem
start reappearing again.
 
S

Steven Cheng[MSFT]

Hi Victor,

Thanks for your followup. As you mentioned that the asp.net project is
sharing some common assemblies with another winform project in the same
solution. Are the common assembly also a single project in the solution and
is refernced by project? This info does make much sense. Sometimes such
multi-reference will cause some strange behaviors.
Also, I think the problem is likely only againt the particular project. But
you can still perform some tests on a new clean web project to confirm
this. Anyway, please let me know if you meet this problem again or have any
new findings. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
V

Victor Hadianto

Hi Steven,

Let me explain the situation of my solution so for example we have:

MySolution.sln
-----> Util.dll
-----> App.exe (reference Util.dll)
-----> Web App (reference Util.dll)

So I have a couple of common projects are are reference by both a WinForm
project and Web App project. I simply switch between the two to tbe the
"Startup Project".

And this problem still happen. I found a way to fix this though which is the
following:

* Press F5 to debug the app
* IE will show up and I get the missing DLL problem
* Stop the debug
* Stop IIS
* Rebuild the web application
* Restart IIS
* Press F5 to debug the app
* IE will show up and this time it'll be OK.

This method works 100% for me. Don't know why. Maybe for some reason the
first F5 does not override/build the dll correctly while IIS is still
running.

Is this a known bug?
 
S

Steven Cheng[MSFT]

Hi Victor,

Thanks for your followup. Is the Util.dll assembly you mentioned a pure
net assembly? Also, is it strongnamed or not? I think you can try
separate the winform app from the asp.net first, make another copy of the
Util.dll and then reference the Util.dll in asp.net with one and reference
in the winform app with another. And then, build the asp.net project and
run again to see whether the problem still occurs.
In addition, I suggest that we use the filemon tool to have a trace to see
the actual missing assembly info.

Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
S

Steven Cheng[MSFT]

Hi Victor,

Have you got any further progress on this issue or have you resolved it? If
there're anything else we can help, please feel free to post here. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
V

Victor Hadianto

Hi Steven,

Well we still don't have a resolution yet on this issue, but I found another
workaround which is quicker and acceptable enough for us. This is the
behaviour:

* Hit F5 for debug
* ASP.Net will display the missing dll problem on IE.
* Close IE, automatically go to the VS.Net IDE
* Then "Build" the current project. Just "Build Proejct" not "Build
Solution" that wont work. Don't really know why.
* Hit F5 again and everything works OK.

Note that you can't (100%) do "Build" before encountering the problem first.
I thought about this initially and this simply doesn't work so you have to
ecounter the missing dll problem -> stop -> build current project -> F5.
This seems to be good enough solution for us at the moment.
 
S

Steven Cheng[MSFT]

Thanks for your followup Victor.

Glad that you've found some better means to work through it.
Still think the problem due to assembly referencing issue. Anyway, if you
meet any further problem later, please feel free to post here. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top