|
-
Dec 8th, 2020, 05:42 PM
#1
GitHub Project Issue
I pulled a collaborative project off of GitLab (essentially GitHub, but not as well known). The project is a ASP.NET project using Web Forms, but that may not be relevant to the question. The problem I'm seeing is that the project loads, yet EVERY reference is "not found". That includes all the boilerplate Framework references like System, which means that types like Boolean and Integer are not defined. There are other oddities, too, which suggests that some file is missing. For example, if I go into Project Properties, I should see the project name, as is shown in Solution Explorer. I'm not quite sure how to make it such that the application name and the project name are not the same, but for this downloaded project, they are not. The project name showing in Project Properties is WebApplication1, the default name. That default name doesn't show up if you create a blank project with any name other than the default name, but I don't know how this project was created. It may be that it started with the default name, then the name was changed in other places, but not wherever Project Properties takes data from.
I have some other projects that occasionally lose track of references, though only references to dlls that I created, and only when I rebuild those dlls. In those cases, I remove the reference and re-add it and all is well. That doesn't work for the references in this project. I can remove them, but when I re-add them, some are stated as being already present, while others just show up with the same "not found" yellow triangle.
I've never seen anything like this, and am not sure what to look at. As a test, I created a similar project as a test, and all the references were there and working, so I don't believe it's an installation problem. Two other points is that there is a NuGet package that is not being included, even though it should be an automatic download. Manually including it doesn't seem to do anything, as the error doesn't go away. The other point is that the solution includes two projects, one of which was not on the GitLab repo, so I'm missing a project. That may well account for a couple of the missing references, but it doesn't seem like it should account for the missing references to the boilerplate items.
Any suggestions?
My usual boring signature: Nothing
 
-
Dec 9th, 2020, 02:36 AM
#2
Re: GitHub Project Issue
Download nuget.exe from NuGet website, put it somewhere in PATH so you can use everywhere from command line, execute nuget restore in the root of the solution. If there are multiple solutions add solution name after restore.
If you have .NET Core (or .NET 5 as latest version) you can just use dotnet restore command that will download and restore all NuGet packages for the solution.
You can restore packages in NuGet console or using Manage NuGet packages command in Visual Studio but sometimes it fails on big messy solutions with hundred projects inside - this happens on VS 2019 latest preview and stable versions.
Last edited by peterst; Dec 9th, 2020 at 02:41 AM.
-
Dec 9th, 2020, 09:00 AM
#3
Re: GitHub Project Issue
Sounds like maybe it's missing a project file or something. Certainly doesn't sound normal that's for sure, especially for a collaborative project.
-tg
-
Dec 9th, 2020, 10:33 AM
#4
Re: GitHub Project Issue
 Originally Posted by peterst
Download nuget.exe from NuGet website, put it somewhere in PATH so you can use everywhere from command line, execute nuget restore in the root of the solution. If there are multiple solutions add solution name after restore.
If you have .NET Core (or .NET 5 as latest version) you can just use dotnet restore command that will download and restore all NuGet packages for the solution.
You can restore packages in NuGet console or using Manage NuGet packages command in Visual Studio but sometimes it fails on big messy solutions with hundred projects inside - this happens on VS 2019 latest preview and stable versions.
This may be related to the NuGet package, but the fact that the System reference isn't found doesn't seem like it would have anything to do with NuGet. After all, if you use NO NuGet packages, you still have the boilerplate framework components, and those are missing...except that they aren't. There is just one NuGet package in the project, and that one should be automatically updating, but even manually updating it doesn't work.
I'm inclined to say that there's a project file missing, as well, I just haven't found which one, yet.
My usual boring signature: Nothing
 
-
Dec 9th, 2020, 11:17 AM
#5
Re: GitHub Project Issue
It sounds to me as if your references are being ignored in .gitignore. I'm not sure how it would be done in GitLab, but from Git BASH run the following:
Code:
git status --ignored
This will list the files/directories that are being ignored. My hunch is that your references are likely being ignored due to a wildcard.
-
Dec 9th, 2020, 11:34 AM
#6
Re: GitHub Project Issue
This may be related to the NuGet package, but the fact that the System reference isn't found doesn't seem like it would have anything to do with NuGet.
Missing NuGet references and or missing project references can mess up or appear to mess up your more standard references, I have seen it multiple times where this has happened and the System references missing is a red herring. Fix your NuGet / project issues and the others often go away.
Please Mark your Thread "Resolved",  if the query is solved & Rate those who have helped you
-
Dec 9th, 2020, 01:42 PM
#7
Re: GitHub Project Issue
I did manage to fix both the NuGet and the missing project issues. That has left me with just a bunch of bad references.
I took a look at .gitIgnore, and there's not all that much in it:
Code:
# directories to ignore
jsb_dictionaries/trashcan.dct
App_Data/tmp/
App_Data/trashcan/
App_Data/uploads/
.vs/
obj/
bin/
That's all.
One thing I have found is that the version number for things like System and System.Data are all 0.0.0.0, whereas they should be 4.0.0.0. This may be misleading, though, because the path for those dlls in a good project are all in Program Files (x86) and so forth. The paths in the bad project are all <the system cannot find the reference specified>.
Interestingly, when I fixed the missing project, the solution now has two projects with two sets of references (one in each project). Both projects reference common dlls like System. One project has them working fine, the other does not.
My usual boring signature: Nothing
 
-
Dec 11th, 2020, 06:29 AM
#8
Re: GitHub Project Issue
Might be best in this situation just to create a new project in the solution and if the references are fine when added then move across all your stuff from your project with the broken references.
Probably take less time than trying to fix your broken project
Please Mark your Thread "Resolved",  if the query is solved & Rate those who have helped you
-
Dec 11th, 2020, 03:10 PM
#9
Re: GitHub Project Issue
Yeah, we considered that. However, the reason we were using GitLab is as a shared repository. If the version in GitLab can't be used, that kind of defeats the purpose.
After trying a wide variety of things, we're going to kill off the GitLab repo and create a new one. It's kind of the nuclear option, but we do really want to have a working version in the repo.
My usual boring signature: Nothing
 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|