Programming in C# — Question 161
You are creating an assembly named Assembly1 by using the Class Library project template in Microsoft Visual Studio. Assembly1 is used by a C# application named App1.
You do not have access to the Visual Studio project for App1.
You need to ensure that you can debug Assembly1.
What should you configure in the project properties?
Answer options
- A. On the Application page, set the Output type to Windows Application.
- B. On the Build page, click Allow unsafe code.
- C. On the Debug page, set the Start external program option for App1.
- D. On the Debug page, click Enable native code debugging.
Correct answer: C
Explanation
The correct answer is C because setting the Start external program option for App1 allows the debugger to attach to the running instance of App1 and facilitates debugging of Assembly1. The other options do not provide the necessary configuration for debugging Assembly1 in the context of being used by App1.