You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to test if my templates are valid in CI/CD. I thought i could install the template in the workflow and it would fail if there are any errors. It turns out that even if there are errors with the template, the exit code is still 0.
To Reproduce
Steps:
Create a new template
malform template.config
install template
check exit code
$ dotnet new install content/WPF
[20]The following template packages will be installed:
[21]/templates/dotnet/content/WPF
[22]Error: The template 'WPF-Template' (Template.Dotnet.WPF) has the following validation errors:
[23][Error][MV012] Source location '../doesnotexist/' is outside the specified install source location.
[24]Error: Failed to load the template 'WPF-Template' (Template.Dotnet.WPF): the template is not valid.
[26]No templates were found in the package /templates/dotnet/content/WPF.
[27]$ echo $?
[28]0
Product
dotnet CLI (dotnet new)
Describe The Bug
I want to test if my templates are valid in CI/CD. I thought i could install the template in the workflow and it would fail if there are any errors. It turns out that even if there are errors with the template, the exit code is still 0.
To Reproduce
Steps:
dotnet Info
output
.NET SDK: Version: 8.0.301 Commit: 1a0e9c0300 Workload version: 8.0.300-manifests.f6879a9a MSBuild version: 17.10.4+10fbfbf2eLaufzeitumgebung:
OS Name: Windows
OS Version: 10.0.22000
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\8.0.301\
Installierte .NET-Workloads:
Es sind keine installierten Workloads zum Anzeigen vorhanden.
Host:
Version: 8.0.6
Architecture: x64
Commit: 3b8b000a0e
.NET SDKs installed:
6.0.300 [C:\Program Files\dotnet\sdk]
6.0.321 [C:\Program Files\dotnet\sdk]
8.0.301 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.26 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.26 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.26 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]
Environment variables:
Not set
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
Visual Studio Version
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: