Situation:
Problem:
assemblyList.Add(Load("netfx.force.conflicts, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51"));System.IO.FileNotFoundException: Could not load file or assembly 'netfx.force.conflicts, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.Workaround:
assemblyList.Add(Load("netfx.force.conflicts... is unnecessary~Repro:
HelloWorld.DevSiloHost wait 5s to start up, then start manually HelloWorld.DevClusterClient!referring #481 dotnet/sdk#1930
I don't know whether dotnet/project-system is a better place for this issue?
This is a reincarnation of dotnet/sdk#1522. Until that issue is reopened I leave this issue open.
You do not need to add that reference and it is not required at runtime. That dll is only needed at compile time since it is the one that will force some dll conflicts so that automatic binding redirects are generated on your app鈥檚 config file. Because this file is not needed at runtime, we have targets that will remove it specifically from your bin directory so you shouln鈥檛 add code that tries to load it. If you actually inspect this dll, you鈥檒l find that it has no code at all, just a few type forwards in order to get the conflicts at compile time.
@joperezr You are right! After adding this hack to .csproj, the generated .cs got ~50 references shorter, and the reference to netfx.force.conflicts.dll is disappeared. I will update the workaround in the issue. Thank you for the information!
Given that this is an issue with the sdk I will close this one for now. Feel free to reopen the sdk one since as you suggest, looks like the problem isn鈥檛 yet fixed
Most helpful comment
You do not need to add that reference and it is not required at runtime. That dll is only needed at compile time since it is the one that will force some dll conflicts so that automatic binding redirects are generated on your app鈥檚 config file. Because this file is not needed at runtime, we have targets that will remove it specifically from your bin directory so you shouln鈥檛 add code that tries to load it. If you actually inspect this dll, you鈥檒l find that it has no code at all, just a few type forwards in order to get the conflicts at compile time.