Note that there are some explanatory texts on larger screens.

plurals
  1. POVisual Studio 2010 suddenly can't see namespace?
    primarykey
    data
    text
    <p>My C# WinForms solution has two projects. A DLL which is the main project I'm working on, and an executable WinForms I call "Sandbox" so that I can compile/run/debug the DLL easily in one go.</p> <p>I'm working in .Net 4.0 for both projects.</p> <p>Everything was working fine until I added some seemingly innocent code, and a reference to System.Web in the DLL. Now my Sandbox project can't see the namespace of the DLL project. I didn't change anything which I believe should have affected this.</p> <p>If I delete the project reference to the DLL from the Sandbox references and re-add it, then the red underlines all disappear and the colour coding comes back for all my classes etc; but as as soon as I try to build the solution, the whole thing falls apart again.</p> <p>When I right-click the DLL project in the Sandbox's references and view in object browser, I can see the namespace and all the stuff in there.</p> <p>I have a feeling this might be some sort of bug?</p> <p>Is this some sort of VS2010 bug? I had this same issue a few months ago and I could only fix it at the time by making a whole new project and re-importing my files. This time, however, I have a bajillion files and will only do that as a last resort!</p> <p>Edit: After panickedly going through and undoing all my changes, trying to find what caused the problems, it seems to be this line:</p> <pre><code>string url = "http://maps.google.com?q=" + HttpUtility.UrlEncode(address); </code></pre> <p>If I comment out this line, then I get no namespace errors and the project builds fine. I can't see anything wrong with this line though.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload