December 2019
Intermediate to advanced
528 pages
11h 19m
English
Finally, the following will need to be changed in eBookManager.cs:
private void btnReadEbook_Click(object sender, EventArgs e) { string filePath = txtFilePath.Text; FileInfo fi = new FileInfo(filePath); if (fi.Exists) { var processStartInfo = new ProcessStartInfo(filePath, Path.GetDirectoryName(filePath)) { // Change in .NET Core - this defaulted to true in WinForms UseShellExecute = true }; Process.Start(processStartInfo); } }
The reason is that ProcessStartInfo in .NET Framework used to default to UseShellExecute = true. However, in .NET Core, it now defaults to false, and will therefore fail without this change.
That's it! If you run the app, you're now running it under .NET Core 3. It's the same application (albeit with ...
Read now
Unlock full access