rsaz / csharp-snippet-productivity

The complete snippet toolbox for C#"
MIT License
19 stars 6 forks source link

Error Creating New React SPA Project #24

Closed dnmyers closed 8 months ago

dnmyers commented 9 months ago

Receiving an error when trying to create a new React SPA project. The command to create the new project isn't including the framework to target. This is the command it is currently executing:

dotnet new react --language c# -n TestProject -o 'e:\Coding.NET\Projects\TestProject' --framework --force

And the error: "Error: Invalid option(s): --framework --force '--force' is not a valid value for --framework. The possible values are: net5.0 - Target net5.0 net6.0 - Target net6.0 net7.0 - Target net7.0 netcoreapp2.1 - Target netcoreapp2.1 netcoreapp3.1 - Target netcoreapp3.1"

Just need to add the selected target framework after the --framework flag to fix this.

image

rsaz commented 8 months ago

Hi @dnmyers thank you for reporting this issue.

A new version of the extension is about come out, version 2.0. In this version you will find:

My implementation fix this issue but has a better approach I believe. Now you will know when a framework doesn't support the current template you're trying to create and the extension will tell you what version you can use. Right now this is a configuration and it is tested for most of the templates. As the user start using other templates, if we have issues like this I can quickly adjust and add in the dictionary the appropriate compatible .net version.

Here is a sneak peek of this issue being resolved.

image

Stay tuned to download the v2.0!