Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Solution for [Cannot update project reference ''] & [Validating Web Site] delay

Folks, I have a an old ASP.Net website that I have to modify occasionally.

When I go to build or run the site, I get

Cannot update project reference ''. Source project not available.Validating Web Site

It then steps through each folder and page in the project & "Validates" it. The site is quite sizable, and can take 5+ minutes on my beefy Windows-7 PC.

Anyone any ideas how I can track down the '' project reference and get rid of this? The Validation is breaking my heart, small change, run, wait 5 minutes, test, small change, run wait 5 minutes . . . gag

ASP.Net isn't my bag so forgive me if this is a school boy error.

like image 549
Binary Worrier Avatar asked Jan 21 '11 16:01

Binary Worrier


2 Answers

Visual Studio 2008 stores project references for Web Sites in the Solution file (.sln)

Find and edit or remove the offending project references by editing the Solution file with Notepad or Notepad++.

A typical project entry

(here the GUID {2F769E88-2909-49A8-A5D6-1AF1C27FAB4E} on the far right is the project's ID to be referenced by some other project) ...

 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyLibrary", "Source\MyServiceLibrary\MyLibrary.csproj", "{2F769E88-2909-49A8-A5D6-1AF1C27FAB4E}"
 EndProject

A reference to the above project entry from a Web Site

 Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "WebSite", "Source\WebSite", "{66E258DA-36BE-4643-BC7E-2D9D90A6BEB9}"
    ProjectSection(WebsiteProperties) = preProject
        ...
        ProjectReferences = "{2F769E88-2909-49A8-A5D6-1AF1C27FAB4E}|MyLibrary.dll;"
        ...
    EndProjectSection
 EndProject
like image 102
oleschri Avatar answered Nov 13 '22 14:11

oleschri


Right click on the website in the solution and click 'Property Pages'. Under references, find the reference which is failing (it will say 'unavailable' next to it), remove and then re-add it. I believe this solution is preferable to editing the .sln file directly.

like image 26
josh Avatar answered Nov 13 '22 14:11

josh