Open RehanSaeed opened 4 years ago
This feels like a simple but effective usability improvement since dotnet already knows that a restore is needed: Run "dotnet tool restore" to make the "fake" command available.
It would allow us to remove what feels like an unnecessary extra instruction for users of the SAFE Template.
I agree. It would allow me to remove this code from every project:
Probably not worth looking into if this is made automatic, but I can't seem to get "dotnet tool restore" to work if run from from an ExecTask as mentioned above. Using VS for mac and the following:
<Target Name="Restore Local Tools" AfterTargets="BeforeBuild">
<Exec Command="dotnet tool restore" />
</Target>
Building results with:
Error: Unable to get repository signature information for source https://api.nuget.org/v3-index/repository-signatures/5.0.0/index.json.
Error: Could not load file or assembly 'System.Security.Permissions, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.
It works as expected if I run "dotnet build" on the csproj from a terminal. Anyone seen anything like this before?
+1 this is very annoying that it doesn't do this automatically
please add support for this feature
If the directory where you put your project has special characters you are going to have an error when doing the dotnet commands
If the directory where you put your project has special characters you are going to have an error when doing the dotnet commands
@MartinAmaral that's probably true. @IslamMeligy fact an issue with running a dotnet application one and then discovered that on this machine the source code was nested under a folder that started with #
, which was valid for Windows, but was a problem for dotnet.
However, this is probably another issue separate from the one we are commenting on.
As a first step, we should at least empower tool authors to detect if their tools aren't available when they're used in the build. I wrote https://github.com/dotnet/sdk/issues/38883 to capture this need.
This is really necessary feature.
Before I run a tool (e.g. dotnet cake) from my dotnet tool manifest file (shown below), I have to remember to run
dotnet tool restore
first.Similar to how
dotnet build
now automatically runsdotnet restore
for you, can runningdotnet cake
also rundotnet tool restore
for me?