Showing posts with label tip. Show all posts
Showing posts with label tip. Show all posts

A quick way to delete all the bin and obj folders in your solution

Something like this is a cinch with Powershell

1. open the powershell command prompt
2. enter the command get-childitem -path "C:\sourceCode\MySolution" -recurse -include obj,bin | remove-item -force -recurse

Handy for ensuring your solution will build from scratch with no unreferenced/circular referenced assemblies or for deleting dlls that have become locked which sometimes happens. Same principle could easily be applied to the asp.net cache.

Edits were made which cannot be compiled. Execution cannot continue until the compile errors are fixed

I was getting a really annoying error today, visual studio (vs2008) kept claiming "Edits were made which cannot be compiled. Execution cannot continue until the compile errors are fixed". No didn't change anything though I swore after the 10th time. The code was compiling and running fine - I only got the error when I had a breakpoint set - without the breakpoint everything was hunky-doory.

Reading this connect bug http://connect.microsoft.com/VisualStudio/feedback/details/400456/edit-and-continue-preventing-execution-at-breakpoint-when-no-code-changes-were-made-in-vs2008 it looks like my issue was that I had silverlight and regular wpf/c# code in the same solution (different projects but some shared linked files with conditional #if SILVERLIGHT precompiler directives) and visual studio was somehow confusing the two.

Unloading the silverlight projects fixed the issue. The suggested work around on the connect site was to turn off edit and continue - that worked too.