exam questions

Exam 70-483 All Questions

View all questions & answers for the 70-483 exam

Exam 70-483 topic 2 question 128 discussion

Actual exam question from Microsoft's 70-483
Question #: 128
Topic #: 2
[All 70-483 Questions]

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.
Show Suggested Answer Hide Answer
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

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
mindzia
Highly Voted 5 years, 2 months ago
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
upvoted 6 times
michael243
4 years, 10 months ago
Since it is using different databases I don't think it would be trace, but I could be incorrect.
upvoted 1 times
demoinq
4 years, 6 months ago
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.
upvoted 2 times
...
...
...
hseagraves
Most Recent 4 years, 5 months ago
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/
upvoted 1 times
...
Mona30
4 years, 10 months ago
I think its B -> https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/define-compiler-option
upvoted 2 times
...
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.

SaveCancel
Loading ...