You are creating an application that reads from a database. You need to use different databases during the development phase and the testing phase by using conditional compilation techniques. What should you do?
A.
Configure the Define TRACE constant setting in Microsoft Visual Studio.
B.
Specify the /define compiler option.
C.
Run the Assembly Linker tool from the Windows Software Development Kit (Windows SDK).
D.
Decorate the code by using the [assembly:AssemblyDelaySignAttribute(true)] attribute.
Suggested Answer:B🗳️
You can specify the compiler settings for your application in several ways: ✑ The property pages ✑ The command line #CONST (for Visual Basic) and #define (for C#) Note: You can have either the Trace or Debug conditional attribute turned on for a build, or both, or neither. Thus, there are four types of build: Debug, Trace, both, or neither. Some release builds for production deployment might contain neither; most debugging builds contain both. Reference: How to: Compile Conditionally with Trace and Debug https://msdn.microsoft.com/en-us/library/64yxa344(v=vs.110).aspx
Shouldn't it be A? Command line: csc -r:System.dll -d:TRACE -d:DEBUG=FALSE MyApplication.cs
#define TRACE to perform conditional compilation using #CONST or #define (VB or C#)
https://docs.microsoft.com/en-us/dotnet/framework/debug-trace-profile/how-to-compile-conditionally-with-trace-and-debug?redirectedfrom=MSDN
The link that @mindzia is referring to is stating that: "While you are debugging an application during development, both your tracing and debugging output go to the Output window in Visual Studio. However, to include tracing features in a deployed application, you must compile your instrumented applications with the TRACE compiler directive enabled. This allows tracing code to be compiled into the release version of your application. If you do not enable the TRACE directive, all tracing code is ignored during compilation and is not included in the executable code that you will deploy.". That means TRACE has only a sense when running the release version of the application. In the question, it states that we are in the development phase, thus B.
This same question has the answer "Define the DEBUG constant in Visual Studio". So maybe by "Specify the /define compiler option" they mean "Define the DEBUG constant..."?
https://www.examtopics.com/discussions/microsoft/view/2770-exam-70-483-topic-2-question-40-discussion/
I think its B -> https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/define-compiler-option
upvoted 2 times
...
This section is not available anymore. Please use the main Exam Page.70-483 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
mindzia
Highly Voted 5 years, 2 months agomichael243
4 years, 10 months agodemoinq
4 years, 6 months agohseagraves
Most Recent 4 years, 5 months agoMona30
4 years, 10 months ago