Error on subsequent deployment of web part for VS2008 and VSeWSS 1.2
Working with the VS 2008 extensions for WSS for a week now (on 32-bit..sigh) and today i got an odd behavior from it, which seems to be the same as was occuring for VS 2005 extensions for WSS..methinks this might just be a straight port.
anyways, been deploying web parts from VS as i've been developing them (and for testing of course) quite happily since i installed them. But today i started getting an ambigious error "Value does not fall within the expected range" showing in the VS IDE error list. double-clicking on it solved nothing..
Tried a few things to see what was caushing this and ReSharper's inbuilt solution analysation tool showed nothing either...odd.
then went through the build output and saw that the error occured straight after "Creating Solution...". With no stack and no indication on what was causing it.
Very useful error? not really...strange thing was that the solution would build, my pre-build and post-build events were firing fine..everything was working, except deploying the web parts.
Tried pulling one after the other out of the project..nothing..nada..was...not..working.
Lastly i tried, just for fun really, to move to the solution folder and "remove" the pkg folder (the package folder that is, but it's called pkg), did another deploy and voila..working.
So, if you get this ambigious error simply just remove that folder. it'll be generated again and i'm assuming that there's either a permission issue popping up there or a corruption of the files. Regardless, deleting that folder did the trick.
Update: it appears that i now have to delete the "pkg" folder each time i want to deploy....hmmmmm. think this might have to be brought to the teams attention as i've seen this problem mentioned for VS 2005 VSeWSS 1.1 as well.
Update: an easy fix for this problem is to add a pre-build event rd /S/Q "$(ProjectDir)pkg\" which will remove that folder and all files in it before attempting to build the project. It doesn't really fix the problem (as i don't know what's causing it to start with) but it does allow you to continue on with your work if you get stuck with this. Still looking for a "TRUE" solution to stop it altogether.