1

Cloning a project and it looks like it comes down fine, until I look in the references and they all have the yellow warning triangle. Then my Error List shows all the references as Warnings. My application is on Visual Studio 2017 and it is MVC with C# coding using .NET Framework 4.7.2. In my normal application, original, the references are perfectly fine and no errors and it works great. Builds and works fine. Once I bring down the clone is then the references are lost. I've done a build on the cloned version and it shows all the references as warnings.

I've double clicked a reference and received an error popup box of "This project cannot be viewed in the object browser because it is unavailable or not yet built. Please ensure that the project is available and built". It feels like Azuredev-ops is just missing my references and their location. I am the only one working on this, so there should be no conflicts. I've posted and cloned right after posting, with same result. My code and Web configs look just fine. I have cloned on other people's system too, and same problem with this application. FYI, many of my other applications are working fine using the clone. Just 1 application is having issues. My references are separated in that some are Copy Local True while others are False. I've also removed a reference and added it back, and it comes back with a warning as if it were never added.

Warning message for individual reference: The referenced component 'EntityFramework' could not be found.

I am also seeing errors for NuGet packages not being there, but when I look I see the package folder with all it's components in it.

It says that for all my windows core references. And just warning symbols in my reference folder for other references.

I am expecting no errors when I bring down the clone. I've upload using my machine and cloning should be able to use the same reference locations. It just feels like AzureDev-Ops is stripping my reference links out, and then going I can't find them.

Hoardling
  • 103
  • 4
  • Which package folder you checked? What's the path of these reference? (right click a reference > Properties> Check path) – starian chen-MSFT Jul 24 '19 at 08:06
  • My cloned references don't show a path. It is empty. My original does show paths to C:\Program Files(86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\System.dll etc... – Hoardling Jul 24 '19 at 13:33
  • Open project file (.csproj) through notepad, and post its content here. – starian chen-MSFT Jul 24 '19 at 13:54

2 Answers2

2

Azure-DevOps clone shows references as warnings

To resolve this issue, you should make sure of the following:

  • Make sure you have checked those two options Allow NuGet to download missing packages and Automatically check for missing packages during build in Visual Studio:

    enter image description here

  • Make sure you do not check the \packages folder to the source control.

  • When you clone the project from Azure-DevOps server and get missing reference error, you should use the NuGet command line Update-Package -reinstall in the Package Manager Console to force reinstall the package references into project. Check this thread for some more info.

Note: Especially need to pay attention to the third point.

Update:

Error:Mircrosoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.0

According to the error message, it seems you are not add your packages to your packages source in Visual Studio.

You should publish your custom packages to the nuget feed or you can create you local nuget feed, then add the nuget feed path or local feed path to the package source:

Check this document for some more details.

Hope this helps.

Leo Liu
  • 71,098
  • 10
  • 114
  • 135
  • I checked my settings for the 1 bullet, checked. Location 2 bullet point i? I tried the 3 bullet with -reinstall. I received an error. Update-Package: Some NuGet packages are missing from the solution. The packages need to be restored in order to build the dependency graph. Restore the packages before performing any operations. I then do a restore option that errors out Error:Mircrosoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.0 is not found on my source Also has another section Unable to read data from transport connection: An existing connection was forcibly close by the remote host – Hoardling Jul 24 '19 at 13:30
  • @Hoardling, I have updated my answer, you can check if it help you. If not, let me know what have you try and result. – Leo Liu Jul 24 '19 at 14:02
0

I figured it out. I went to my original and did the Update-Package -reinstall. It came back with the Microsoft.CodeDom.Providers.DotNetCompiler.Platform.2.0.0 not there, but it added one, just not 2.0.0. Then I ran an uninstall of the Microsoft.CodeDom.Providers.DotNetCompiler removing it from my system. Then I posted my original up to AzureDev-ops. My clone came down, not all the references were messed up, some were still, but I did a rebuild and that cleared it up. Thank you to the responses, it pointed me in the right direction.

Hoardling
  • 103
  • 4