dotnet / dotnet/sdk

Ability to target `-windows10.0.XXXX.X` TFM for dotnet tools

Open
#52,716 10 comments 0 reactions 0 assignees View on GitHub
Area-Tools
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

We have some internal tools we publish as dotnet tools, which are Windows-specific. My understanding is that currently they're not supported not because they can't work (they can), but just because there's no system to prevent installation on non-Windows platforms, meaning they'd just crash in those scenarios. It'd be nice to have a way to skip this check, so that you're still able to package a tool that's platform-dependent.

On .NET 9, we could work around this limitation by just adding this to the .csproj:

```xml





Windows

```

However, on .NET 10 this completely fails the build ([binlog [MSFT ONLY]](https://onedrive.cloud.microsoft/:u:/a@7ac67gk6/S/IQB-jw2XJSomQa7mV998LusSAZikiPMF_tQCWFHQRPEEyZ4?e=4fhANG)).
It's be nice to have:
- A temporary workaround to make this work on .NET 10, so we can get unblocked
- Ideally, just an official way to support this scenario

Happy to provide any additional other info that might be needed.

cc. @baronfel

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.