ionide / ionide-vscode-paket

VS Code plugin for Paket
http://ionide.io
MIT License
41 stars 29 forks source link

Install Package does not add reference to fsproj file #56

Closed davecarpie closed 6 years ago

davecarpie commented 6 years ago

When adding a new package to a project, the reference is not added to the .fsproj file This may be because of this line in the output

Please use the new syntax: 'project' has been replaced by '--project'.

See: https://github.com/ionide/ionide-vscode-paket/blob/master/src/paket.fs#L151

c:\Users\davecar\katas\2018-03-19\.paket\paket.exe
Paket version 5.153.0
Please use the new syntax: 'nuget' is the default argument and should be omitted.
Please use the new syntax: 'project' has been replaced by '--project'.
Adding FSharp.Data to c:\Users\davecar\katas\2018-03-19\paket.dependencies into group Main
Skipping resolver for group Build since it is already up-to-date
Resolving packages for group Main:
 - Expecto 7.0
 - Expecto.FsCheck 7.0
 - FSharp.Core 4.3.4
 - FSharp.Data 2.4.5
 - Argu 5.1
 - FsCheck 2.10.8
 - Mono.Cecil 0.10.0-beta7
Locked version resolution written to c:\Users\davecar\katas\2018-03-19\paket.lock
Dependencies files saved to c:\Users\davecar\katas\2018-03-19\paket.dependencies
Adding package FSharp.Data to c:\Users\davecar\katas\2018-03-19\test\test\paket.references into group Main
References file saved to c:\Users\davecar\katas\2018-03-19\test\test\paket.references
 - Creating model and downloading packages.
Downloading FSharp.Data 2.4.5
Download of FSharp.Data 2.4.5 done in 1 second.
 - test/test/paket.references -> test/test/test.fsproj
Performance:
 - Resolver: 1 second (1 runs)
    - Runtime: 198 milliseconds
    - Blocked (retrieving package details): 1 second (5 times)
    - Blocked (retrieving package versions): 100 milliseconds (1 times)
    - Not Blocked (retrieving package details): 2 times
 - Disk IO: 1 second
 - Average Download Time: 1 second
 - Number of downloads: 1
 - Average Request Time: 173 milliseconds
 - Number of Requests: 8
 - Runtime: 6 seconds
kerams commented 6 years ago

This seems to be a Paket problem. When I use it directly with the new syntax, the fsproj is still unchanged.

kerams commented 6 years ago

Well, apparently <Import Project="..\..\.paket\Paket.Restore.targets" /> is the only thing added to fsproj files -- https://fsprojects.github.io/Paket/paket-and-dotnet-cli.html

forki commented 6 years ago

Yes things are not added directly to the fsproj, but at resolve time PackageReferences tags are added in memory.

kerams commented 6 years ago

I still don't seem to be able to build it with 2.1.101 though.