I migrated a visual studio solution from using a "website" to a "ASP.net project" to be able to use Web.config transformation.
Now, after having migrated, Visual Studio completely ignores syntax erros when I clean/build/rebuild my solution.
Those syntax errors will be shown in my browser as soon as I open the web application - but seeing them during compile time would be helpful. They used to be shown in my error list - where I can now only see some uninteresting warnings.
I can still run my web application, and everything works well.
How can I configure my solution, so that compile errors will appear during compile time?
edit (in response to answers/comments):
- As soon as I open the .cs file (by double clicking on it) the syntax errors are shown (inside the file and inside the error list view).
- I'm using Microsoft Visual Studio Professional 2012 (Version 11.0.61030.00 Update 4) with .NET 4.5.50709 (german language version). I'm locally deploying to Visual Studio's IIS.
- I'm not using NuGet, all my sources are in one single project
- I'm actually only providing a REST-Backend using WCF. I only have c# sources. The syntax errors are in my c# classes.
- The syntax errors are in my .cs files in my App_Code folder.
- When I migrated my website to a project I manually edited my .csproj file (added missing "Content Include"s etc.). I hope that this did not break my solution...
- I am not using the default "DEBUG" and "RELEASE" build configurations, but created my own server-specific configurations (named after the names of each server).
- ( @Guvante ) When I edit the build configurations, I see one line in the "project context table". The first and only line shows:
- the name of my project
- the configuration name in a dropdown
- the plattform "Any CPU"
- a checked checkmark "build"
- the empty field "deploy"
- My error list is filtered to "current project" and it won't show the syntax errors, no matter which item I select in my solution explorer.
- Sometimes (can't tell when exactly) VS shows a warning, when starting debugging, telling my that my module was build with optimizations or without debugging information. Don't know, whether this warning is related to this issue.
Console output of successful build (though sources contain syntax error) is:
1>------ Erstellen gestartet: Projekt: MyProject, Konfiguration: localdev Any CPU ------
1> MyProject -> C:\path\MyProject\bin\MyProject.dll
========== Erstellen: 1 erfolgreich, 0 fehlerhaft, 0 aktuell, 0 übersprungen ==========
- I saved, closed VS, rebooted machine, reopened VS, closed eyes, crossed fingers - @chief-two-pencils ;)