No matter what I do my .net Project will always rebuild. I read this Article https://oz-code.com/blog/visual-studio-keeps-rebuilding-projects-no-good-reason/, and I found the CopyLocal problem in my Project.
I got this message: Project 'PROJECTNAME' is not up to date. CopyLocal reference 'D:\...PROJECTPATH...\bin\x64\Debug\System.Net.Http.dll' is missing from output location.
.
My System.Net.Http.dll is referenced like this (Don't ask me why Private is set twice):
Visual Studio itself shows me it is taken from the "Reference Assemblies":
And as I figured out, Assemblies taken from the "Reference Assemblies" are never copied to the output folder.
Now the problem, if I change the CopyLocal to false it works, but after any NuGet restore it will be set to True again. I assume this is caused by the fact that the HintPath is refereing to a NuGet package where CopyLocal should be set to True.
It only happens with "System.*" references. The Project is .net 4.8 and I'm using the latest VS2019.
Is there any way to prevent this, or did i miss something how I can fix this? This is happening in a quite big solution and it takes forever to build if everything is rebuilt all the time.
I tried ReSharper-Build, and that worked but if possible i would like to stick to the standard.
Thank you for any help.