Merge pull request #4 from spaytac/3-unhandled-exception-systemiofilenotfoundexception-the-configuration-file-appsettingsjson-was-not-found-and-is-not-optional-the-expected-physical-path-was-appappsettingsjson

**fixed** debug setting was a part of the last commit. appsettings.js…
This commit is contained in:
Aytac Kirmizi 2023-02-07 19:13:22 +01:00 committed by GitHub
commit 24899bfec3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 20 additions and 6 deletions

3
.gitignore vendored
View File

@ -5,4 +5,5 @@ riderModule.iml
/_ReSharper.Caches/ /_ReSharper.Caches/
**/.env **/.env
.env .env
compose/ compose/
compose-test/

View File

@ -1 +0,0 @@
Linkding.Sync

View File

@ -10,10 +10,12 @@ IHost host = Host.CreateDefaultBuilder(args)
{ {
builder builder
.AddEnvironmentVariables() .AddEnvironmentVariables()
.AddCommandLine(args) #if DEBUG
.AddJsonFile("appsettings.json") .AddJsonFile("appsettings.json")
.AddJsonFile("appsettings.Development.json") .AddJsonFile("appsettings.Development.json")
.AddUserSecrets<Program>(true); #endif
.AddUserSecrets<Program>(true)
.AddCommandLine(args);
}) })
.Build(); .Build();

View File

@ -26,6 +26,7 @@ public partial class WallabagService
while (allQuery.QueryLinks.Next != null && !string.IsNullOrEmpty(allQuery.QueryLinks.Next.Href)) while (allQuery.QueryLinks.Next != null && !string.IsNullOrEmpty(allQuery.QueryLinks.Next.Href))
{ {
// url = allQuery.QueryLinks.Next.Href.Replace(_settings.Url, ""); // url = allQuery.QueryLinks.Next.Href.Replace(_settings.Url, "");
url = allQuery.QueryLinks.Next.Href;
if (_client.BaseAddress.Scheme == "https") if (_client.BaseAddress.Scheme == "https")
{ {
url = allQuery.QueryLinks.Next.Href.Replace("http://", "https://"); url = allQuery.QueryLinks.Next.Href.Replace("http://", "https://");

View File

@ -11,10 +11,12 @@ IHost host = Host.CreateDefaultBuilder(args)
{ {
builder builder
.AddEnvironmentVariables() .AddEnvironmentVariables()
.AddCommandLine(args) #if DEBUG
.AddJsonFile("appsettings.json") .AddJsonFile("appsettings.json")
.AddJsonFile("appsettings.Development.json") .AddJsonFile("appsettings.Development.json")
.AddUserSecrets<Program>(true); #endif
.AddUserSecrets<Program>(true)
.AddCommandLine(args);
}) })
.Build(); .Build();

View File

@ -18,4 +18,13 @@
<ProjectReference Include="..\Services\Linkding.Client\Linkding.Client.csproj" /> <ProjectReference Include="..\Services\Linkding.Client\Linkding.Client.csproj" />
<ProjectReference Include="..\Services\Wallabag.Client\Wallabag.Client.csproj" /> <ProjectReference Include="..\Services\Wallabag.Client\Wallabag.Client.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Content Update="appsettings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Update="appsettings.Development.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
</Project> </Project>