draft-classic icon indicating copy to clipboard operation
draft-classic copied to clipboard

draft create fails to detect asp.net net core application language

Open shahiddev opened this issue 7 years ago • 8 comments

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

shahiddev avatar May 09 '18 14:05 shahiddev

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

iliasjennane-zz avatar May 22 '18 19:05 iliasjennane-zz

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

radu-matei avatar May 22 '18 19:05 radu-matei

I tried that and it gives me the following: C:\repos\someapp> draft create --pack=csharp Error: No packs found with name csharp

iliasjennane-zz avatar May 23 '18 13:05 iliasjennane-zz

A reinstall did the trick.

iliasjennane-zz avatar May 23 '18 13:05 iliasjennane-zz

@iliasjennane sorry reinstall of what?

andrewsav-bt avatar Sep 10 '18 22:09 andrewsav-bt

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.

bacongobbler avatar Sep 10 '18 22:09 bacongobbler

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.

AndrewSav avatar Sep 11 '18 04:09 AndrewSav

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.

Yes, First run draft init and then run draft create. Thanks for the info

batman1911 avatar Sep 24 '19 07:09 batman1911