static bool CanReference (Document doc, MonoDevelop.Projects.ProjectReference projectReference)
		{
			var project = doc.Project as DotNetProject;
			if (project == null || projectReference == null || project.ParentSolution == null)
				return true;
			switch (projectReference.ReferenceType) {
			case ReferenceType.Project:
				var referenceProject = projectReference.ResolveProject (project.ParentSolution) as DotNetProject;
				if (referenceProject == null)
					return true;
				string reason;
				return project.CanReferenceProject (referenceProject, out reason);
			}
			return true;

		}
		string GetReferenceLibraryPath (MonoDevelop.Projects.ProjectReference pref)
		{
			string path = null;
			
			if (pref.ReferenceType == ReferenceType.Project) {
				DotNetProject p = pref.ResolveProject (project.ParentSolution) as DotNetProject;
				if (p != null)
					path = p.GetOutputFileName (IdeApp.Workspace.ActiveConfiguration);
			} else if (pref.ReferenceType == ReferenceType.Assembly) {
				path = pref.Reference;
			} else if (pref.ReferenceType == ReferenceType.Package) {
				path = pref.Reference;
			}
			if (path != null && GuiBuilderService.SteticApp.IsWidgetLibrary (path))
				return path;
			else
				return null;
		}