Autofac.Extras.CommonServiceLocator supports netstandard 2.0. According to the docs on netstandard netstandard 2.0 and Universal Windows 10.0.16299 are compatible. This is why it works fine in VS.
If NuGet restore is not seeing these things as compatible, that's usually a problem with the NuGet command line version being used. Sometimes it also has to do with a NuGet.config file incorrectly being in the same folder as NuGet.exe and directing NuGet to use a different set of feeds than VS is using.
All of this adds up to a tooling problem, which, without a repro and logs, is very hard to troubleshoot. As I mentioned in my comments, more info is needed.
If Autofac.Extras.CommonServiceLocator switched to use CommonServiceLocator 2.0.3 it might enable targeting a lower netstandard, but that likely won't solve your problem - it's already compatible, as you've seen in VS.
I would recommend:
- Make sure you have the latest NuGet.exe
- Make sure you don't have NuGet.config in the same folder as NuGet.exe.
- Remove all build artifacts and user files (like the .vs folder, bin and obj folders).
- Clean out your temp files.
- Clear your NuGet cache -
nuget locals clear -all
Then try again.
I'm sorry there's not much more I can offer. Like you said, it works in one spot, not in another. That's a tooling and environment problem, which, without a repro or specific set of repro steps that work on other machines, is really hard to solve.
nuget restore
where the error is? Have you ensured your nuget.exe is the latest? – Travis Illig