{"id":724,"date":"2020-05-26T08:00:43","date_gmt":"2020-05-26T08:00:43","guid":{"rendered":"https:\/\/bruceng.com\/dev\/?p=724"},"modified":"2020-05-26T08:00:43","modified_gmt":"2020-05-26T08:00:43","slug":"no-configuration-values-in-asp-net-core-app-when-debugging-in-visual-studio-code","status":"publish","type":"post","link":"https:\/\/bruceng.com\/dev\/?p=724","title":{"rendered":"No Configuration values in ASP.NET Core app when debugging in Visual Studio Code"},"content":{"rendered":"\n<p>This is a stupid mistake.<\/p>\n\n\n\n<p>Make sure that in launch.json, the value for cwd is correct and is pointing to the same folder as the DLL of the .NET Core app.<\/p>\n\n\n\n<p>By default current working directory is set to the workspace directory, the appsettings.json file is not there, thus when running the app, it doesn&#8217;t have any settings.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is a stupid mistake. Make sure that in launch.json, the value for cwd is correct and is pointing to the same folder as the DLL of the .NET Core app. By default current working directory is set to the workspace directory, the appsettings.json file is not there, thus when running the app, it doesn&#8217;t &hellip; <a href=\"https:\/\/bruceng.com\/dev\/?p=724\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;No Configuration values in ASP.NET Core app when debugging in Visual Studio Code&#8221;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[94,104,103,83],"class_list":["post-724","post","type-post","status-publish","format-standard","hentry","category-problems","tag-net-core","tag-appsettings-json","tag-configuration","tag-visual-studio-code"],"_links":{"self":[{"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=\/wp\/v2\/posts\/724","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=724"}],"version-history":[{"count":1,"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=\/wp\/v2\/posts\/724\/revisions"}],"predecessor-version":[{"id":725,"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=\/wp\/v2\/posts\/724\/revisions\/725"}],"wp:attachment":[{"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=724"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=724"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=724"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}