This is my first time designing a console app, and I'm having difficulty in getting this to work. I want it to check for my DLL in the same directory. If it's not there, the application should exit gracefully.
I thought this code would work but it still crashes without the DLL. Although it will not crash if I comment out everything after the IF statement.
Code:Imports MyDLL.Test Module Module1 Sub Main() If Not File.Exists("MyDLL.dll") Then Console.WriteLine("MyDLL.dll is missing") Console.ReadLine() Exit Sub End If




Reply With Quote