Visual Studio For MacOS .NetCore开发踩坑记
自从Visual Studio For MacOS公布以来,就开始尝试在Mac上进行net core开发。断断续续遇到了各种奇奇怪怪的问题。虽然大部分利用google查查(百度屁都查不出来),都能找到解决方案,但还是做个记录吧~
问题一:
错误提示:error MSB4057: The target “Build” does not exist in the project
记录时间:2017-03-31
原因解析:Mono版本低了。对,就是Mono版本低了,别问我为什么开发netcore和mono怎么扯起来联系的。人家说了: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。而且这个时间段刚好是netcore项目从xproj文件转为csproj,所以老版本的不兼容。 我查了下我的mono版本的,是16年的版本,虽然也是4.8.但是小版本号不够。升级到最新,问题解决。
参考地址: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
问题二:
错误提示:Unable to attach to CoreCLR.
记录时间:2017-04-01
原因解析:我把macos的版本从10.12.3升级到了10.12.4。这里面出现了一些不兼容。 这已经是第二次因为macos版本升级导致netcore不能用了!
解决方案:
- 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
参考地址: https://github.com/dotnet/coreclr/issues/10279
https://github.com/dotnet/core/issues/377
Visual Studio For MacOS .NetCore开发踩坑记的更多相关文章
- 微信小程序开发踩坑记
前言 微信小程序自去年公测以来,我司也申请了一个帐号开发,春节前后开始开发,现在终于告一个段落了.谨以此文记录下踩过的坑. 坑1:scroll-view与onPullDownRefresh冲突 由于有 ...
- .NetCore SignalR 踩坑记
背景 由于最近公司要做微信小程序聊天,所以.NetFramwork版本的SignalR版本的不能用了.因为小程序里没有windows对象,导致JQuery无法使用.而Signalr的 js客户端是依赖 ...
- Visual Studio For MacOS 踩坑记(二)
Visual Studio For MacOS安装安卓SDK. 系统默认安装了安卓6.0 API23的SDK. 但是我需要安卓7.0的,API24. 遂安装. SDK可以下载成功,但是用Visu ...
- C# -- HttpWebRequest 和 HttpWebResponse 的使用 C#编写扫雷游戏 使用IIS调试ASP.NET网站程序 WCF入门教程 ASP.Net Core开发(踩坑)指南 ASP.Net Core Razor+AdminLTE 小试牛刀 webservice创建、部署和调用 .net接收post请求并把数据转为字典格式
C# -- HttpWebRequest 和 HttpWebResponse 的使用 C# -- HttpWebRequest 和 HttpWebResponse 的使用 结合使用HttpWebReq ...
- Visual Studio Code和Docker开发asp.net core和mysql应用
Visual Studio Code和Docker开发asp.net core和mysql应用 .net猿遇到了小鲸鱼,觉得越来越兴奋.本来.net猿只是在透过家里那田子窗看外面的世界,但是看着海峡对 ...
- visual studio 2015 搭建python开发环境,python入门到精通[三]
在上一篇博客Windows搭建python开发环境,python入门到精通[一]很多园友提到希望使用visual studio 2013/visual studio 2015 python做demo, ...
- 利用Visual GDB在Visual Studio中进行Android开发
转载请注明http://www.cnblogs.com/adong7639/p/4119467.html 无意中发现了Visual GDB这个工具,可以再Visual Studio中进行Android ...
- 使用Visual Studio Code搭建TypeScript开发环境
使用Visual Studio Code搭建TypeScript开发环境 1.TypeScript是干什么的 ? TypeScript是由微软Anders Hejlsberg(安德斯·海尔斯伯格,也是 ...
- 新成员!Visual Studio Code --跨平台的开发工具(支持OSX, Linux 和 Windows)
原文出处:新成员!Visual Studio Code --跨平台的开发工具(支持OSX, Linux 和 Windows) 这是我的文章备份 http://www.dotblogs.com.tw/ ...
随机推荐
- nodejs笔记1 ----关于express不是本地命令
1,npm install -g express安装express框架 2,npm install -g express-generator安装命令工具 3,express --help 安装完成
- JVM垃圾收集(GC)算法
判断对象是否已死 1. 引用计数算法 给对象中添加一个引用计数器,每当一个地方引用它时,计数器值就加1:当引用失败时,计数器值就减1:任何时刻计数器为0的对象就是不能再被使用的. 主流的Java虚拟机 ...
- 在vim中搜索单词
基本的搜索: /pattern 向前搜索 ?pattern 向后搜索 n 向前重复搜索 N 向后重复搜索 搜索并替换 :%s/sear ...
- 学习笔记——Java包装类
由于Java不能定义基本类型的对象,所以通过包装类提供了各种可用方法的封装. 这一部分的知识,需要能够通过查看Integer.Boolean.Byte.Character.Double.Number类 ...
- ZOJ 1492 Maximum Clique 搜索最大团
ZOJ1492 题意:给一个无向图 求最大团的大小.节点数小于50 数据有限,考虑记忆化搜索,方程很好给出. 令 Si={vi,vi+1.....vn} mc[i]表示Si最大团的大小,倒着推算. 必 ...
- 每天一个Linux命令(06)--rmdir命令
终于忙完了公司的事,可以安静的充充电了. 今天学习一下Linux中命令:rmdir 命令,rmdir是常用的命令,该命令的功能是删除空目录,一个目录被删除之前必须是空的.(注意,rm -r dir 命 ...
- instance “error” 了怎么办?- 每天5分钟玩转 OpenStack(159)
这是 OpenStack 实施经验分享系列的第 9 篇. OpenStack 用多了,经常会遇到这种情况:对 instance 执行某个操作如果失败了就会处于 "error" 状态 ...
- 2017-02-19C#基础 - 数据类型与类型转换
数据类型 基本数据类型 1)整形:byte short int long 整数类型 2)浮点型:fioat(.NET类型 Single 值后面要加f float = 10.5f;) doubl ...
- Robots协议
Robots协议 什么是robots? Robots文件:网站和搜索引擎之间的一个协议. 用来防止搜索引擎抓取那些我们不想被搜索引擎看到的隐私内容. Robots文件告诉蜘蛛什么是可以被查看的. ...
- Python round() 函数
round() 方法返回浮点数x的四舍五入值. 以下是 round() 方法的语法: round( x [, n] )x为浮点数,n为保留的小数点位. 以下展示了使用 round() 方法的实例: p ...