zoukankan      html  css  js  c++  java
  • Asp.net core 学习笔记 dotnet & azure 常用 command

    因为很少用, 容易忘记所以记入起来, 方便找

    Start, Run, Publish Project

    dotnet new webapp -o simple-test (razor page project)

    dotnet new web -o simplete-test (empty project)

    dotnet dev-certs https --trust (弄一次就可以了)

    dotnet watch run

    dotnet publish Project.csproj -o C:keatkeatprojects elease (-o 是 output path, csproj 是需要选一个)

    add, list package
    dotnet add package Azure.Storage.Blobs

    dotnet add Project.csproj package Azure.Storage.Blobs (如果是多个 project 的话就要加 ProjectName.csproj)

    dotnet list package | dotnet list Project.csproj package

    User Secret
    dotnet user-secrets init
    dotnet user-secrets set "password" "123456" --project "C:appsWebApp1srcWebApp1"
    dotnet user-secrets list
    dotnet user-secrets remove "password"
    dotnet user-secrets clear

    Ef core

    dotnet tool update dotnet-ef --global

    dotnet ef migrations add init -c ApplicationDbContext -o Migrations/App

    dotnet ef migrations add adjust68 -c ApplicationDbContext -o Migrations/App

    dotnet ef database update -c ApplicationDbContext

    dotnet ef migrations remove -c ApplicationDbContext

    Azure key-vault and secret

    az group create --name "klc-resource-group" --location "SoutheastAsia"

    az keyvault create --name "klc-test-key-vault" --resource-group "klc-resource-group" --location "Southeast Asia"

    az keyvault secret set --vault-name "klc-test-key-vault" --name "Password" --value "123456"

  • 相关阅读:
    超级强大的SVG SMIL animation动画详解
    Java Math的 floor,round和ceil的总结
    理解SVG的viewport,viewBox,preserveAspectRatio
    SVG-1
    PHP通过exec执行git pull
    Nodejs中request出现ESOCKETTIMEDOUT解决方案
    Linux安装了mysql 无法远程连接
    linux下docker启动nginx无法访问80端口
    ZPL文件打印
    k8s结合helm部署
  • 原文地址:https://www.cnblogs.com/keatkeat/p/14399650.html
Copyright © 2011-2022 走看看