Search code examples
visual-studio-2017

visual studio 2017 community build fail without showing any error


this is a project I open and edit everyday recently

One day I can still compile, build, publish the project before i go lunch,

after i came back, its build fail and show error box build fail (There were build errors,would you like to continue and run the last successful build), but there is no error shown ( i didn't change anything except some string, and it is local project thus only me can edit it)

there is warning message but i dont know if it matter at all

Severity    Code    Description Project File    Line    Suppression State
Warning     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:

I wonder how can a solution die by itself suddenly and how can I trace and recover this solution (as mentioned, i was working on this project just before lunch)

Output

2>------ Rebuild All started: Project: Iing.WebApp, Configuration: Debug Any CPU ------
2>Build started 4/12/2019 3:54:53 PM.
2>CoreClean:
2>  Deleting file "C:\Users\sammak\Documents\Projects\MODIST2017 - Copy\Iing.WebApp\obj\Debug\Iing.WebApp.csprojAssemblyReference.cache".
2>  Deleting file "C:\Users\sammak\Documents\Projects\MODIST2017 - Copy\Iing.WebApp\obj\Debug\RdlCompile.cache".
2>_HandlePackageFileConflicts:
2>D:\VS2017\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.ConflictResolution.targets(33,5): message NETSDK1041: Encountered conflict between 'Reference:System.IO, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL' and 'Platform:System.IO.dll'.  NETSDK1033: Choosing 'Platform:System.IO.dll' because AssemblyVersion '4.1.2.0' is greater than '4.1.1.0'.
2>D:\VS2017\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.ConflictResolution.targets(33,5): message NETSDK1041: Encountered conflict between 'Reference:System.Runtime, Version=4.1.1.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL' and 'Platform:System.Runtime.dll'.  NETSDK1033: Choosing 'Platform:System.Runtime.dll' because AssemblyVersion '4.1.2.0' is greater than '4.1.1.1'.
2>D:\VS2017\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.ConflictResolution.targets(33,5): message NETSDK1041: Encountered conflict between 'Reference:System.Security.Cryptography.Algorithms, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL' and 'Platform:System.Security.Cryptography.Algorithms.dll'.  NETSDK1033: Choosing 'Platform:System.Security.Cryptography.Algorithms.dll' because AssemblyVersion '4.3.0.0' is greater than '4.2.1.0'.
2>D:\VS2017\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.ConflictResolution.targets(33,5): message NETSDK1041: Encountered conflict between 'Reference:System.Security.Cryptography.Encoding, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL' and 'Platform:System.Security.Cryptography.Encoding.dll'.  NETSDK1033: Choosing 'Platform:System.Security.Cryptography.Encoding.dll' because AssemblyVersion '4.0.2.0' is greater than '4.0.1.0'.
2>D:\VS2017\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.ConflictResolution.targets(33,5): message NETSDK1041: Encountered conflict between 'Reference:System.Security.Cryptography.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL' and 'Platform:System.Security.Cryptography.Primitives.dll'.  NETSDK1033: Choosing 'Platform:System.Security.Cryptography.Primitives.dll' because AssemblyVersion '4.0.2.0' is greater than '4.0.1.0'.
2>D:\VS2017\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.ConflictResolution.targets(33,5): message NETSDK1041: Encountered conflict between 'Reference:System.Security.Cryptography.X509Certificates, Version=4.1.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL' and 'Platform:System.Security.Cryptography.X509Certificates.dll'.  NETSDK1033: Choosing 'Platform:System.Security.Cryptography.X509Certificates.dll' because AssemblyVersion '4.1.2.0' is greater than '4.1.1.2'.
2>D:\VS2017\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.ConflictResolution.targets(33,5): message NETSDK1041: Encountered conflict between 'Reference:System.Net.Http.WebRequest, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL' and 'Platform:System.Net.Http.WebRequest.dll'.  NETSDK1038: Could not determine winner because 'Reference:System.Net.Http.WebRequest, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL' does not exist.
2>D:\VS2017\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.ConflictResolution.targets(33,5): message NETSDK1041: Encountered conflict between 'Platform:System.Net.Http.WebRequest.dll' and 'Reference:System.Net.Http.WebRequest, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL'.  NETSDK1038: Could not determine winner because 'Reference:System.Net.Http.WebRequest, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL' does not exist.
2>

Solution

  • Seems like Microsoft already deals with that problem and working on a fix. Also there seems to be a workaround (I have not tried it yet) https://marketplace.visualstudio.com/items?itemName=ProBITools.MicrosoftRdlcReportDesignerforVisualStudio-18001&ssr=false#review-details