Redirect for Nuget Package DLL files

Redirect for Nuget Package DLL files

I would like to use the Nuget Package Microsoft.CodeAnalytics in the newest version

I would like to use the Nuget Package Microsoft.CodeAnalytics in the newest version

If I build the solution, there are issues regarding different versions of dlls that are part of the .NET framework

For example:

Zwischen "Reference:System.IO.FileSystem, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" und "Reference:System.IO.FileSystem" ist ein Konflikt aufgetreten. "Reference:System.IO.FileSystem wird ausgewählt, da AssemblyVersion "4.0.3.0" höher ist als "4.0.2.0". (Aufgaben-ID: 19)

The referenced assemblies can be found in downloaded Nuget packages that came with Microsoft.CodeAnalytics.

The dlls are not copied locally when building. If I deploy the application like this, the program throws exceptions because it cannot find the referenced assemblies.

The solution would be to make the dlls look for the newest version but I don't know how to do that.

In the app.config the redirect is written down.

<assemblyIdentity name="System.IO.FileSystem" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />

If I try to run the application like this, it still throws errors because it cannot find the .dll in version 4.0.2.0 when calling classes of the CodeAnalytics-package.

How do I get Visual Studio/msbuild to copy the files locally even if there are file versions higher in .NET Framework or how do I get the dll to look for the correct version of the other dll?

c-sharp visual-studio

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Level-up your C++ productivity using Visual Studio

Come learn how you can improve your efficiency even while working from home. We’ll take a look at online development environments, Live Share, and a host of other new productivity features and tips.

Install Visual Studio 2019 Community – Best IDE for C#

Here is a straightforward tutorial on how to install Visual Studio 2019 Community onto Windows 10. Visual Studio 2019 is probably the best IDE ever for C# devs.

Modern C++ development with Visual Studio

Join us for a demo packed session on the latest improvements in Visual Studio 2019, including new C++20 features, cross-platform CMake integration, and support for Visual Studio Codespaces.

C++ Development with Visual Studio Code

If you’re looking for a fast and lightweight open-source code editor, Visual Studio Code has you covered.

Pixel Color Bot in C#, Visual Studio, .NET and WPF

Create a Pixel Color Bot in C# Visual Studio by using the .NET framework and WPF. This C# tutorial guides you through the development process of creating a pixel bot.