Visual Studio For MacOS. NetCore
Since Visual Studio For MacOS was announced, it has begun to try net core development on Mac. I encountered various strange problems on and off. Although most of the solutions can be found through google Lookup (Baidu fart cannot be found), make a record ~
Question 1:
Error message: error MSB4057: The target "Build" does not exist in the project
Record time:
Cause analysis: the Mono version is lower. Yes, the version of Mono is lower. Don't ask me why netcore and mono are linked. They said: Yes it is a dependency. currently the updater will not show it as a dependency for technical reasons. visual Studio (Windows) depends on MSBuild 15 to compile. NET Core projects. visual Studio for Mac also depends on MSBuild 15 and this is shipped with Mono 4.8. earlier versions of Mono 4.8 were not including the latest bits to support compiling.. NET Core projects. In addition, during this period, the netcore project is converted from the xproj file to the csproj file, so the old version is not compatible. I checked my mono version, which is a 16-year version. Although it is also 4.8, the minor version is not enough. Upgrade to the latest version to solve the problem.
Reference address: http://www.mono-project.com/
Http://stackoverflow.com/questions/41773344/project-not-build-in-active-configuration-visual-studio-macos-net-core
Http://stackoverflow.com/questions/41788027/visual-studio-macos-error-msb4057-the-target-build-does-not-exist-in-the-proj
Question 2:
Error message: Unable to attach to CoreCLR.
Record time:
Cause Analysis: I upgraded the macos version from 10.12.3 to 10.12.4. Some incompatibility issues appear here. This is the second time netcore is unavailable because of the macos version upgrade!
Solution:
Reference: https://github.com/dotnet/coreclr/issues/10279
Https://github.com/dotnet/core/issues/377