2 votes

Comment résoudre le problème : Aucun exécutable trouvé correspondant à la commande "dotnet-dslc" ?

J'effectue une étude documentaire pour ma thèse et j'ai essayé PROSE SDK de Microsoft. Cependant, chaque fois que j'essaie de construire les dépendances du projet à partir de leur exemple [repo] ( https://github.com/microsoft/prose ), j'obtiens cette erreur :

Target CompileGrammar:
    dotnet dslc  "@/Users/username/test/prose/ProgramSynthesis/ProseSample.Substrings/obj/ProseSample.Substrings.rsp" 
    dotnet dslc  "@/Users/username/test/prose/ProgramSynthesis/ProseSample.Substrings/obj/ProseSample.Substrings.rsp"
    No executable found matching command "dotnet-dslc"

J'ai suivi les instructions d'installation de aquí

Voici les informations concernant la configuration de dotnet :

macOS : High Sierra Version 10.13.6 Visual Studio 2019 pour Mac version 8.0.9 dotnet --info

.NET Core SDK (reflecting any global.json):
 Version:   2.2.106
 Commit:    aa79b139a8

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.13
 OS Platform: Darwin
 RID:         osx.10.13-x64
 Base Path:   /usr/local/share/dotnet/sdk/2.2.106/

Host (useful for support):
  Version: 2.2.4
  Commit:  f95848e524

.NET Core SDKs installed:
  2.2.105 [/usr/local/share/dotnet/sdk]
  2.2.106 [/usr/local/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.2.3 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.2.4 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.2.3 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.2.4 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.2.3 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.2.4 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

Voici le fichier .csproj :

ProseSample.Substrings.csproj

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>net45</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <ProjectReference Include="..\ProseSample.Substrings.Semantics\ProseSample.Substrings.Semantics.csproj" />
    <PackageReference Include="Microsoft.ProgramSynthesis.Common" Version="6.20.0" />
    <PackageReference Include="Microsoft.ProgramSynthesis.DslcTargets" Version="6.20.0" />
    <DotNetCliToolReference Include="Microsoft.ProgramSynthesis.Dslc" Version="6.20.0" />
  </ItemGroup>

</Project>

Sortie de la construction :

Building ProseSample (Debug)
Build started 6/1/2019 5:53:06 PM.
__________________________________________________
Project "/Users/username/test/prose/ProgramSynthesis/ProseSample.Substrings.Semantics/ProseSample.Substrings.Semantics.csproj" (Build target(s)):

Target GenerateTargetFrameworkMonikerAttribute:
  Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
Target CoreGenerateAssemblyInfo:
  Skipping target "CoreGenerateAssemblyInfo" because all output files are up-to-date with respect to the input files.
Target CoreCompile:
  Skipping target "CoreCompile" because all output files are up-to-date with respect to the input files.
Target _CopyFilesMarkedCopyLocal:
    Touching "/Users/username/test/prose/ProgramSynthesis/ProseSample.Substrings.Semantics/obj/Debug/net45/ProseSample.Substrings.Semantics.csproj.CopyComplete".
Target CopyFilesToOutputDirectory:
    ProseSample.Substrings.Semantics -> /Users/username/test/prose/ProgramSynthesis/ProseSample.Substrings.Semantics/bin/Debug/net45/ProseSample.Substrings.Semantics.dll
__________________________________________________
Project "/Users/username/test/prose/ProgramSynthesis/ProseSample.Substrings/ProseSample.Substrings.csproj" (Build target(s)):

Target _GetProjectReferenceTargetFrameworkProperties:
    __________________________________________________
    Project "/Users/username/test/prose/ProgramSynthesis/ProseSample.Substrings/ProseSample.Substrings.csproj" is building "/Users/username/test/prose/ProgramSynthesis/ProseSample.Substrings.Semantics/ProseSample.Substrings.Semantics.csproj" (GetTargetFrameworks target(s)):

Target ResolveProjectReferences:
    __________________________________________________
    Project "/Users/username/test/prose/ProgramSynthesis/ProseSample.Substrings/ProseSample.Substrings.csproj" is building "/Users/username/test/prose/ProgramSynthesis/ProseSample.Substrings.Semantics/ProseSample.Substrings.Semantics.csproj" (GetTargetPath target(s)):

    __________________________________________________
    Project "/Users/username/test/prose/ProgramSynthesis/ProseSample.Substrings/ProseSample.Substrings.csproj" is building "/Users/username/test/prose/ProgramSynthesis/ProseSample.Substrings.Semantics/ProseSample.Substrings.Semantics.csproj" (GetNativeManifest target(s)):

Target GenerateTargetFrameworkMonikerAttribute:
  Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
Target CompileGrammar:
    dotnet dslc  "@/Users/username/test/prose/ProgramSynthesis/ProseSample.Substrings/obj/ProseSample.Substrings.rsp" 
    dotnet dslc  "@/Users/username/test/prose/ProgramSynthesis/ProseSample.Substrings/obj/ProseSample.Substrings.rsp"
    No executable found matching command "dotnet-dslc"
    /Users/username/.nuget/packages/microsoft.programsynthesis.dslctargets/6.20.0/build/Microsoft.ProgramSynthesis.DslcTargets.targets(82,9): error MSB3073: The command "dotnet dslc  "@/Users/username/test/prose/ProgramSynthesis/ProseSample.Substrings/obj/ProseSample.Substrings.rsp"" exited with code 1.
Done building target "CompileGrammar" in project "ProseSample.Substrings.csproj" -- FAILED.

Done building project "ProseSample.Substrings.csproj" -- FAILED.

Build FAILED.

/Users/username/.nuget/packages/microsoft.programsynthesis.dslctargets/6.20.0/build/Microsoft.ProgramSynthesis.DslcTargets.targets(82,9): error MSB3073: The command "dotnet dslc  "@/Users/username/test/prose/ProgramSynthesis/ProseSample.Substrings/obj/ProseSample.Substrings.rsp"" exited with code 1.
    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:01.21

========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Build: 1 error, 0 warnings

Merci d'avance !

0voto

bzz Points 615

Avec les dernières PROSE v7.11.1 et les étapes ci-dessous, la compilation semble passer sur macOS maintenant.

L'échec de la construction est déclenché par dotnet dslc outil ne fonctionne pas sur votre environnement.

Tout d'abord, cet outil semble faire partie du paquet NuGet qui doit être installé

$ cd ProseSample
$ dotnet add package Microsoft.ProgramSynthesis.Dslc --version 7.11.1

Ensuite, il semble que la manière multiplateforme d'exécuter cet outil responsable de l'étape obligatoire de la génération du code DSL soit différente. dotnet run dslc .

$ dotnet run dslc
$ dotnet build

Build succeeded.
    0 Warning(s)
    0 Error(s)

Je suppose que pour que la construction fonctionne dans l'IDE, il faut également éditer ~.nuget/packages/microsoft.programsynthesis.dslctargets/7.11.1/build/Microsoft.ProgramSynthesis.DslcTargets.targets et remplacer les 2 occurrences de dotnet dslc avec le dotnet run dslc .

J'espère que cela vous aidera !

Prograide.com

Prograide est une communauté de développeurs qui cherche à élargir la connaissance de la programmation au-delà de l'anglais.
Pour cela nous avons les plus grands doutes résolus en français et vous pouvez aussi poser vos propres questions ou résoudre celles des autres.

Powered by:

X