views:

171

answers:

2

I have a website which uses a web user control... well, basically all over the place. It's even included in other web user controls.

So I thought I could just upload the new source and it would recompile on the fly and be fine, but instead every page or control that uses it complains about a type mismatch. Because it is used in so many places, it very quickly becomes easier to just update the entire website. (Or at least it would if I didn't need to go through our change management process for that...)

So is there something I'm missing? Isn't there any way to upload a web user control and have it recompile like when you update a single web page?

+1  A: 

I think it is recompiling, it just takes a bit and you have a conflict with the mismatched .ascx and .ascx.cs files in Temporary ASP.NET Files while it recompiles. I could be wrong about this. Personally, I've had better success if I always upload both the .ascx and .ascx.cs files together.

John Sheehan
I am uploading both together (have to as far as I know.) I think the problem is that the .dll files for other pages/controls have references to the previously compiled version of the control... so when it recompiles those .dlls are no longer valid
Telos
+1  A: 

I would think that if you pushed these items you should be good... any less and you might have issues:

  1. bin contents - this will include your code changes to the user control and if the assembly version changes you will want to include any .dll that use it, I have run into issues to many times by trying to push just a single .dll that is in the bin.

  2. .ascx file

I don't think you would need to push any other .aspx or .ascx files.

J.13.L
You would need to push all the .aspx files if you updated the bin files... as the codebehind reference would no longer be valid. Therefore you're still updating the entire site...
Telos
I respectfully disagree... I have several applications I make changes to that If I only make changes in the code behind I only push out the bin folder... We actually have an automated after build process (Team Foundation) that determines what files have changed and publishes them for us...
J.13.L
After looking over some things, I suspect you are using the "fixed naming and single page assemblies" option. We aren't, so that won't work here.
Telos