0
votes

I recently installed Visual Studio on Mac and tried it out. I tried running the iOS emulator for my application on Visual Studio Mac for a couple hours now but it doesn't seem to work. It only gives me this error message:

/Users/user/Projects/test-ios/test-ios.iOS/test-ios.iOS.csproj(126,11) : error MSB4226: The imported project "/Library/Frameworks/Mono.framework/Versions/6.4.0/lib/mono/xbuild/Xamarin/iOS/Xamarin.iOS.CSharp.targets" was not found. Also, tried to find "Xamarin/iOS/Xamarin.iOS.CSharp.targets" in the fallback search path(s) for $(MSBuildExtensionsPath) - "/Library/Frameworks/Mono.framework/External/xbuild/" and "/Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/AddIns/docker/MonoDevelop.Docker/MSbuild" . These search paths are defined in "/Users/user/Library/Caches/VisualStudio/8.0/MSBuild/4656_1/MonoDevelop.MSBuildBuilder.exe.config". Confirm that the path in the declaration is correct, and that the file exists on disk in one of the search paths.

So I looked up the location of the missing file and Xamarin folder is missing from the xbuild folder:

Missing path Xamarin.iOS.CSharp.targets

Is there any way to fix this? I need to setup both android(working) and ios for my mobile development subject.

Any help is appreciated!

  • OS: macOS Mojave 10.14.6
  • Visual Studio for Mac: 8.3.8 (build 8) Package version: 604000208
  • Mono Framework MDK Runtime: Mono 6.4.0.208 (2019-06/07c23f2ca43) (64-bit) Package version: 604000208
  • Apple Developer Tools Xcode 11.2.1 (15526.1) Build 11B500
1
you could run in xcode ,see if it could work. - Leo Zhu - MSFT
I tried. But even though the emulator can be run and running, it still didn't resolve the error. - Sebastian Martinez

1 Answers

0
votes

Apparently on mac, you have to check updates and change your update channel to Preview instead of Stable. This solved the issue!

Update channel: preview