dotnetコマンド
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
]
開始行:
「[[マイクロソフト系技術情報 Wiki>http://techinfoofmicros...
-戻る
--[[.NET Core]]
--[[.NET Standard]]
* 目次 [#ydd371d7]
#contents
*概要 [#o7a2dee1]
[[.NET Core]] の dotnetコマンドを使い倒す。
*詳細 [#ee74c390]
**情報 [#n0b35fbd]
***基本情報 [#zee07804]
$ dotnet --info
.NET Command Line Tools (2.0.0)
Product Information:
Version: 2.0.0
Commit SHA-1 hash: cdcd1928c9
Runtime Environment:
OS Name: ubuntu
OS Version: 16.04
OS Platform: Linux
RID: ubuntu.16.04-x64
Base Path: /usr/share/dotnet/sdk/2.0.0/
Microsoft .NET Core Shared Framework Host
Version : 2.0.0
Build : e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d
***テンプレート [#wcdf734a]
現時点でサポートされているテンプレートを知ることが出来る。
>dotnet new --help
Templates Short ...
--------------------------------------------------------...
Console Application consol...
Class library classl...
WPF Application wpf ...
WPF Class library wpflib...
WPF Custom Control Library wpfcus...
WPF User Control Library wpfuse...
Windows Forms (WinForms) Application winfor...
Windows Forms (WinForms) Class library winfor...
Worker Service worker...
Unit Test Project mstest...
NUnit 3 Test Project nunit ...
NUnit 3 Test Item nunit-...
xUnit Test Project xunit ...
Razor Component razorc...
Razor Page page ...
MVC ViewImports viewim...
MVC ViewStart viewst...
Blazor Server App blazor...
ASP.NET Core Empty web ...
ASP.NET Core Web App (Model-View-Controller) mvc ...
ASP.NET Core Web App webapp...
ASP.NET Core with Angular angula...
ASP.NET Core with React.js react ...
ASP.NET Core with React.js and Redux reactr...
Razor Class Library razorc...
ASP.NET Core Web API webapi...
ASP.NET Core gRPC Service grpc ...
dotnet gitignore file gitign...
global.json file global...
NuGet Config nugetc...
Dotnet local tool manifest file tool-m...
Web Config webcon...
Solution File sln ...
Protocol Buffer File proto ...
Examples:
dotnet new mvc --auth Individual
dotnet new webconfig
dotnet new --help
***, etc. [#dbcdc001]
**ビルド・デプロイ [#yda45833]
***ビルド [#l6b40fa8]
以下の様に使用している。
dotnet msbuild /p:Configuration=%BUILD_CONFIG% -v:d ".\x...
-参考
--https://github.com/OpenTouryoProject/OpenTouryo/blob/de...
--https://github.com/OpenTouryoProject/OpenTouryo/blob/de...
***デプロイ [#wd556f66]
-以下のエラーが発生する場合、
Error:
An assembly specified in the application dependencies ...
-以下の[[SCD設定>.NET Coreのデプロイ#w88a1ee1]]で発行する。
$ dotnet publish -c Release -r XXXX --self-contained
--XXXXは、RuntimeIdentifiers(RID値)。
--RuntimeIdentifiersに何を設定すべきか?は以下のコマンド...
$ cat /etc/os-release
NAME="Ubuntu"
VERSION="16.04.3 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.3 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
-参考
--deps.json
---Deep-dive into .NET Core primitives: deps.json, runtim...
https://natemcmaster.com/blog/2017/12/21/netcore-primitiv...
---asp.net > core > コンソールアプリをWindowsServerで動作...
https://qiita.com/sugasaki/items/3b9c16f3d62ffcf60227
--RID
---Microsoft Docs > .NET Core のランタイム識別子 (RID) の...
https://docs.microsoft.com/ja-jp/dotnet/core/rid-catalog#...
---Linux OSのバージョンを調べる方法 - Qiita~
https://qiita.com/spite400k/items/96dfd0d4340afc35a22e
***, etc. [#s6c27913]
**実行 [#b7716dc9]
***通常実行 [#a1eef04e]
***トレース実行 [#h8509f6a]
-システムコールをトレースして原因を特定する。
$ strace -o log.txt dotnet XXXX.dll
-原因の特定
ログ・ファイルから以下を発見。
--カレント・ディレクトリが違っていてファイルを読み込めな...
open("SHA256RSA.pfx", O_RDONLY) = -1 ENOENT (No ...
--bcrypt.dllファイルが読み込めなかったもよう。
open("/usr/lib/bcrypt.dll.so", O_RDONLY|O_CLOEXEC) = -1 ...
・・・
open("/usr/lib/libbcrypt.dll", O_RDONLY|O_CLOEXEC) = -1 ...
***, etc. [#r7e01e49]
*参考 [#hac51311]
**内部リンク [#v74cdaee]
***[[.NET Coreの開発]] [#y5ecd480]
***[[.NET Coreのデプロイ]] [#y78375b7]
***[[WSL上での.NET Core開発>Windows Subsystem for Linux#w...
----
Tags: [[:.NET開発]], [[:.NET Core]]
終了行:
「[[マイクロソフト系技術情報 Wiki>http://techinfoofmicros...
-戻る
--[[.NET Core]]
--[[.NET Standard]]
* 目次 [#ydd371d7]
#contents
*概要 [#o7a2dee1]
[[.NET Core]] の dotnetコマンドを使い倒す。
*詳細 [#ee74c390]
**情報 [#n0b35fbd]
***基本情報 [#zee07804]
$ dotnet --info
.NET Command Line Tools (2.0.0)
Product Information:
Version: 2.0.0
Commit SHA-1 hash: cdcd1928c9
Runtime Environment:
OS Name: ubuntu
OS Version: 16.04
OS Platform: Linux
RID: ubuntu.16.04-x64
Base Path: /usr/share/dotnet/sdk/2.0.0/
Microsoft .NET Core Shared Framework Host
Version : 2.0.0
Build : e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d
***テンプレート [#wcdf734a]
現時点でサポートされているテンプレートを知ることが出来る。
>dotnet new --help
Templates Short ...
--------------------------------------------------------...
Console Application consol...
Class library classl...
WPF Application wpf ...
WPF Class library wpflib...
WPF Custom Control Library wpfcus...
WPF User Control Library wpfuse...
Windows Forms (WinForms) Application winfor...
Windows Forms (WinForms) Class library winfor...
Worker Service worker...
Unit Test Project mstest...
NUnit 3 Test Project nunit ...
NUnit 3 Test Item nunit-...
xUnit Test Project xunit ...
Razor Component razorc...
Razor Page page ...
MVC ViewImports viewim...
MVC ViewStart viewst...
Blazor Server App blazor...
ASP.NET Core Empty web ...
ASP.NET Core Web App (Model-View-Controller) mvc ...
ASP.NET Core Web App webapp...
ASP.NET Core with Angular angula...
ASP.NET Core with React.js react ...
ASP.NET Core with React.js and Redux reactr...
Razor Class Library razorc...
ASP.NET Core Web API webapi...
ASP.NET Core gRPC Service grpc ...
dotnet gitignore file gitign...
global.json file global...
NuGet Config nugetc...
Dotnet local tool manifest file tool-m...
Web Config webcon...
Solution File sln ...
Protocol Buffer File proto ...
Examples:
dotnet new mvc --auth Individual
dotnet new webconfig
dotnet new --help
***, etc. [#dbcdc001]
**ビルド・デプロイ [#yda45833]
***ビルド [#l6b40fa8]
以下の様に使用している。
dotnet msbuild /p:Configuration=%BUILD_CONFIG% -v:d ".\x...
-参考
--https://github.com/OpenTouryoProject/OpenTouryo/blob/de...
--https://github.com/OpenTouryoProject/OpenTouryo/blob/de...
***デプロイ [#wd556f66]
-以下のエラーが発生する場合、
Error:
An assembly specified in the application dependencies ...
-以下の[[SCD設定>.NET Coreのデプロイ#w88a1ee1]]で発行する。
$ dotnet publish -c Release -r XXXX --self-contained
--XXXXは、RuntimeIdentifiers(RID値)。
--RuntimeIdentifiersに何を設定すべきか?は以下のコマンド...
$ cat /etc/os-release
NAME="Ubuntu"
VERSION="16.04.3 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.3 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
-参考
--deps.json
---Deep-dive into .NET Core primitives: deps.json, runtim...
https://natemcmaster.com/blog/2017/12/21/netcore-primitiv...
---asp.net > core > コンソールアプリをWindowsServerで動作...
https://qiita.com/sugasaki/items/3b9c16f3d62ffcf60227
--RID
---Microsoft Docs > .NET Core のランタイム識別子 (RID) の...
https://docs.microsoft.com/ja-jp/dotnet/core/rid-catalog#...
---Linux OSのバージョンを調べる方法 - Qiita~
https://qiita.com/spite400k/items/96dfd0d4340afc35a22e
***, etc. [#s6c27913]
**実行 [#b7716dc9]
***通常実行 [#a1eef04e]
***トレース実行 [#h8509f6a]
-システムコールをトレースして原因を特定する。
$ strace -o log.txt dotnet XXXX.dll
-原因の特定
ログ・ファイルから以下を発見。
--カレント・ディレクトリが違っていてファイルを読み込めな...
open("SHA256RSA.pfx", O_RDONLY) = -1 ENOENT (No ...
--bcrypt.dllファイルが読み込めなかったもよう。
open("/usr/lib/bcrypt.dll.so", O_RDONLY|O_CLOEXEC) = -1 ...
・・・
open("/usr/lib/libbcrypt.dll", O_RDONLY|O_CLOEXEC) = -1 ...
***, etc. [#r7e01e49]
*参考 [#hac51311]
**内部リンク [#v74cdaee]
***[[.NET Coreの開発]] [#y5ecd480]
***[[.NET Coreのデプロイ]] [#y78375b7]
***[[WSL上での.NET Core開発>Windows Subsystem for Linux#w...
----
Tags: [[:.NET開発]], [[:.NET Core]]
ページ名: