I have run into VS always rebuilding projects before, but turning on detailed output usually told me right away why it was rebuilding. This time I get the output below and I can't figure out what is triggering the rebuild or what "Failed to resolve all items referenced by ..." really means or what I can do about it.
Does anybody know how to interpret this build output so I can stop this project from rebuilding all the time? There is more to the output, but I just copied the first 100 lines
Build started...
Failed to resolve all items referenced by 'SkyCourt.Tests.Infrastructure\SkyCourt.Tests.Infrastructure.csproj'. This message can typically be ignored. The issue may be resolved by fully restoring and building the solution. If the unresolved item is a project reference this can lead to an incomplete NuGet restore result and missing package references. To ensure that restore is able to find all projects verify that all projects are referenced correctly and exist on disk.
Failed to resolve all items referenced by 'WebJobMembershipTypesDaily\WebJobMembershipTypesDaily.csproj'. This message can typically be ignored. The issue may be resolved by fully restoring and building the solution. If the unresolved item is a project reference this can lead to an incomplete NuGet restore result and missing package references. To ensure that restore is able to find all projects verify that all projects are referenced correctly and exist on disk.
Failed to resolve all items referenced by 'SkyCourt.Tests.CourtBookingReports\SkyCourt.Tests.CourtBookingReports.csproj'. This message can typically be ignored. The issue may be resolved by fully restoring and building the solution. If the unresolved item is a project reference this can lead to an incomplete NuGet restore result and missing package references. To ensure that restore is able to find all projects verify that all projects are referenced correctly and exist on disk.
Failed to resolve all items referenced by 'SkyCourt\SkyCourt.csproj'. This message can typically be ignored. The issue may be resolved by fully restoring and building the solution. If the unresolved item is a project reference this can lead to an incomplete NuGet restore result and missing package references. To ensure that restore is able to find all projects verify that all projects are referenced correctly and exist on disk.
Failed to resolve all items referenced by 'SkyCourt.Tests.Models\SkyCourt.Tests.Models.csproj'. This message can typically be ignored. The issue may be resolved by fully restoring and building the solution. If the unresolved item is a project reference this can lead to an incomplete NuGet restore result and missing package references. To ensure that restore is able to find all projects verify that all projects are referenced correctly and exist on disk.
Failed to resolve all items referenced by 'SkyCourt.Tests.ClubService\SkyCourt.Tests.ClubService.csproj'. This message can typically be ignored. The issue may be resolved by fully restoring and building the solution. If the unresolved item is a project reference this can lead to an incomplete NuGet restore result and missing package references. To ensure that restore is able to find all projects verify that all projects are referenced correctly and exist on disk.
Failed to resolve all items referenced by 'SkyCourt.UI\SkyCourt.UI.csproj'. This message can typically be ignored. The issue may be resolved by fully restoring and building the solution. If the unresolved item is a project reference this can lead to an incomplete NuGet restore result and missing package references. To ensure that restore is able to find all projects verify that all projects are referenced correctly and exist on disk.
Failed to resolve all items referenced by 'SparkPost\SparkPost.csproj'. This message can typically be ignored. The issue may be resolved by fully restoring and building the solution. If the unresolved item is a project reference this can lead to an incomplete NuGet restore result and missing package references. To ensure that restore is able to find all projects verify that all projects are referenced correctly and exist on disk.
Failed to resolve all items referenced by 'SkyCourt.App.Automapper\SkyCourt.App.Automapper.csproj'. This message can typically be ignored. The issue may be resolved by fully restoring and building the solution. If the unresolved item is a project reference this can lead to an incomplete NuGet restore result and missing package references. To ensure that restore is able to find all projects verify that all projects are referenced correctly and exist on disk.
Failed to resolve all items referenced by 'SkyCourt.Tests.Api\SkyCourt.Tests.Api.csproj'. This message can typically be ignored. The issue may be resolved by fully restoring and building the solution. If the unresolved item is a project reference this can lead to an incomplete NuGet restore result and missing package references. To ensure that restore is able to find all projects verify that all projects are referenced correctly and exist on disk.
Failed to resolve all items referenced by 'SkyCourt.App.ViewModels\SkyCourt.App.ViewModels.csproj'. This message can typically be ignored. The issue may be resolved by fully restoring and building the solution. If the unresolved item is a project reference this can lead to an incomplete NuGet restore result and missing package references. To ensure that restore is able to find all projects verify that all projects are referenced correctly and exist on disk.
Failed to resolve all items referenced by 'SkyCourt.App.Api\SkyCourt.App.Api.csproj'. This message can typically be ignored. The issue may be resolved by fully restoring and building the solution. If the unresolved item is a project reference this can lead to an incomplete NuGet restore result and missing package references. To ensure that restore is able to find all projects verify that all projects are referenced correctly and exist on disk.
Failed to resolve all items referenced by 'SkyCourt.App.Utilities\SkyCourt.App.Utilities.csproj'. This message can typically be ignored. The issue may be resolved by fully restoring and building the solution. If the unresolved item is a project reference this can lead to an incomplete NuGet restore result and missing package references. To ensure that restore is able to find all projects verify that all projects are referenced correctly and exist on disk.
Failed to resolve all items referenced by 'SkyCourt.App.Models\SkyCourt.App.Models.csproj'. This message can typically be ignored. The issue may be resolved by fully restoring and building the solution. If the unresolved item is a project reference this can lead to an incomplete NuGet restore result and missing package references. To ensure that restore is able to find all projects verify that all projects are referenced correctly and exist on disk.
Failed to resolve all items referenced by 'SkyCourt.Tests.InterCityLeagues\SkyCourt.Tests.InterCityLeagues.csproj'. This message can typically be ignored. The issue may be resolved by fully restoring and building the solution. If the unresolved item is a project reference this can lead to an incomplete NuGet restore result and missing package references. To ensure that restore is able to find all projects verify that all projects are referenced correctly and exist on disk.
Failed to resolve all items referenced by 'SkyCourt.Tests.ClassLibraries\SkyCourt.Tests.ClassLibraries.csproj'. This message can typically be ignored. The issue may be resolved by fully restoring and building the solution. If the unresolved item is a project reference this can lead to an incomplete NuGet restore result and missing package references. To ensure that restore is able to find all projects verify that all projects are referenced correctly and exist on disk.
Failed to resolve all items referenced by 'SkyCourt.Tests.Helpers.Signalr\SkyCourt.Tests.Helpers.Signalr.csproj'. This message can typically be ignored. The issue may be resolved by fully restoring and building the solution. If the unresolved item is a project reference this can lead to an incomplete NuGet restore result and missing package references. To ensure that restore is able to find all projects verify that all projects are referenced correctly and exist on disk.
Failed to resolve all items referenced by 'SkyCourt.Tests.Helpers.Stripe\SkyCourt.Tests.Helpers.Stripe.csproj'. This message can typically be ignored. The issue may be resolved by fully restoring and building the solution. If the unresolved item is a project reference this can lead to an incomplete NuGet restore result and missing package references. To ensure that restore is able to find all projects verify that all projects are referenced correctly and exist on disk.
Failed to resolve all items referenced by 'SkyCourt.Infrastructure\SkyCourt.Infrastructure.csproj'. This message can typically be ignored. The issue may be resolved by fully restoring and building the solution. If the unresolved item is a project reference this can lead to an incomplete NuGet restore result and missing package references. To ensure that restore is able to find all projects verify that all projects are referenced correctly and exist on disk.
Failed to resolve all items referenced by 'SkyCourt.Tests.ClubTeamLeagues\SkyCourt.Tests.ClubTeamLeagues.csproj'. This message can typically be ignored. The issue may be resolved by fully restoring and building the solution. If the unresolved item is a project reference this can lead to an incomplete NuGet restore result and missing package references. To ensure that restore is able to find all projects verify that all projects are referenced correctly and exist on disk.
Failed to resolve all items referenced by 'Resources\CommonResources.csproj'. This message can typically be ignored. The issue may be resolved by fully restoring and building the solution. If the unresolved item is a project reference this can lead to an incomplete NuGet restore result and missing package references. To ensure that restore is able to find all projects verify that all projects are referenced correctly and exist on disk.
Failed to resolve all items referenced by 'SkyCourt.Tests.App\SkyCourt.Tests.App.csproj'. This message can typically be ignored. The issue may be resolved by fully restoring and building the solution. If the unresolved item is a project reference this can lead to an incomplete NuGet restore result and missing package references. To ensure that restore is able to find all projects verify that all projects are referenced correctly and exist on disk.
1>------ Build started: Project: SkyCourt.Infrastructure, Configuration: Debug Any CPU ------
1>Search paths being used for $(MSBuildExtensionsPath) are C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild;$(MSBuildProgramFiles32)\MSBuild
1>Trying to import C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\$(MSBuildToolsVersion)\Microsoft.Common.props using extensions path C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild
1>Property reassignment: $(MSBuildProjectExtensionsPath)="C:\Users\gregv\source\repos\SquashSpider\SquashSpider\SkyCourt.Infrastructure\obj\" (previous value: "obj\") at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Microsoft.Common.props (56,5)
1>Search paths being used for $(MSBuildExtensionsPath) are C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild;$(MSBuildProgramFiles32)\MSBuild
1>Trying to import C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\$(MSBuildToolsVersion)\Imports\Microsoft.Common.props\ImportBefore\* using extensions path C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild
1>Search paths being used for $(MSBuildExtensionsPath) are C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild;$(MSBuildProgramFiles32)\MSBuild
1>The "Configuration" property is a global property, and cannot be modified.
1>The "Platform" property is a global property, and cannot be modified.
1>Search paths being used for $(MSBuildExtensionsPath) are C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild;$(MSBuildProgramFiles32)\MSBuild
1>Search paths being used for $(MSBuildExtensionsPath) are C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild;$(MSBuildProgramFiles32)\MSBuild
1>The "Configuration" property is a global property, and cannot be modified.
1>The "Platform" property is a global property, and cannot be modified.
1>Search paths being used for $(MSBuildExtensionsPath) are C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild;$(MSBuildProgramFiles32)\MSBuild
1>Property reassignment: $(DefineCommonItemSchemas)="false" (previous value: "true") at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VisualStudio\Managed\Microsoft.Managed.DesignTime.targets (12,5)
1>Property reassignment: $(DefineCommonCapabilities)="false" (previous value: "true") at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VisualStudio\Managed\Microsoft.Managed.DesignTime.targets (13,5)
1>Property reassignment: $(DefineCommonReferenceSchemas)="false" (previous value: "true") at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VisualStudio\Managed\Microsoft.Managed.DesignTime.targets (14,5)
1>Search paths being used for $(MSBuildExtensionsPath) are C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild;$(MSBuildProgramFiles32)\MSBuild
1>Search paths being used for $(MSBuildExtensionsPath) are C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild;$(MSBuildProgramFiles32)\MSBuild
1>Search paths being used for $(MSBuildExtensionsPath) are C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild;$(MSBuildProgramFiles32)\MSBuild
1>Search paths being used for $(MSBuildExtensionsPath) are C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild;$(MSBuildProgramFiles32)\MSBuild
1>The "Configuration" property is a global property, and cannot be modified.
1>The "Platform" property is a global property, and cannot be modified.
1>Property reassignment: $(_DebugSymbolsProduced)="true" (previous value: "false") at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets (150,5)
1>Property reassignment: $(_DocumentationFileProduced)="false" (previous value: "true") at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets (159,5)
1>The "DevEnvDir" property is a global property, and cannot be modified.
1>The "SolutionName" property is a global property, and cannot be modified.
1>The "SolutionFileName" property is a global property, and cannot be modified.
1>The "SolutionPath" property is a global property, and cannot be modified.
1>The "SolutionDir" property is a global property, and cannot be modified.
1>The "SolutionExt" property is a global property, and cannot be modified.
1>Property reassignment: $(ProcessorArchitecture)="msil" (previous value: "") at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets (490,5)
1>Property reassignment: $(DelaySign)="" (previous value: "false") at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets (530,5)
1>Property reassignment: $(_SGenGenerateSerializationAssembliesConfig)="Auto" (previous value: "") at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets (3530,5)
1>Property reassignment: $(_SGenGenerateSerializationAssembliesConfig)="Off" (previous value: "Auto") at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets (3531,5)
1>Property reassignment: $(_CodeAnalysisTreatWarningsAsErrors)="false" (previous value: "") at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VisualStudio\v16.0\CodeAnalysis\Microsoft.CodeAnalysis.targets (125,5)
1>Property reassignment: $(PrepareForRunDependsOn)="
1> CopyFilesToOutputDirectory
1> ;RunCodeAnalysis" (previous value: "
1> CopyFilesToOutputDirectory
1> ") at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VisualStudio\v16.0\CodeAnalysis\Microsoft.CodeAnalysis.targets (167,9)
1>Search paths being used for $(MSBuildExtensionsPath) are C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild;$(MSBuildProgramFiles32)\MSBuild
1>Property reassignment: $(ResolveReferencesDependsOn)="
1>
1> BeforeResolveReferences;
1> AssignProjectConfiguration;
1> ResolveProjectReferences;
1> FindInvalidProjectReferences;
1> ResolveNativeReferences;
1> ResolveAssemblyReferences;
1> GenerateBindingRedirects;
1> ResolveComReferences;
1> AfterResolveReferences
1> ;
1> ImplicitlyExpandDesignTimeFacades
1> " (previous value: "
1> BeforeResolveReferences;
1> AssignProjectConfiguration;
1> ResolveProjectReferences;
1> FindInvalidProjectReferences;
1> ResolveNativeReferences;
1> ResolveAssemblyReferences;
1> GenerateBindingRedirects;
1> ResolveComReferences;
1> AfterResolveReferences
1> ") at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.NETFramework.CurrentVersion.targets (75,5)
1>Property reassignment: $(PrepareResourceNamesDependsOn)="
1> AssignWinFXEmbeddedResource;
1>
1> AssignTargetPaths;
1> SplitResourcesByCulture;
1> CreateManifestResourceNames;
1> CreateCustomManifestResourceNames
1>
1> " (previous value: "
1> AssignTargetPaths;
1> SplitResourcesByCulture;
1> CreateManifestResourceNames;
1> CreateCustomManifestResourceNames
1> ") at C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFx.targets (97,7)
Update
After following the advice of Perry to do an update-package -reinstall and to turn on diagnostic output (I thought I had), I can see that the real reason that the project is rebuild is this:
1>Project 'SkyCourt.Tests.Helpers.MVC' is not up to date. CopyLocal reference 'C:\Users\gregv\source\repos\SquashSpider\SquashSpider\SkyCourt.Tests.Helpers.MVC\bin\Debug\System.Security.Cryptography.Algorithms.dll' is missing from output location.
The strange thing is that System.Security.Cryptography.Algorithms is installed for this project. And on the references, the CopyLocal flag is true.
Where is this dll supposed to live on my disk and where is it supposed to be copied to?
It seems that I need this package because System.Net.Http required it and pulled it in.
Final Update
I believe this constant rebuilding started because in one of my projects, the compiler suggested that I needed to add System.Net.Http in order to satisfy the reference to HTTP context. However, that is the wrong thing to do and leads to one of these cases of DLLs not being copied to the output directory. Instead, I should have added a reference to Microsoft.AspNet.WebApi. When I did that, it solved that issue. Here is a reference to the SO answer that helped me find that.
Then a number of other projects had references to System.Data (that I could just remove from the NuGet Package Manager) and some other System.* components that were actually provided by mscor.lib or something like that. It was a very tedious process of building over and over again with Diagnostic output enabled to see which dlls were missing and then figuring out what to do with each one. The diagnostic output causes the build to be at least 5x slower.
And one last thing, if you find that these Dlls are not found during run time, it might be due to this. You need to remove any binding redirects that you might have in app.config for the dlls on the list in that GitHub issue. Those dlls are now part of .Net and don't ship as separate dlls anymore.