Open Regenhardt opened 4 years ago
Update: Sometimes my local nuget does funny things, so I tried it in the server (which runs perfectly): Same problem. No System.Configuration.ConfigurationManager
found in the /bin directory.
VS shows the package with a path to %USERPROFILE%\.nuget, but apparently doesn't copy it to output.
The .Adapter project uses PackageReference. The .Api and .Core projects use packages.config, not PackageReference.
Version Used: Visual Studio 2019 16.6.0 Steps to Reproduce:
Both Api and Adapter reference Core. Core has no dependencies. Api references Adapter and injects an Adapter.Service in startup. Api has a controller that calls Adapter.Service.Method().
System.Configuration.ConfigurationManager
into Adapter using NuGet.Adapter.Service.Method()
usesConfigurationManager.AppSettings["SomeSetting"]
. (Add SomeSetting to the Web.Config of the Api).Expected Behavior: Api should call Adapter and run
Adapter.Service.Method()
. Actual Behavior:System.Configuration.ConfigurationManager
isn't copied to the Api/bin directory. DI throws an exception aboutSystem.Configuration.ConfigurationManager
not being found while trying to instantiate Adapter.Service.