none
MS Build Extensions file corrupt my bin (Web API) folder

    Question

  • For some .NET standard 1.6 reasons, MSBuild (within Visual STudio 2017 15.3.4 and 15.3.3) copies OLD dlls from this path

    C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib

    to my bin folder.

    my Azure Project, includes the .NET 1.61 standard package as a dependency. MSBuild now INCORRECTLY overwrites the Dll's that are newer from Nuget (e.g. System.Runtime.Serialization.Xml, System.Runtime.Serialization.Xml). And this creates a DLL HELL (again? Come on Microsoft!)

    My libraries are compiled using .NET 4.7.

    How to fix this besides removing the .NET 1.61 standard?? (note: Many Azure library files already depend on this package)




    Thursday, September 14, 2017 7:53 AM

All replies

  • Hi Egbert Nierop,

    Thanks for posting here.

    >>>MSBuild (within Visual STudio 2017 15.3.4 and 15.3.3) copies OLD dlls from this path

    Do you use any MSBuild target or Build events to complete this copy task? If yes, what is the detail target or build event? If not, how did you complete this copy task?


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, September 14, 2017 12:07 PM
  • Hi Leo-Liu

    Thanks for replying.

    I suspect that MS Build detects .NET framework 4.7 and .NetStandard 1.1 'compatibility' mode, and it merges some old DLLS 

    So when I make for instance System.Diagnostics.StackTrace.dll readonly, I get the following error.

    Severity Code Description Project File Line Suppression State
    Error  Unable to copy file "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\lib\System.Diagnostics.StackTrace.dll" to "bin\System.Diagnostics.StackTrace.dll". Access to the path 'bin\System.Diagnostics.StackTrace.dll' is denied. Dynasource.BackofficeAPI   

    while NUget for instance, gets System.Net.Http package 4.3.3 (assembly version 4.1.1.0) and MSBuild *copies* an old System.Net.Http.Dll version. 

    It seems to be related to this file:

    C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.NETFramework.targets

    The whole solution is using .NET 4.7, though MSBuild decides to copy the contents of the net461 folder. 

      <PropertyGroup>
        <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
        <!-- Add NETStandard references if targetframeworkversion supports netstandard2.0 (net461 or later) -->
        <ImplicitlyExpandNETStandardFacades Condition="'$(ImplicitlyExpandNETStandardFacades)' == '' AND '$(_TargetFrameworkVersionWithoutV)' &gt;= '4.6.1'">false</ImplicitlyExpandNETStandardFacades>
      </PropertyGroup>

    When I set this to 'false' (as above) the problem is gone, but now assembly redirect are invalid but in a different way, e.g. System.Diagnostic.Tools is 4.0.1.0 but it won't be copied anymore.

    *in short* do you have a solution/workaround for this merging mess between netstandard 1.1.x and .net 4.61 and higher?







    Thursday, September 14, 2017 1:07 PM
  • @Egbert Nierop, thanks for you reply. I`m sorry I could not understand the structure of your solution clear, so could you please share me some detail steps how to reproduce this issue or a sample which can reproduce it. Thanks.

    MSDN Community Support Please remember to click &quot;Mark as Answer&quot; the responses that resolved your issue, and to click &quot;Unmark as Answer&quot; if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, September 18, 2017 8:45 AM
  • Hi Leo-Liu

    The idea is this, create a web api project, using .Net Framework 4.7

    Add these packages.

    Now, you will see, as a result, that Visual Studio 2017 will have many references with 'conflicting' icons. (Yellow). If you start debugging the solution say, GET http://localhost:55444/odata/constants

    you *will see* many DLL reference errors. Why, because MSBuild detects that you have a .NetStandard dependency. MSBuild will -blend- dlls from this path below, and this corrupts my solution. :(

    C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib

    <?xml version="1.0" encoding="utf-8"?>
    <packages>
      <package id="Microsoft.ApplicationInsights" version="2.4.0" targetFramework="net462" />
      <package id="Microsoft.ApplicationInsights.Agent.Intercept" version="2.4.0" targetFramework="net462" />
      <package id="Microsoft.ApplicationInsights.DependencyCollector" version="2.4.1" targetFramework="net462" />
      <package id="Microsoft.ApplicationInsights.PerfCounterCollector" version="2.4.1" targetFramework="net462" />
      <package id="Microsoft.ApplicationInsights.TraceListener" version="2.4.1" targetFramework="net462" />
      <package id="Microsoft.ApplicationInsights.Web" version="2.4.1" targetFramework="net462" />
      <package id="Microsoft.ApplicationInsights.WindowsServer" version="2.4.1" targetFramework="net462" />
      <package id="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel" version="2.4.0" targetFramework="net462" />
      <package id="Microsoft.AspNet.OData" version="6.1.0" targetFramework="net47" />
      <package id="Microsoft.AspNet.TelemetryCorrelation" version="1.0.0" targetFramework="net462" />
      <package id="Microsoft.AspNet.WebApi" version="5.2.3" targetFramework="net462" />
      <package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net462" />
      <package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net462" />
      <package id="Microsoft.AspNet.WebApi.Owin" version="5.2.3" targetFramework="net462" />
      <package id="Microsoft.AspNet.WebApi.OwinSelfHost" version="5.2.3" targetFramework="net462" />
      <package id="Microsoft.AspNet.WebApi.WebHost" version="5.2.3" targetFramework="net462" />
      <package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="1.0.7" targetFramework="net462" />
      <package id="Microsoft.Extensions.DependencyInjection" version="1.1.1" targetFramework="net462" />
      <package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="1.1.1" targetFramework="net462" />
      <package id="Microsoft.Net.Compilers" version="2.3.2" targetFramework="net462" developmentDependency="true" />
      <package id="Microsoft.NETCore.Platforms" version="1.1.0" targetFramework="net47" />
      <package id="Microsoft.OData.Core" version="7.3.1" targetFramework="net462" />
      <package id="Microsoft.OData.Edm" version="7.3.1" targetFramework="net462" />
      <package id="Microsoft.Owin" version="3.1.0" targetFramework="net462" />
      <package id="Microsoft.Owin.Host.HttpListener" version="3.1.0" targetFramework="net462" />
      <package id="Microsoft.Owin.Host.SystemWeb" version="3.1.0" targetFramework="net462" />
      <package id="Microsoft.Owin.Hosting" version="3.1.0" targetFramework="net462" />
      <package id="Microsoft.Spatial" version="7.3.1" targetFramework="net462" />
      <package id="Microsoft.Win32.Primitives" version="4.3.0" targetFramework="net462" />
      <package id="NETStandard.Library" version="1.6.1" targetFramework="net47" />
      <package id="Newtonsoft.Json" version="10.0.3" targetFramework="net462" />
      <package id="Owin" version="1.0" targetFramework="net462" />
      <package id="System.AppContext" version="4.3.0" targetFramework="net462" requireReinstallation="true" />
      <package id="System.Collections" version="4.3.0" targetFramework="net462" />
      <package id="System.Collections.Concurrent" version="4.3.0" targetFramework="net462" />
      <package id="System.ComponentModel" version="4.3.0" targetFramework="net462" />
      <package id="System.Console" version="4.3.0" targetFramework="net462" />
      <package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="net462" />
      <package id="System.Diagnostics.DiagnosticSource" version="4.4.1" targetFramework="net462" />
      <package id="System.Diagnostics.StackTrace" version="4.3.0" targetFramework="net47" />
      <package id="System.Diagnostics.Tools" version="4.3.0" targetFramework="net462" />
      <package id="System.Diagnostics.Tracing" version="4.3.0" targetFramework="net47" />
      <package id="System.Globalization" version="4.3.0" targetFramework="net462" />
      <package id="System.Globalization.Calendars" version="4.3.0" targetFramework="net462" />
      <package id="System.Globalization.Extensions" version="4.3.0" targetFramework="net462" />
      <package id="System.IO" version="4.3.0" targetFramework="net47" />
      <package id="System.IO.Compression" version="4.3.0" targetFramework="net462" />
      <package id="System.IO.Compression.ZipFile" version="4.3.0" targetFramework="net47" />
      <package id="System.IO.FileSystem" version="4.3.0" targetFramework="net462" />
      <package id="System.IO.FileSystem.Primitives" version="4.3.0" targetFramework="net462" />
      <package id="System.Linq" version="4.3.0" targetFramework="net462" requireReinstallation="true" />
      <package id="System.Linq.Expressions" version="4.3.0" targetFramework="net462" requireReinstallation="true" />
      <package id="System.Net.Http" version="4.3.2" targetFramework="net462" />
      <package id="System.Net.Primitives" version="4.3.0" targetFramework="net462" />
      <package id="System.Net.Sockets" version="4.3.0" targetFramework="net462" />
      <package id="System.ObjectModel" version="4.3.0" targetFramework="net462" />
      <package id="System.Reflection" version="4.3.0" targetFramework="net462" />
      <package id="System.Reflection.Extensions" version="4.3.0" targetFramework="net462" />
      <package id="System.Reflection.Primitives" version="4.3.0" targetFramework="net462" />
      <package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="net462" />
      <package id="System.Runtime" version="4.3.0" targetFramework="net47" />
      <package id="System.Runtime.Extensions" version="4.3.0" targetFramework="net47" />
      <package id="System.Runtime.Handles" version="4.3.0" targetFramework="net462" />
      <package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="net47" />
      <package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net462" />
      <package id="System.Runtime.Numerics" version="4.3.0" targetFramework="net462" />
      <package id="System.Runtime.Serialization.Primitives" version="4.3.0" targetFramework="net47" />
      <package id="System.Runtime.Serialization.Xml" version="4.3.0" targetFramework="net462" />
      <package id="System.Security.Cryptography.Algorithms" version="4.3.0" targetFramework="net462" requireReinstallation="true" />
      <package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net462" />
      <package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net462" />
      <package id="System.Security.Cryptography.X509Certificates" version="4.3.0" targetFramework="net462" />
      <package id="System.Security.SecureString" version="4.3.0" targetFramework="net462" />
      <package id="System.Text.Encoding" version="4.3.0" targetFramework="net462" />
      <package id="System.Text.Encoding.Extensions" version="4.3.0" targetFramework="net462" />
      <package id="System.Text.RegularExpressions" version="4.3.0" targetFramework="net462" requireReinstallation="true" />
      <package id="System.Threading" version="4.3.0" targetFramework="net462" />
      <package id="System.Threading.Overlapped" version="4.3.0" targetFramework="net462" />
      <package id="System.Threading.Tasks" version="4.3.0" targetFramework="net462" />
      <package id="System.Threading.Timer" version="4.3.0" targetFramework="net462" />
      <package id="System.ValueTuple" version="4.4.0" targetFramework="net462" />
      <package id="System.Xml.ReaderWriter" version="4.3.0" targetFramework="net462" />
      <package id="System.Xml.XDocument" version="4.3.0" targetFramework="net462" />
      <package id="System.Xml.XPath" version="4.3.0" targetFramework="net462" />
      <package id="System.Xml.XPath.XDocument" version="4.3.0" targetFramework="net462" />
    </packages>


    Wednesday, September 20, 2017 7:48 AM
  • Maybe this makes the issue clear. This shows the reason behind the corruption. MSBuild merges these dlls into my project to force .net standard compliance. However, this conflicts with the actual nuget versions. Letting Visual STudio 'fix' the version numbers, does not solve the situation.

      Consider app.config remapping of assembly "System.Runtime.Serialization.Xml, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.1.2.0" [] to Version "4.1.3.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Runtime.Serialization.Xml.dll] to solve conflict and get rid of warning.
      Consider app.config remapping of assembly "System.Data.Common, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "0.0.0.0" [] to Version "4.2.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Data.Common.dll] to solve conflict and get rid of warning.
      Consider app.config remapping of assembly "System.Threading.Overlapped, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.2.0" [] to Version "4.1.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Threading.Overlapped.dll] to solve conflict and get rid of warning.
      Consider app.config remapping of assembly "System.Runtime.Serialization.Primitives, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.1.2.0" [C:\Data\Git\Repos\jasper\Dynasource.Data\bin\Backoffice.Debug\System.Runtime.Serialization.Primitives.dll] to Version "4.2.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Runtime.Serialization.Primitives.dll] to solve conflict and get rid of warning.
      Consider app.config remapping of assembly "System.Linq.Expressions, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.1.1.0" [C:\Data\Git\Repos\jasper\Dynasource.BackofficeAPI\bin\System.Linq.Expressions.dll] to Version "4.1.2.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Linq.Expressions.dll] to solve conflict and get rid of warning.
      Consider app.config remapping of assembly "System.Xml.XPath.XDocument, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.2.0" [] to Version "4.1.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Xml.XPath.XDocument.dll] to solve conflict and get rid of warning.
      Consider app.config remapping of assembly "System.Globalization.Extensions, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.2.0" [] to Version "4.1.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Globalization.Extensions.dll] to solve conflict and get rid of warning.
      Consider app.config remapping of assembly "System.Net.Http, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.1.1.1" [[path]\Backoffice.Debug\System.Net.Http.dll] to Version "4.2.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Net.Http.dll] to solve conflict and get rid of warning.
      Consider app.config remapping of assembly "System.Diagnostics.StackTrace, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.3.0" [] to Version "4.1.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Diagnostics.StackTrace.dll] to solve conflict and get rid of warning.
      Consider app.config remapping of assembly "System.Security.Cryptography.Algorithms, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.2.1.0" [[path].BackofficeAPI\bin\System.Security.Cryptography.Algorithms.dll] to Version "4.3.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net47\ref\System.Security.Cryptography.Algorithms.dll] to solve conflict and get rid of warning.
      Consider app.config remapping of assembly "System.Linq, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.1.1.0" [[path].BackofficeAPI\bin\System.Linq.dll] to Version "4.1.2.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Linq.dll] to solve conflict and get rid of warning.
      Consider app.config remapping of assembly "System.Diagnostics.Tracing, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.1.1.0" [[path].BackofficeAPI\bin\System.Diagnostics.Tracing.dll] to Version "4.2.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Diagnostics.Tracing.dll] to solve conflict and get rid of warning.
      Consider app.config remapping of assembly "System.Collections.Concurrent, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.10.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7\Facades\System.Collections.Concurrent.dll] to Version "4.0.11.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Collections.Concurrent.dll] to solve conflict and get rid of warning.
      Consider app.config remapping of assembly "System.ComponentModel.EventBasedAsync, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.10.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7\Facades\System.ComponentModel.EventBasedAsync.dll] to Version "4.0.11.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.ComponentModel.EventBasedAsync.dll] to solve conflict and get rid of warning.
      Consider app.config remapping of assembly "System.Runtime.InteropServices, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.1.1.0" [[path].BackofficeAPI\bin\System.Runtime.InteropServices.dll] to Version "4.1.2.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Runtime.InteropServices.dll] to solve conflict and get rid of warning.
      Consider app.config remapping of assembly "System.IO.Compression, Culture=neutral, PublicKeyToken=b77a5c561934e089" from Version "4.1.2.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\System.IO.Compression.dll] to Version "4.2.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.IO.Compression.dll] to solve conflict and get rid of warning.
      Consider app.config remapping of assembly "System.Runtime, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.1.1.0" [[path].BackofficeAPI\bin\System.Runtime.dll] to Version "4.1.2.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Runtime.dll] to solve conflict and get rid of warning.
      Consider app.config remapping of assembly "System.Diagnostics.Debug, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.10.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7\Facades\System.Diagnostics.Debug.dll] to Version "4.0.11.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Diagnostics.Debug.dll] to solve conflict and get rid of warning.
      Consider app.config remapping of assembly "System.IO, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.1.1.0" [[path].BackofficeAPI\bin\System.IO.dll] to Version "4.1.2.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.IO.dll] to solve conflict and get rid of warning.
      Consider app.config remapping of assembly "System.Runtime.Extensions, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.1.1.0" [[path].BackofficeAPI\bin\System.Runtime.Extensions.dll] to Version "4.1.2.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Runtime.Extensions.dll] to solve conflict and get rid of warning.
      Consider app.config remapping of assembly "System.Collections, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.10.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7\Facades\System.Collections.dll] to Version "4.0.11.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Collections.dll] to solve conflict and get rid of warning.
      Consider app.config remapping of assembly "System.Net.Sockets, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.1.1.0" [[path].BackofficeAPI\bin\System.Net.Sockets.dll] to Version "4.2.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Net.Sockets.dll] to solve conflict and get rid of warning.
      Consider app.config remapping of assembly "System.Reflection, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.1.1.0" [[path].BackofficeAPI\bin\System.Reflection.dll] to Version "4.1.2.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Reflection.dll] to solve conflict and get rid of warning.
      Consider app.config remapping of assembly "System.Runtime.InteropServices.RuntimeInformation, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.1.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\System.Runtime.InteropServices.RuntimeInformation.dll] to Version "4.0.2.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net47\ref\System.Runtime.InteropServices.RuntimeInformation.dll] to solve conflict and get rid of warning.
      Consider app.config remapping of assembly "System.Xml.ReaderWriter, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.1.0.0" [[path].BackofficeAPI\bin\System.Xml.ReaderWriter.dll] to Version "4.1.1.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Xml.ReaderWriter.dll] to solve conflict and get rid of warning.
      Consider app.config remapping of assembly "System.Security.SecureString, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.1.0" [] to Version "4.1.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Security.SecureString.dll] to solve conflict and get rid of warning.
      Consider app.config remapping of assembly "System.Text.RegularExpressions, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.1.0.0" [[path].BackofficeAPI\bin\System.Text.RegularExpressions.dll] to Version "4.1.1.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Text.RegularExpressions.dll] to solve conflict and get rid of warning.
      Consider app.config remapping of assembly "System.Text.Encoding, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.10.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7\Facades\System.Text.Encoding.dll] to Version "4.0.11.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Text.Encoding.dll] to solve conflict and get rid of warning.
      Consider app.config remapping of assembly "System.Text.Encoding.Extensions, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.10.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7\Facades\System.Text.Encoding.Extensions.dll] to Version "4.0.11.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\net461\ref\System.Text.Encoding.Extensions.dll] to solve conflict and get rid of warning.
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(1987,5): warning MSB3247: Found conflicts between different versions of the same dependent assembly. In Visual Studio, double-click this warning (or select it and press Enter) to fix the conflicts; otherwise, add the following binding redirects to the "runtime" node in the application configuration file: <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Runtime.Serialization.Xml" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.1.3.0" newVersion="4.1.3.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Data.Common" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Threading.Overlapped" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Runtime.Serialization.Primitives" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Linq.Expressions" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Xml.XPath.XDocument" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Globalization.Extensions" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Net.Http" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Diagnostics.StackTrace" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Security.Cryptography.Algorithms" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Linq" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Diagnostics.Tracing" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Collections.Concurrent" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.0.11.0" newVersion="4.0.11.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.ComponentModel.EventBasedAsync" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.0.11.0" newVersion="4.0.11.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Runtime.InteropServices" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.IO.Compression" culture="neutral" publicKeyToken="b77a5c561934e089" /><bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Runtime" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Diagnostics.Debug" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.0.11.0" newVersion="4.0.11.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.IO" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Runtime.Extensions" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Collections" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.0.11.0" newVersion="4.0.11.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Net.Sockets" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Reflection" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Runtime.InteropServices.RuntimeInformation" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Xml.ReaderWriter" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Security.SecureString" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Text.RegularExpressions" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Text.Encoding" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.0.11.0" newVersion="4.0.11.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Text.Encoding.Extensions" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.0.11.0" newVersion="4.0.11.0" /></dependentAssembly></assemblyBinding>

    Thursday, September 21, 2017 9:17 AM
  • Hi Egbert Nierop,

    I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.

    Thanks for your understanding!


    MSDN Community Support Please remember to click &quot;Mark as Answer&quot; the responses that resolved your issue, and to click &quot;Unmark as Answer&quot; if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, September 22, 2017 9:58 AM
  • Just to mention it here too like on https://github.com/Microsoft/msbuild/issues/2527 . I'm also having that issue for MVC + Web API project that uses 4.6.2 and some libraries that depends on System.Runtime. And MSBuild replaces NuGet System.Runtime assembly with from Build.Extensions folder like was mentioned in the first step
    Sunday, September 24, 2017 8:43 PM
  • I'm having the exact same issues. Is there any progress since September?
    Thursday, December 28, 2017 12:14 PM
  • Same for me.
    Wednesday, March 14, 2018 8:47 PM
  • This has happened to me as well. Been migrating a bunch of projects from Framework 4.5.1 to 4.6.1.
    Most of them successfully except 2.
    These 2 projects were created as "Azure webjobs".

    Any news of how to fix it?


    JaimePR,

    Friday, March 16, 2018 3:59 PM