在Linux上使用Visual Studio进行ASP.NET开发的推荐配置
创新互联公司始终致力于在企业网站建设领域发展。秉承“创新、求实、诚信、拼搏”的企业精神,致力为企业提供全面的网络宣传与技术应用整体策划方案,为企业提供包括“网站建设、成都响应式网站建设、手机网站建设、微信网站建设、重庆小程序开发公司、商城网站定制开发、平台网站建设秉承"和谐、参与、激情"的文化,与客户和合作伙伴齐心协力一起成长,共同发展。
随着.NET Core的发布,ASP.NET开发已经不再局限于Windows平台,现在,我们可以在Linux上使用Visual Studio进行ASP.NET开发,本文将介绍在Linux上使用Visual Studio进行ASP.NET开发的推荐配置。
我们需要在计算机上安装一个Linux发行版,推荐的发行版有:Ubuntu、Debian、Fedora等,这些发行版都有详细的安装教程,可以在网上找到。
1、打开终端,输入以下命令下载.NET Core SDK安装包:
wget https://packages.microsoft.com/config/ubuntu/18.04/packagesmicrosoftprod.deb O packagesmicrosoftprod.deb
2、安装下载好的安装包:
sudo dpkg i packagesmicrosoftprod.deb
3、更新软件包列表:
sudo aptget update
4、安装.NET Core SDK:
sudo aptget install y apttransporthttps && sudo aptget update && sudo aptget install y dotnetsdk3.1
1、访问Visual Studio Code官网(https://code.visualstudio.com/)下载适用于Linux的安装包。
2、解压下载好的安装包:
tar xvf code_*.tar.gz
3、进入解压后的目录:
cd code*
4、添加可执行权限:
chmod +x code
5、运行Visual Studio Code:
./code
1、打开Visual Studio Code,点击左侧的扩展图标,搜索“C#”,找到“C# by Microsoft”插件,点击安装。
2、同样的方式,搜索“ASP.NET Core”,找到“ASP.NET Core C# Snippets”插件,点击安装。
1、打开终端,输入以下命令创建一个新的ASP.NET Core项目:
dotnet new webapp o MyWebApp runtime ubuntu.18.04x64 norestore u Microsoft.AspNetCore.Mvc.RazorPages::VERSION=3.1.0 force framework netcoreapp3.1 output MyWebAppProjectFolderName name MyWebAppProjectName content "Pages/Index.html" "Pages/About.html" "Pages/Contact.html" "Pages/Error.html" "Pages/Shared/_Layout.cshtml" "Pages/Shared/_ViewImports.cshtml" "Pages/Shared/_ValidationScriptsPartial.cshtml" "Pages/Shared/_ViewStart.cshtml" "wwwroot/css" "wwwroot/js" "wwwroot/lib" "wwwroot/images" "wwwroot/favicon.ico" nugetpackageid Microsoft.AspNetCore.StaticFiles nugetpackageversion 3.1.0 uselaunchprofile true norestore v m p wwwroot n MyWebAppProjectName d "/Pages/MyWebAppProjectFolderName" f netcoreapp3.1 c Release o MyWebAppProjectFolderName force u Microsoft.AspNetCore.Mvc.RazorPages::VERSION=3.1.0 force framework netcoreapp3.1 output MyWebAppProjectFolderName name MyWebAppProjectName content "Pages/Index.html" "Pages/About.html" "Pages/Contact.html" "Pages/Error.html" "Pages/Shared/_Layout.cshtml" "Pages/Shared/_ViewImports.cshtml" "Pages/Shared/_ValidationScriptsPartial.cshtml" "Pages/Shared/_ViewStart.cshtml" "wwwroot/css" "wwwroot/js" "wwwroot/lib" "wwwroot/images" "wwwroot/favicon.ico" nugetpackageid Microsoft.AspNetCore.StaticFiles nugetpackageversion 3.1.0 uselaunchprofile true norestore v m p wwwroot n MyWebAppProjectName d "/Pages/MyWebAppProjectFolderName" f netcoreapp3.1 c Release o MyWebAppProjectFolderName force u Microsoft.AspNetCore.Mvc.RazorPages::VERSION=3.1.0 force framework netcoreapp3.1 output MyWebAppProjectFolderName name MyWebAppProjectName content "Pages/Index.html" "Pages/About.html" "Pages/Contact.html" "Pages/Error.html" "Pages/Shared/_Layout.cshtml" "Pages/Shared/_ViewImports.cshtml" "Pages/Shared/_ValidationScriptsPartial.cshtml" "Pages/Shared/_ViewStart.cshtml" "wwwroot/css" "wwwroot/js" "wwwroot/lib" "wwwroot/images" "wwwroot/favicon.ico" nugetpackageid Microsoft.AspNetCore.StaticFiles nugetpackageversion 3.1.0 uselaunchprofile true norestore v m p wwwroot n MyWebAppProjectName d "/Pages/MyWebAppProjectFolderName" f netcoreapp3.1 c Release o MyWebAppProjectFolderName force u Microsoft.AspNetCore.Mvc.RazorPages::VERSION=3.1.0 force framework netcoreapp3.1 output MyWebAppProjectFolderName name MyWebAppProjectName content "Pages/Index.html" "Pages/About.html" "Pages/Contact.html" "Pages/Error.html" "Pages/Shared/_Layout.cshtml" "Pages/Shared/_ViewImports
网页名称:在Linux上使用VisualStudio进行ASP.NET开发的推荐配置
文章链接:http://www.shufengxianlan.com/qtweb/news15/406115.html
网站建设、网络推广公司-创新互联,是专注品牌与效果的网站制作,网络营销seo公司;服务项目有等
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联