| ページ一覧 | ブログ | twitter |  書式 | 書式(表) |

MyMemoWiki

差分

ナビゲーションに移動 検索に移動
1,309 バイト追加 、 2022年10月23日 (日) 02:59
[[File:install_dotnetcore_sdk_for_mac.png|300px]]
=====アンインストール1=====
*例
<pre>
sudo rm -rf /usr/local/share/dotnet/sdk/6.0.200
</pre>
 
===[[Ubuntu]]===
----
*[https://www.typea.info/blog/index.php/2022/04/16/ubuntu_nginx_asp_net_core/ Ubuntu+Nginx+ASP.NET Core]
=====[https://docs.microsoft.com/ja-jp/dotnet/core/install/remove-runtime-sdk-versions?pivots=os-macos 削除]する場合=====
$Env:ASPNETCORE_ENVIRONMENT = "Staging"
dotnet run --no-launch-profile
</pre>
 
*ASP.NET Core 6.0
<pre>
var builder = WebApplication.CreateBuilder(new WebApplicationOptions
{
ApplicationName = typeof(Program).Assembly.FullName,
ContentRootPath = Directory.GetCurrentDirectory(),
EnvironmentName = Environments.Staging,
WebRootPath = "customwwwroot"
});
 
Console.WriteLine($"Application Name: {builder.Environment.ApplicationName}");
Console.WriteLine($"Environment Name: {builder.Environment.EnvironmentName}");
Console.WriteLine($"ContentRoot Path: {builder.Environment.ContentRootPath}");
Console.WriteLine($"WebRootPath: {builder.Environment.WebRootPath}");
 
var app = builder.Build();
</pre>
1. nuget [有効]
https://api.nuget.org/v3/index.json
</pre>
 
===サーバー証明書の検証をスキップ===
- https://qiita.com/TsuyoshiUshio@github/items/f238a2a2c1483c287e4b
<pre>
System.Net.Http.HttpRequestException: The SSL connection could not be established
</pre>
 
<pre>
var httpClientHandler = new HttpClientHandler();
httpClientHandler.ServerCertificateCustomValidationCallback = (message, cert, chain, sslPlicyErrors) => true;
var httpClient = new HttpClient(httpClientHandler);
 
</pre>

案内メニュー