I finished a full project with 1 form and multiple functions. When I compile the code I receive the message below. The build is compiled but I noticed some functions are not executed when I test the file. I use a DataGridView and when an row is selected a functions resolves related data. In Debug mode this works great after compiling it’s gone.
When I try to find logs I can’t find anything that is related to the Unreadable Code.
Any ideas?
VERBOSE: Checking dotnet version.
VERBOSE: 3.1.201
VERBOSE: 3.1.201
VERBOSE: Creating package project.
VERBOSE: Using .NET Framework version: net462
VERBOSE: Restore completed in 166.83 ms for C:\Users…AppData\Local\Temp\2\89845168caaf4550b5362caa73b68f28\Main.csproj.
VERBOSE: Restore completed in 166.83 ms for C:\Users…\AppData\Local\Temp\2\89845168caaf4550b5362caa73b68f28\Main.csproj.
VERBOSE: Packaging C:\Users…\AppData\Local\Temp\2\Main.ps1 -> C:…\out\Main.exe
VERBOSE: Microsoft ® Build Engine version 16.5.0+d4cbfca49 for .NET Core
Copyright © Microsoft Corporation. All rights reserved.
Restore completed in 50.98 ms for C:\Users…\AppData\Local\Temp\2\89845168caaf4550b5362caa73b68f28\Main.csproj.
ConsolePowerShellHost.cs(54,17): warning CS0162: Unreachable code detected [C:\Users…\AppData\Local\Temp\2\89845168caaf4550b5362caa73b68f28\Main.csproj]
Main -> C:…\out\Main.exe
Build succeeded.
ConsolePowerShellHost.cs(54,17): warning CS0162: Unreachable code detected [C:\Users…AppData\Local\Temp\2\89845168caaf4550b5362caa73b68f28\Main.csproj]
1 Warning(s)
0 Error(s)
Time Elapsed 00:00:01.05
VERBOSE: Microsoft ® Build Engine version 16.5.0+d4cbfca49 for .NET Core
Copyright © Microsoft Corporation. All rights reserved.
Restore completed in 50.98 ms for C:\Users…\AppData\Local\Temp\2\89845168caaf4550b5362caa73b68f28\Main.csproj.
ConsolePowerShellHost.cs(54,17): warning CS0162: Unreachable code detected [C:\Users…\AppData\Local\Temp\2\89845168caaf4550b5362caa73b68f28\Main.csproj]
Main -> C:…\out\Main.exe
Build succeeded.
ConsolePowerShellHost.cs(54,17): warning CS0162: Unreachable code detected [C:\Users…\AppData\Local\Temp\2\89845168caaf4550b5362caa73b68f28\Main.csproj]
1 Warning(s)
0 Error(s)
Time Elapsed 00:00:01.05