Yellow triangle in Visual Studio Package References

There are so many different reasons of getting this generic error. My particular use case is impacted by gitignore file. The project is configured to use package configuration and the lib (dll) were ignored in gitignore file.

I had a working solution on my local. I commited this solution to ADO main. I went to ADO and created a working branch from main branch. I open working branch and started getting these yellow triangles.

I decided to use MVC package as a test case. These are working solution lib files;

These are not working solution lib files (branch created from main).

You can see “System.Web.Mvc.dll” is missing in second picture.

How did I fix it?

The simplest way is to go to main branch in ADO and delete packages folder;

  1. Clone the repository locally
  2. Make the changes to the local version
  3. Commit the changes locally
  4. Push the changes back up to the GitHub repository

Goto each file and select Git and Add;

The folder will be back in the view;

Make sure to comment this line in gitignore file;

# NuGet Packages
# *.nupkg
# The packages folder can be ignored because of Package Restore
# SHAHZAD - Don't uncomment this line
# **/packages/*
# except build/, which is used as an MSBuild target.
# !**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
# NuGet v3's project.json files produces more ignoreable files
# *.nuget.props
# *.nuget.targets

Problem solved.

Delete a local git branch

How to delete a Test_Branch.

Switch to some other branch and delete Test_Branch, as follows:

$ git checkout master
$ git branch -d Test_Branch

If above command gives you error – The branch 'Test_Branch' is not fully merged. If you are sure you want to delete it and still you want to delete it, then you can force delete it using -D instead of -d, as:

$ git branch -D Test_Branch

To delete Test_Branch from remote as well, execute:

git push origin --delete Test_Branch

Check the link for more info.

Azure DevOps Git Clone error

I have changed my user’s name in Azure DevOps. When I try to clone to repo, started getting this error;

I have no permission issues then what the heck?

It turns out that the issue is with the URL. Please don’t try to connect to url which is produced by portal, something that look like this;

instead try to connect thru your GIT username and then use password;

If you username has special characters, Git cmd/bash will trhough errors, so replace those with valid characters;

@ can be replaced with %40

+ can  be replaced with %2b

Something like;

what a waste of time…

One of my developer started getting Git Credential Manager for windows popup and received Authentication failure message. The work around was;

Check the Git for Windows in the Tools – Get Tools and Features…), go to “Individual Item” tab,  check “Git for Windows”, and click “Modify”. Then it will ask you to update vs2017 to latest version, for example 15.9.36.

Voila, it started working.


Creating Repo and adding project using UI

Create a repo using Azure DevOPS UI;

Project Settings -> Repositories -> Create

Name Repository “Demo”.

Open command prompt.

git clone[orgName]/[projectName]/_git/Demo

Create a project for example Demo in a separate folder;

Copy project file from separate folder to clone folder;

Open solution in clone folder. Commit changes and you are good to go.

Related links