How to resolve [msbuild] Microsoft.CSharp.Core.targets was not found

SwagatikaSwagatika Member ✭✭✭

I am using xcode version 10, visual studio 2017, mac os Mojave. while building the application getting the Error:---
VisualStudio/7.0/MSBuild/9435_1/Microsoft.CSharp.CurrentVersion.targets(5,5): Error MSB4019: The imported project VisualStudio/7.0/MSBuild/9435_1//Microsoft.CSharp.Core.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk. (MSB4019). Any suggestions please ?

Best Answer

Answers

  • LeonLuLeonLu Member, Xamarin Team Xamurai
    edited September 5

    This issue is known issue in the VS, you can refer to this thread.
    https://github.com/mono/mono/issues/14875

    I found two tips about solving this issue.

    1. Use an older mono. If you have more than one version installed, then you can select a different (older) mono runtime in Preferences -> Projects -> .NET Runtimes
    2. Update your VS for mac >8.0.
  • SwagatikaSwagatika Member ✭✭✭

    I have added the older version of mono like 4.8. Now Error is ---Could not load file or assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. Confirm that the declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. (MSB4062) .

  • LeonLuLeonLu Member, Xamarin Team Xamurai

    Did you try to update your VS for mac version >8.0?

  • SwagatikaSwagatika Member ✭✭✭

    yes i updated the vs for mac version 8.0

  • SwagatikaSwagatika Member ✭✭✭

    I have updated mono 6.0. Now agian i am getting this error in xamarin.ios.
    Error MSB4019: The imported project "/Library/Frameworks/Mono.framework/Versions/6.0.0/lib/mono/msbuild/Current/bin/Xamarin/iOS/Xamarin.iOS.CSharp.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.

  • SwagatikaSwagatika Member ✭✭✭

    @LeonLu said:
    You can choose Mono 5.18.1.3 to installed, If it worked.

    This also i tried.but same exception i am getting

Sign In or Register to comment.