Azure / draft-classic

A tool for developers to create cloud-native applications on Kubernetes.
https://draft.sh
MIT License
3.92k stars 395 forks source link

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

Open shahiddev opened 6 years ago

shahiddev commented 6 years ago

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
iliasjennane-zz commented 6 years ago

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

radu-matei commented 6 years ago

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

iliasjennane-zz commented 6 years ago

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 commented 6 years ago

A reinstall did the trick.

andrewsav-bt commented 6 years ago

@iliasjennane sorry reinstall of what?

bacongobbler commented 6 years ago

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.

AndrewSav commented 6 years ago

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.

batman1911 commented 5 years ago

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 initand then run draft create. Thanks for the info