Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

Why does Visual Studio change app.config if a NuGet package is added?

$
0
0

After adding a deliberate NuGet package to a .NET Framework project (version 4.8 in my case) typically two types of files change: packages.config and csproj file.But sometimes also the app.config becomes changed and if there is no app.config file yet then Visual Studio adds one. See example here:

<?xml version="1.0" encoding="utf-8"?><configuration><runtime><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="Microsoft.Extensions.Configuration.Binder" publicKeyToken="adb9793829ddae60" culture="neutral" /><bindingRedirect oldVersion="0.0.0.0-7.0.0.4" newVersion="7.0.0.4" /></dependentAssembly></assemblyBinding></runtime></configuration>

Why is that? Why are package.json and csproj not enough? And do I have to deploy app.config to the production machine? Normally I would only deploy an app.config file if my application had the need for configuration options. If I don't want to 'pollute' the target system can I omit the generated app.config files or would I get runtime errors at some point?


Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>