I have a Console App created in VS 2010 targeting .NET 4.0. According to Microsoft (Rick Byers) AnyCPU is no longer the default for Console Apps because, in the Microsoft way, they feel like it is a better idea to default to x86. Also, the option to change the platform to AnyCPU, or x64 for that matter, does not seem to be available.
Now, I have this Console app that I am building, and I have a Class Library project where I am writing unit tests in NUnit (I practice TDD). So, the issue is that when I go to implement the code to make my tests pass they still fail. After a while I found that it is because (even when I do it from the solution level) when the project rebuilds it is not rebuilding the console app project. This causes the reference to not get updated in my unit tests which of course means my test is executing against old code and not the newly imlemented code. Big problem.
Currently, I am having to right-click the console app and select rebuild, then right-click the test project and select rebuild EVERY time before I run my tests. This is extremely annoying.
So, back to the question, how can I make VS2010 rebuild my Console App and update the reference in my class library automatically like it did in older versions of Visual Studio?
Please do not answer with "add a build event to do it." I would very much appreciate Visual Studio to just work because I don't want to have to remember that I need to "add a build event to do it" every time I create a new console app.
NOTE: So far, I have tried the following workaround at:
Which doesn't work for my unit test project. So I tried to delete the reference and re-add it from Visual Studio, and I get a dialog that says "Cannot add reference". So I reverted it back to the visual studio default template.
UPDATE: I logged this as a bug with Microsoft Connect here.