-
Notifications
You must be signed in to change notification settings - Fork 49
Closed
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
Requirement
In the case of the CLI, depending on the current directory, there possibility to occur problem with the path for read appsettings.json file. In Container, the current directory can be set to handle this, but in CLI, it can be executed in any current directory.
- .NET Core 2.0 appsettings.json file location when dealing with multiple projects - Stack Overflow
- [C#] 実行ファイルのある場所を取得|へっぽこプログラマーの備忘録
http://kuttsun.blogspot.com/2018/05/c.html
var dir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);↓ ↓ ↓
// configの初期化
string dir = new FileInfo(Assembly.GetExecutingAssembly().Location).Directory
.FullName.Replace(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
GetConfigParameter.InitConfiguration(dir + "/appsettings.json");Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request