dotnet / sdk

Core functionality needed to create .NET Core projects, that is shared between Visual Studio and CLI
https://dot.net/core
MIT License
2.76k stars 1.07k forks source link

Skip CanInstantiateTemplate_WithAlias Test Due to Unimplemented Alias Feature #42539

Open v-wuzhai opened 4 months ago

v-wuzhai commented 4 months ago

Summary

The CanInstantiateTemplate_WithAlias test method is currently skipped because the alias feature is not yet implemented. This ensures the stability of the test suite and prevents failures due to unimplemented features.

Details

The CanInstantiateTemplate_WithAlias test method aims to verify the functionality of template instantiation using an alias. The specific steps are as follows:

  1. Create a temporary folder for the home directory and working directory.
  2. Use the DotnetNewCommand to create a new console project with the alias csharpconsole.
  3. Verify that the alias csharpconsole is successfully created with the value console.
  4. Create a new console project without using the alias and verify its successful creation.
  5. Create a new console project using the alias and verify its successful creation.
  6. Compare the contents of the directories created with and without the alias to ensure they are identical.

Error Message

In the current implementation, the following error occurs when executing the command:
File Name: C:\Users\AzureTest\Desktop\aa\sdk\artifacts\bin\redist\Debug\dotnet\dotnet.exe Arguments: new console --alias csharpconsole --debug:custom-hive C:\Users\AzureTest\Desktop\aa\sdk\artifacts\tmp\Debug\dotnet-new.IntegrationTests\CanInstantiateTemplate_WithAlias\Home\20240806054533116 Exit Code: 127 StdOut:

StdErr: Unrecognized command or argument ‘csharpconsole’.

This indicates that the current version of the dotnet CLI does not support the csharpconsole alias.

Expected

Implement the alias feature and reenable the test.

dotnet-issue-labeler[bot] commented 4 months ago

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

dotnet-issue-labeler[bot] commented 4 months ago

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.