Skip to content

Commit a5dab64

Browse files
authored
Document experimental attributes for Aspire.Hosting.Python (#1880)
* Document experimental attributes for Aspire.hosting.Python * Use NoWarn instead of SuppressMessage * changed wrong diagnostics
1 parent 044611a commit a5dab64

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

docs/diagnostics/overview.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,23 @@ Alternatively, you can suppress this diagnostic with preprocessor directive by a
4848
// API that is causing the warning.
4949
#pragma warning restore ASPIREACADOMAINS001
5050
```
51+
52+
## ASPIREHOSTINGPYTHON001
53+
54+
.NET Aspire provides a way to add Python executables or applications to the .NET Aspire app host. Since the shape of this API is expected to change in the future, it has been marked as _Experimental_. To suppress the compiler error/warning use the following code:
55+
56+
To suppress this diagnostic with the `SuppressMessageAttribute`, add the following code to your project file:
57+
58+
```xml
59+
<PropertyGroup>
60+
<NoWarn>$(NoWarn);ASPIREHOSTINGPYTHON001</NoWarn>
61+
<PropertyGroup>
62+
```
63+
64+
Alternatively, you can suppress this diagnostic with preprocessor directive by adding the following code to your project:
65+
66+
```csharp
67+
#pragma warning disable ASPIREHOSTINGPYTHON001
68+
// API that is causing the warning.
69+
#pragma warning restore ASPIREHOSTINGPYTHON001
70+
```

0 commit comments

Comments
 (0)