Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsiTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
MSBuild is Microsoft’s build engine: it reads a project’s build instructions, evaluates configuration and inputs, then runs targets and tasks to produce an output. Visual Studio uses MSBuild, but the engine can also be run from a command line or script, including through the .NET CLI.
What MSBuild is—and how it relates to Visual Studio
MSBuild is the system that interprets build descriptions and carries out the work they specify. A project file—often a .csproj, .vbproj, or .vcxproj—uses MSBuild’s XML format to describe configuration, inputs, and build logic. Visual Studio uses MSBuild to load and build managed projects; MSBuild itself is not the Visual Studio IDE. It can also be invoked independently for command-line, scripted, or CI builds. Microsoft’s MSBuild overview describes the project-file model and its building blocks.
The name can refer to the engine, the project-file system, or the implementation bundled with a particular .NET SDK or Visual Studio installation. That distinction matters when checking which project types, SDKs, properties, and targets an environment supports.
How an MSBuild build works
A build has two main phases after startup processes the command-line input: evaluation and execution. During evaluation, MSBuild reads the project and its imported files, determines property values, and identifies items. During execution, it runs the selected targets and the tasks within them. Microsoft’s build-process overview explains this sequence.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
- Properties store configuration as key/value pairs, such as settings that affect a build.
- Items identify inputs, such as source files or other files included in a project.
- Targets organize work into named build steps and can depend on other targets.
- Tasks perform the operations called by targets.
These pieces work together: properties configure the build, items identify what it works on, targets sequence work, and tasks do the work. Asking MSBuild to run one target may also run its prerequisite targets. A solution file (.sln) is not itself an MSBuild XML project; command-line MSBuild interprets the solution and builds the projects required for the chosen configuration. Visual Studio also manages its own project-build orchestration.
Which command should you use?
| Need | Starting point | Scope and limits |
|---|---|---|
| Build a .NET project in the usual workflow | dotnet build |
The standard .NET SDK command; it is equivalent to dotnet msbuild -restore. It uses the .NET SDK’s MSBuild implementation. |
| Pass MSBuild targets or properties to an SDK-style project | dotnet msbuild |
Provides MSBuild command-line capabilities for SDK-style projects. Microsoft’s command page specifies the .NET 6 SDK and later. |
| Build Visual Studio project types with Visual Studio or Build Tools installed | MSBuild.exe |
Can build project or solution input. The exact available properties and targets depend on project type and imported files. |
The .NET SDK provides .NET build commands on Windows, macOS, and Linux; MSBuild.exe is available through Visual Studio or Visual Studio Build Tools. For command details, see the .NET CLI reference for dotnet msbuild and the MSBuild command-line reference.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
Build normally with the .NET SDK
For a standard .NET build, run dotnet build from the project directory. This is usually the clearest choice when you want the SDK’s ordinary restore-and-build workflow rather than a specific MSBuild target.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallCrashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteChoose a target or set a property
Use dotnet msbuild when you need direct MSBuild target or property control for an SDK-style project. For example, a target can be selected with -target:TargetName, and a property can be supplied with -property:Name=Value. The available names and their effects depend on the project and its imports. Shell quoting matters for arguments containing semicolons or commas; consult the command-line reference for syntax.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
Not every .NET CLI command forwards MSBuild switches in the same way. Microsoft documents relevant switch forwarding for commands including dotnet build, dotnet publish, and dotnet msbuild; dotnet run does not forward them in that manner.
Project files, SDK-style projects, and imports
MSBuild project files can import other files to share defaults and build logic. A .props file commonly supplies properties, while a .targets file commonly defines targets and related behavior. Traditional project files may show more of this plumbing explicitly. In an SDK-style .NET project, an SDK reference provides implicit imports, so much of the standard setup is not written out in the project file. Microsoft explains this in its guidance on referencing an MSBuild Project SDK and the .NET project SDK.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
For .NET projects, Microsoft.Common.props supplies defaults and Microsoft.Common.targets defines standard build behavior and extension points. Import order helps explain why a value may not take effect: a later project setting or imported file can override an earlier one.
Share settings across a directory
Directory.Build.props is commonly used for shared properties. It is imported early enough that values in the project can override them. Directory.Build.targets is imported after the project file, making it suitable for later shared target customizations. For either file, confirm that it is in the relevant directory scope and that no later definition changes the value you intended to set.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Add work around existing targets
For SDK-specific customization, use documented extension points such as BeforeTargets or AfterTargets to run work before or after a target. This lets a project extend the build without casually editing SDK-owned target files. See Microsoft’s guidance on MSBuild .targets files.
When a property or target behaves unexpectedly
- A property appears to be ignored: check where it is defined and when that file is imported. A later definition may override it.
- A target runs more work than expected: inspect its target dependencies; invoking a named target can trigger prerequisites.
- A command-line switch has no effect: check whether the CLI command forwards that switch to MSBuild and whether the option syntax is correct for the shell.
- A build works on one machine but not another: compare the project type, SDK, Visual Studio or Build Tools installation, and imported files. Available properties and targets are not universal across all MSBuild contexts.
Microsoft’s common MSBuild project properties reference documents properties, but the applicable set depends on the project type and build environment.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →

