Tapan Mallick

Tapan Mallick

  • NA
  • 440
  • 237.3k

Facing error when publishing .Net Core 2 Web app from VS2017

Apr 24 2018 3:52 AM

Facing error when publishing .Net Core 2 Web app from VS2017 ?

 

C:\Program Files\dotnet\sdk\2.0.0\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(323,5): Error MSB4018: The "ReportAssetsLogMessages" task failed unexpectedly.
System.InvalidCastException: [A]NuGet.ProjectModel.LockFile cannot be cast to [B]NuGet.ProjectModel.LockFile. Type A originates from 'NuGet.ProjectModel, Version=4.4.0.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35' in the context 'LoadFrom' at location 'C:\Program Files\dotnet\sdk\2.0.2\Sdks\Microsoft.NET.Sdk\tools\net46\NuGet.ProjectModel.dll'. Type B originates from 'NuGet.ProjectModel, Version=4.3.0.5, Culture=neutral, PublicKeyToken=31bf3856ad364e35' in the context 'LoadFrom' at location 'C:\Program Files\dotnet\sdk\2.0.0\Sdks\Microsoft.NET.Sdk\tools\net46\NuGet.ProjectModel.dll'.
at Microsoft.NET.Build.Tasks.LockFileCache.GetLockFile(String path)
at Microsoft.NET.Build.Tasks.ReportAssetsLogMessages.get_LockFile()
at Microsoft.NET.Build.Tasks.ReportAssetsLogMessages.ExecuteCore()
at Microsoft.NET.Build.Tasks.TaskBase.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d_26.MoveNext() 

Answers (3)