Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Force Visual Studio Rebuild on Embedded Resource Changed

We have a SQL file that's an embedded resource in our solution. When the sql file changes, and we click debug, the solution doesn't rebuild the project with the embedded resource if no actual C# code has changed.

I've had this issue with other solutions as long as I can remember, and I personally know to do Build Solution to make sure it gets built...but this has become an issue for a number of new developers who can't remember to do this and get confused when their changes to the SQL file aren't reflected at debug time...so I was wondering if anyone knows an easy fix.

like image 307
Jeff Avatar asked Jan 03 '12 17:01

Jeff


1 Answers

The easiest fix is to "rebuild" instead of "build". Other people will "clean" and then "build" to be 100% sure.

Embedded Resources are not updated in the debugging DLLs unless the output DLL is truncated, which can only be guaranteed to occur with rebuild and clean.

like image 141
Squirrelsama Avatar answered Sep 27 '22 23:09

Squirrelsama