首页 技术 正文
技术 2022年11月16日
0 收藏 381 点赞 2,934 浏览 1598 个字

ASP.NET Core示例站点网址:http://about.cnblogs.com/

首先安装最新版的 .NET Core 运行环境,从 https://github.com/dotnet/cli 的 readme 中 “Ubuntu Installers” 部分获取 Shared Host、Shared Framework、Sdk 的下载地址,分别依次下载安装:

wget https://dotnetcli.blob.core.windows.net/dotnet/beta/Installers/Latest/dotnet-host-ubuntu-x64.latest.deb
dpkg -i dotnet-host-ubuntu-x64.latest.debwget https://dotnetcli.blob.core.windows.net/dotnet/beta/Installers/Latest/dotnet-sharedframework-ubuntu-x64.latest.deb
dpkg -i dotnet-sharedframework-ubuntu-x64.latest.debwget https://dotnetcli.blob.core.windows.net/dotnet/beta/Installers/Latest/dotnet-sdk-ubuntu-x64.latest.deb
dpkg -i dotnet-sdk-ubuntu-x64.latest.deb

安装后的 dotnet cli 版本是 1.0.0-rc2-002496 。

然后修改示例站点项目 AboutUs 的 project.json 文件:

1)frameworks 中的 “netstandardapp1.3” 改为 “netcoreapp1.0” ,imports 由 “portable-net45+win8” 改为 “portable-net45+wp80+win8+wpa81+dnxcore50”

2)dependecies 中添加:

"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.0-rc2-23931"
},

.NET跨平台之旅:升级ASP.NET Core示例站点

接着将 NuGet.Config 中的 aspnetcidev 改为 aspnetcirelease:

<configuration>
<packageSources>
<clear />
<add key="AspNetCI" value="https://www.myget.org/F/aspnetcirelease/api/v3/index.json" />
<add key="NuGet.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>

dotnet restore 之后,dotnet run 时出现错误:The dependency Ix-Async 1.2.5 does not support framework .NETCoreApp,Version=v1.0。在这个问题上困了很长时间,直到今天看到这篇博文 —— .NET Core 1.0 RC2 历险之旅,才发现了如下的解决方法:

在 “frameworks” -> “netcoreapp1.0” -> “imports” 中添加 “portable-net45+win8+wp8+wpa81” 与 “portable-net45+win8+wp8” 。

"frameworks": {
"netcoreapp1.0": {
"imports": [
"portable-net45+wp80+win8+wpa81+dnxcore50",
"portable-net45+win8+wp8+wpa81",
"portable-net45+win8+wp8"
]
}
}

解决这个问题之后,升级成功!

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:8,954
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,479
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,291
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,108
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,740
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,774