Skip to content

Commit

Permalink
fix: 대상 프레임워크 .NET Framework 4.8로 변경 (#66)
Browse files Browse the repository at this point in the history
.NET Framework의 마지막 버전은 4.8이다. .NET 5가 내년이면 나오는데, 이제는 4.0 버전에 남을 이유가 없다.

BREAKING CHANGE: .NET Framework 4.8
  • Loading branch information
sunghwan2789 authored Aug 3, 2020
1 parent 35178cd commit b7d24e8
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 37 deletions.
20 changes: 3 additions & 17 deletions Bible2PPT/App.config
Original file line number Diff line number Diff line change
@@ -1,20 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/></startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.2.29.0" newVersion="2.2.29.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.6.10.0" newVersion="2.6.10.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.6.10.0" newVersion="2.6.10.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
</configuration>
7 changes: 3 additions & 4 deletions Bible2PPT/Bible2PPT.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net40</TargetFramework>
<TargetFramework>net48</TargetFramework>
<RootNamespace>Bible2PPT</RootNamespace>
<AssemblyName>Bible2PPT</AssemblyName>
<UseWindowsForms>true</UseWindowsForms>
Expand All @@ -18,7 +18,7 @@

<NoWin32Manifest>true</NoWin32Manifest>
<ApplicationIcon>Icon.ico</ApplicationIcon>
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand All @@ -37,6 +37,7 @@

<ItemGroup>
<Reference Include="Microsoft.VisualBasic" />
<Reference Include="System.Net.Http" />
</ItemGroup>

<ItemGroup>
Expand All @@ -62,8 +63,6 @@

<ItemGroup>
<PackageReference Include="FontAwesome.Sharp" Version="5.13.0" />
<PackageReference Include="Microsoft.Bcl.Async" Version="1.0.168" />
<PackageReference Include="Microsoft.Net.Http" Version="2.2.29" />
<PackageReference Include="SQLite.CodeFirst" Version="1.6.0.30" />
<PackageReference Include="System.Data.SQLite" Version="1.0.113.1" />
</ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions Bible2PPT/Bibles/Sources/GodpeopleBible.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public GodpeopleBible()
}

protected override Task<List<Bible>> GetBiblesOnlineAsync() =>
TaskEx.FromResult(new List<Bible>
Task.FromResult(new List<Bible>
{
new Bible
{
Expand Down Expand Up @@ -57,7 +57,7 @@ private static string EncodeString(string s) =>
string.Join("", ENCODING.GetBytes(s).Select(b => $"%{b.ToString("X")}"));

protected override Task<List<Chapter>> GetChaptersOnlineAsync(Book book) =>
TaskEx.FromResult(Enumerable.Range(1, book.ChapterCount)
Task.FromResult(Enumerable.Range(1, book.ChapterCount)
.Select(i => new Chapter
{
OnlineId = $"{i}",
Expand Down
4 changes: 2 additions & 2 deletions Bible2PPT/Bibles/Sources/GoodtvBible.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ protected override async Task<List<Book>> GetBooksOnlineAsync(Bible bible)
new KeyValuePair<string, string>("otnt", "2"),
})),
};
var data = string.Join("", await TaskEx.WhenAll(tasks));
var data = string.Join("", await Task.WhenAll(tasks));
var matches = Regex.Matches(data, @"""idx"":(\d+).+?""bible_name"":""(.+?)"".+?""max_jang"":(\d+)");
return matches.Cast<Match>().Select(i => new Book
{
Expand All @@ -62,7 +62,7 @@ protected override async Task<List<Book>> GetBooksOnlineAsync(Bible bible)
}

protected override Task<List<Chapter>> GetChaptersOnlineAsync(Book book) =>
TaskEx.FromResult(Enumerable.Range(1, book.ChapterCount)
Task.FromResult(Enumerable.Range(1, book.ChapterCount)
.Select(i => new Chapter
{
OnlineId = $"{i}",
Expand Down
18 changes: 9 additions & 9 deletions Bible2PPT/PPT/Builder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ private static async Task<IEnumerable<IEnumerable<Book>>> GetEachBooksAsync(IEnu
RETRY:
try
{
return await TaskEx.WhenAll(bibles
return await Task.WhenAll(bibles
.Select(bible => bible.Source.GetBooksAsync(bible))
.ToList());
}
// 취소할 때까지 계속 재시도
catch (OperationCanceledException) when (!token.IsCancellationRequested)
{
await TaskEx.Delay(3000);
await Task.Delay(3000);
goto RETRY;
}
}
Expand All @@ -56,16 +56,16 @@ private static async Task<IEnumerable<IEnumerable<Chapter>>> GetEachChaptersAsyn
try
{
// 해당 책이 없는 성경도 있으므로 주의해서 장 정보 가져오기
return await TaskEx.WhenAll(books
return await Task.WhenAll(books
.Select(book =>
book?.Source.GetChaptersAsync(book)
?? TaskEx.FromResult(new List<Chapter>()))
?? Task.FromResult(new List<Chapter>()))
.ToList());
}
// 취소할 때까지 계속 재시도
catch (OperationCanceledException) when (!token.IsCancellationRequested)
{
await TaskEx.Delay(3000);
await Task.Delay(3000);
goto RETRY;
}
}
Expand Down Expand Up @@ -133,16 +133,16 @@ private static async Task<IEnumerable<IEnumerable<Verse>>> GetEachVersesAsync(IE
RETRY:
try
{
return await TaskEx.WhenAll(chapters
return await Task.WhenAll(chapters
.Select(chapter =>
chapter?.Source.GetVersesAsync(chapter)
?? TaskEx.FromResult(new List<Verse>()))
?? Task.FromResult(new List<Verse>()))
.ToList());
}
// 취소할 때까지 계속 재시도
catch (OperationCanceledException) when (!token.IsCancellationRequested)
{
await TaskEx.Delay(3000);
await Task.Delay(3000);
goto RETRY;
}
}
Expand Down Expand Up @@ -239,7 +239,7 @@ protected override async Task ProcessAsync(Job job, CancellationToken token)
var e = new JobProgressEventArgs(job, null, 0, queries.Count, 0, 0);
OnJobProgress(e);

var produce = TaskEx.Run(async () =>
var produce = Task.Run(async () =>
{
var eachBooks = await GetEachBooksAsync(job.Bibles, token);

Expand Down
2 changes: 1 addition & 1 deletion Bible2PPT/PPT/JobManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public void Queue(Job job)
JobCancellations[job] = new CancellationTokenSource();
OnJobQueued(new JobQueuedEventArgs(job));

TaskEx.Run(async () =>
Task.Run(async () =>
{
var acquired = false;
try
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@

## 실행 요구 사항

### .NET Framework 4 Client Profile 이상
**성경2PPT**를 실행하는 데 필요한 프레임워크입니다. [여기](http://go.microsoft.com/fwlink/?LinkId=181012)에서 내려받아서 설치하시고, [여기](http://go.microsoft.com/fwlink/?linkid=221217)에서 업데이트를 설치하세요. ([관련 이슈](https://github.com/sunghwan2789/Bible2PPT/pull/21))
### .NET Framework 4.8
**성경2PPT**를 실행하는 데 필요한 프레임워크입니다. [여기](http://go.microsoft.com/fwlink/?LinkId=2085155)에서 내려받아서 설치하세요.

### Microsoft PowerPoint 2007 이상
PPT를 만들고 보는 데 필요한 프로그램입니다. 프로그램 구성 요소로 *Office 공유 기능* - *Visual Basic for Applications*를 설치해야 합니다.
Expand Down

0 comments on commit b7d24e8

Please sign in to comment.