Skip to content

Commit 481f58a

Browse files
dimodidimodi
authored andcommitted
Add second possible syntax
1 parent 72e0b48 commit 481f58a

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

deployment/ci-cd-license-key.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -132,18 +132,22 @@ Also see [Using NuGet Keys](slug:deployment-nuget#using-nuget-keys) in the artic
132132
133133
## Abort Deployment on License Key Error
134134
135-
To avoid accidental [license watermarks and notifications on your live site](slug:installation-license-key#will-telerik-ui-for-blazor-work-with-an-expired-license-key), you can fail the application build and abort deployment when there is an issue with the license key. [Add a `<WarningsAsErrors>` tag](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/errors-warnings#warningsaserrors-and-warningsnotaserrors) to the project file(s) and include the desired [Telerik license warning codes](slug:troubleshooting-license-key-errors#error-messages):
136-
137-
>caption Treat Telerik license warnings as errors in the .csproj project file
135+
To avoid accidental [license watermarks and notifications on your live site](slug:installation-license-key#will-telerik-ui-for-blazor-work-with-an-expired-license-key), you can fail the application build and abort deployment when there is an issue with the license key. There are two ways to list the [Telerik license warning codes](slug:troubleshooting-license-key-errors#error-messages) that should be treated as errors:
136+
137+
* [Add a `<WarningsAsErrors>` tag to the `.csproj` project file(s)](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/errors-warnings#warningsaserrors-and-warningsnotaserrors):
138+
````XML.skip-repl
139+
<PropertyGroup>
140+
<TargetFramework>net8.0</TargetFramework>
141+
<Nullable>enable</Nullable>
142+
<ImplicitUsings>enable</ImplicitUsings>
143+
<WarningsAsErrors>TKL001;TKL002;TKL003;TKL004;TKL101;TKL102;TKL103;TKL104;TKL105</WarningsAsErrors>
144+
</PropertyGroup>
145+
````
138146
139-
````XML.skip-repl
140-
<PropertyGroup>
141-
<TargetFramework>net8.0</TargetFramework>
142-
<Nullable>enable</Nullable>
143-
<ImplicitUsings>enable</ImplicitUsings>
144-
<WarningsAsErrors>TKL001;TKL002;TKL003;TKL004;TKL101;TKL102;TKL103;TKL104;TKL105</WarningsAsErrors>
145-
</PropertyGroup>
146-
````
147+
* [Set the `-warnaserror` switch when using the .NET CLI](https://learn.microsoft.com/en-us/visualstudio/msbuild/msbuild-command-line-reference?view=vs-2022#switches):
148+
````SH.skip-repl
149+
dotnet build -warnaserror:TKL001,TKL002,TKL003,TKL004,TKL101,TKL102,TKL103,TKL104,TKL105
150+
````
147151
148152
## Next Steps
149153

0 commit comments

Comments
 (0)