Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This article describes the MSB3096 error code.
Message text
MSB3096: Task 'task-name' is only supported when building on Windows.
Description
Certain tasks are only supported on Windows, because they use resources or tools that are only available on the Windows operating system. If you're building a project that depends on these tasks on another operating system, such as Linux or macOS, then you get this error. The tasks that produce this error are only relevant on Windows, because they relate to Windows-specific features such as application manifests.
The following tasks are only supported on Windows:
- GenerateApplicationManifest
- GenerateDeploymentManifest
- GenerateLauncher
- GenerateManifestBase
- GetInstalledSDKLocations
- GetSDKReferenceFiles
- ResolveSDKReference
- SignFile
Resolution
Build the project on Windows, if that is appropriate in your situation. In CI/CD environments, check pipeline configurations and be sure the pipeline is requesting a Windows build agent for the project.
For projects that are intended to build on Linux or macOS, you need to find out where in your build logic the request to the task mentioned in the error message is coming from. Turn on verbose diagnostics (use the -v:diag
command-line switch), or generate a binary log (-bl
command-line switch) and use the MSBuild Structured Log Viewer to debug the build logic.
Check the documentation for the task in the MSBuild task reference to see what its requirements are, and if any equivalent exists that supports your operating system.
Applies to
All versions of MSBuild