0
0
C Sharp (C#)programming~10 mins

Project structure and csproj file in C Sharp (C#) - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to specify the project SDK in a .csproj file.

C Sharp (C#)
<Project Sdk=[1]>
</Project>
Drag options to blanks, or click blank then click option'
A"Microsoft.NET.Framework"
B"DotNet.Core"
C"Microsoft.NET.Sdk"
D"Microsoft.CSharp.Sdk"
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect SDK names like "Microsoft.NET.Framework" which is not valid in the SDK attribute.
Forgetting to include quotes around the SDK name.
2fill in blank
medium

Complete the code to specify the target framework in a .csproj file.

C Sharp (C#)
<PropertyGroup>
  <TargetFramework>[1]</TargetFramework>
</PropertyGroup>
Drag options to blanks, or click blank then click option'
Anet5.0
Bnetstandard2.0
Cnetframework4.7.2
Dnetcoreapp2.1
Attempts:
3 left
💡 Hint
Common Mistakes
Using older framework names like "netcoreapp2.1" when targeting newer .NET versions.
Confusing .NET Framework and .NET Core target names.
3fill in blank
hard

Fix the error in the .csproj snippet by completing the blank.

C Sharp (C#)
<ItemGroup>
  <PackageReference Include="Newtonsoft.Json" Version=[1] />
</ItemGroup>
Drag options to blanks, or click blank then click option'
A'12.0.3'
B12.0.3
Cversion="12.0.3"
D"12.0.3"
Attempts:
3 left
💡 Hint
Common Mistakes
Omitting quotes around the version number causing XML parsing errors.
Using single quotes which are not standard in XML attributes.
4fill in blank
hard

Fill both blanks to create a property group that defines the output type and nullable context.

C Sharp (C#)
<PropertyGroup>
  <OutputType>[1]</OutputType>
  <Nullable>[2]</Nullable>
</PropertyGroup>
Drag options to blanks, or click blank then click option'
AExe
BLibrary
Cenable
Ddisable
Attempts:
3 left
💡 Hint
Common Mistakes
Setting OutputType to 'Library' when the project is an executable.
Using 'disable' for Nullable when you want to enable nullable reference types.
5fill in blank
hard

Fill all three blanks to create a simple .csproj file with SDK, target framework, and output type.

C Sharp (C#)
<Project Sdk=[1]>
  <PropertyGroup>
    <TargetFramework>[2]</TargetFramework>
    <OutputType>[3]</OutputType>
  </PropertyGroup>
</Project>
Drag options to blanks, or click blank then click option'
A"Microsoft.NET.Sdk"
Bnet6.0
CExe
DLibrary
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect SDK names or missing quotes.
Choosing an older or incompatible target framework.
Setting OutputType to 'Library' when an executable is intended.