Since visual Studio for MacOS has been published, it has been trying to do net core development on a Mac. Intermittent encounters with all kinds of weird problems. Although most of the use of Google search (Baidu fart can not find out), can find a solution, but still make a record it ~
Question one:
Error msb4057:the Target "Build" does not exist in the project
Record time: 2017-03-31
Reason resolution: Mono version is low. Yes, the mono version is low, don't ask why I developed netcore and mono how to pull up contact. Someone said:Yes It is a dependency. Currently the updater won't show it as a dependency for technical reasons. Visual Studio (Windows) depends on MSBuild compile. NET Core projects. Visual Studio for Mac also depends in MSBuild 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. And this time period is just Netcore project from xproj file to csproj, so the old version of incompatibility. I checked my mono version, which is the 16 version, although it is also 4.8. But the minor version number is not enough. Upgrade to the latest, problem solving.
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 two:
Error tip: Unable to attach to CoreCLR.
Record time: 2017-04-01
Cause resolution: I upgraded the MacOS version from 10.12.3 to 10.12.4. There are some incompatibilities in this. This is the second time because MacOS version upgrade causes Netcore to be useless!
Solution:
- Download https://dotnet.myget.org/F/dotnet-core/api/v2/package/ Runtime.osx.10.10-x64.microsoft.netcore.runtime.coreclr/1.1.2-servicing-25123-01
- Open the resulting file as a zip, and copy out Runtimes/osx.10.10-x64/native/libdbgshim.dylib
- Navigate to/applications/visual Studio.app/contents/resources/lib/monodevelop/addins/dotnetcore.debugger/adapter /In Finder or Terminal
- Rename Libdbgshim.dylib to Libdbgshim.dylib.old
- Paste in the new Libdbgshim.dylib
Reference Address: https://github.com/dotnet/coreclr/issues/10279
https://github.com/dotnet/core/issues/377
Visual Studio for MacOS. Netcore Development tread hole record