draft create fails to detect asp.net net core application language
draft version &version.Version{SemVer:"v0.14.1", GitCommit:"fdc29c553a45600ac4f795f3485d4bb9a80c7862", GitTreeState:"clean"}
Windows 10 April update - windows command line
Looks like we still have an issue with draft detecting the correct language when it comes to .net
**dotnet new mvc**
The template "ASP.NET Core Web App (Model-View-Controller)" was created successfully.
This template contains technologies from parties other than Microsoft, see https://aka.ms/template-3pn for details.
Processing post-creation actions...
Running 'dotnet restore' on C:\Repos\drafttest\drafttest.csproj...
Restoring packages for C:\Repos\drafttest\drafttest.csproj...
Restore completed in 142.57 ms for C:\Repos\drafttest\drafttest.csproj.
Generating MSBuild file C:\Repos\drafttest\obj\drafttest.csproj.nuget.g.props.
Generating MSBuild file C:\Repos\drafttest\obj\drafttest.csproj.nuget.g.targets.
Restore completed in 5.48 sec for C:\Repos\drafttest\drafttest.csproj.
Restore succeeded.
**draft create**
--> Draft detected Coq (45.110470%)
--> Could not find a pack for Coq. Trying to find the next likely language match...
--> Draft detected JSON (23.281315%)
--> Could not find a pack for JSON. Trying to find the next likely language match...
--> Draft detected JavaScript (17.572730%)
--> Ready to sail
Having the same issue: --> Draft detected JSON (98.826087%) --> Could not find a pack for JSON. Trying to find the next likely language match... --> Draft detected XML (0.488644%) --> Could not find a pack for XML. Trying to find the next likely language match... --> Draft detected csharp (0.441122%) --> Could not find a pack for csharp. Trying to find the next likely language match... --> Draft detected Text (0.216942%) --> Could not find a pack for Text. Trying to find the next likely language match... --> Draft detected JavaScript (0.017397%) --> Could not find a pack for JavaScript. Trying to find the next likely language match... --> Draft detected Coq (0.009808%) --> Could not find a pack for Coq. Trying to find the next likely language match... Error: no languages were detected
Hi and thanks for letting us know! Just for reference, as a manual fix you can specify the pack to use:
draft create --pack=csharp
I tried that and it gives me the following: C:\repos\someapp> draft create --pack=csharp Error: No packs found with name csharp
A reinstall did the trick.
@iliasjennane sorry reinstall of what?
Probably a reinstall of draft (draft init), since that error usually indicates that there's no packs available with the name csharp in ~/.draft/packs.
Yeah, had to figure that out all by myself ;) I wish the error message was a bit more clear on that. In particular if you try to do draft create without first issuing draft init the error message should mentioned that.
Yeah, had to figure that out all by myself ;) I wish the error message was a bit more clear on that. In particular if you try to do
draft createwithout first issuingdraft initthe error message should mentioned that.
Yes, First run draft init and then run draft create. Thanks for the info