I’m fairly new to Sharepoint 2010 development. Whenever I need to make a UI or code change to a page/user control/webpart, I open the solution in VS 2010, open the file, make markup/code changes, overrite the markup file (.aspx, .ascx) in the 14 hive, then GAC the assembly, restart IIS, refresh the page, wait for couple minutes (literally), then check if the changes are correct. If not, repeat the process again with the new code. Attach to W3WP process if debugging is desired. The part that takes the most time is refreshing the page after IIS restart. It takes literally 2-3 minutes to complete loading the page and I just sit there staring at the loading icon in IE to stop. I have an i5 laptop with 8 gigs memory and tons of free space. I have only SP Central Admin and my project on my laptop.
My question is, if I just GAC the assembly and refresh the page, my code changes won’t show up until I restart IIS. It looks like IIS is caching the dll’s/pages or something. How do I disable this behaviour? I want to be able to just GAC the assembly, hit refresh and I should see my changes.
Any pointers would be greatly appreciated.
if you open your SharePoint solution in Visual Studio and just right click on your project and hit “Debug” or “Deploy” – the proccess should go fairly fast on your system (maybe 5-10 sec maybe on a small solution). By doing this the WSP is deployed (with DLL copied to GAC) and the application pool is just recycled to fetch the updated DLL in GAC, no slow iisreset is needed.
In SharePoint 2010 Visual Studio will also attach automatically to the correct W3WP process when you hit “Debug”
If you for some reason have to manually copy your DLL to the GAC you can still do a recycle of the application pool instead of an IISRESET.