This is based on two reports on gitter that the project can fail to build as they didn't run dotnet tool restore which installs paket as a local tool for them.
Can we figure out a way to make building the solutions in VS run this command for people?
To experience this remove: C:\Users\<user>\.dotnet\toolResolverCache\1\Paket
C:\dev\MaterialDesignInXamlToolkit>dotnet paket
Run "dotnet tool restore" to make the "paket" command available.
C:\dev\MaterialDesignInXamlToolkit>dotnet tool restore
Tool 'paket' (version '5.249.2') was restored. Available commands: paket
Restore was successful.
C:\dev\MaterialDesignInXamlToolkit>dotnet paket
Paket version 5.249.2
I did update the docs to reflect this. The really challenging part with doing this "automatically" is it really needs to occur before MSBuild starts running. Unforuently there is not a clear scripting mechanism for running inside of VS, but before MSBuild runs.
What would be nice is including a build.ps1 at the root of the repository that does things like check/download install dotnet core, and do the steps to install and run paket.
There could be something like
<Target Name="RestoreTools" BeforeTargets="XXXXXXXX">
<Exec Command="dotnet tool restore" />
</Target>
There is quite the list of values AfterTargets https://docs.microsoft.com/en-us/visualstudio/msbuild/msbuild-targets
And I'm speculating which of the values would be appropriate here:
I also see the possible option of adding it to the Paket target https://github.com/MaterialDesignInXAML/MaterialDesignInXamlToolkit/blob/d75bac11b6d25ad34c78e416b26727344da8c487/.paket/Paket.Restore.targets#L51
Near the end if the command still isn't found then run dotnet tool restore.
MSB3073 命令“dotnet paket restore”已退出,代码为 1。
MSB3073 The command "dotnet paket restore" exited with code 1
I can't build any component of the solution at all, help!
MSB3073 命令“dotnet paket restore”已退出,代码为 1。
MSB3073 The command "dotnet paket restore" exited with code 1
I can't build any component of the solution at all, help!
I have the same problem,have you fix it?
MSB3073 命令“dotnet paket restore”已退出,代码为 1。
MSB3073 The command "dotnet paket restore" exited with code 1
I can't build any component of the solution at all, help!I have the same problem,have you fix it?
No, I haven't.
I have a PR in the works that will eliminate paket from the project in favor of just using NuGet directly. This should eliminate the issues people run into with paket and the timing of when it gets run. https://github.com/MaterialDesignInXAML/MaterialDesignInXamlToolkit/pull/2160
Paket has now been removed please see the latest requirements for compiling from source: https://github.com/MaterialDesignInXAML/MaterialDesignInXamlToolkit/wiki/Compiling-From-Source
Most helpful comment
I have a PR in the works that will eliminate paket from the project in favor of just using NuGet directly. This should eliminate the issues people run into with paket and the timing of when it gets run. https://github.com/MaterialDesignInXAML/MaterialDesignInXamlToolkit/pull/2160