How to get Visual Studio to show hints and warning in a web-site?
Asked Answered
T

0

2

When you build a web-site in Visual Studio, it will not show you any Hints or Warning related to aspx markup files unless you have the file physically open in the editor.

For example, there is a Hint related to my Default.aspx file. But right now i only have the aspx.cs file visible:

enter image description here

If i build the solution (or Rebuild the solution, or Build the web-site, or re-build the web-site (whatever those different options mean)):

enter image description here

i get no hints or warnings about my web-site or solution:

------ Rebuild All started: Project: D:\...\WebSite\, Configuration: Debug Any CPU ------
Validating Web Site
Building directory '/WebSite/App_Code/'.
Building directory '/WebSite/Account/'.
Building directory '/WebSite/'.
Building directory '/WebSite/Scripts/'.

Validation Complete
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========

Nor do i get any hints or warnings about my web-site or solution:

enter image description here

But if i simply press F7 to make the markup file appear:

enter image description here

And build my solution (or rebuild my solution, or build my web-site, or rebuild my web-site (whatever those different options mean)), i get hints and warnings related to Default.aspx:

enter image description here

How do i make Visual Studio its job?

The only workaround i've been able to come up with is to open each file in the web-site, switch to the "designer" view, and then build the solution (or rebuild the solution, or build the web-site, or rebuild the web-site (whatever those different options mean)). When you have 60 or 70 pages, that gets quite tedious:

enter image description here

But at least i then get to see the hints and warnings in the web-site solution:

enter image description here

Is there a way to convince Visual Studio to build the entire solution? (Or rebuild the entire solution? Or build the entire web-site? Or rebuild the entire web-site? (Whatever those different options mean))

Tambour answered 30/7, 2014 at 15:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.