Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

always generates load scripts? #175

Open
ntwilson opened this issue Apr 2, 2019 · 2 comments
Open

always generates load scripts? #175

ntwilson opened this issue Apr 2, 2019 · 2 comments

Comments

@ntwilson
Copy link

ntwilson commented Apr 2, 2019

Description

Whenever I restore from Visual Studio, it always generates a ".paket/load" folder with load scripts. I have tried putting generate_load_scripts: false in my paket.dependencies file, as well as just removing any mention of generate_load_scripts. This is only an issue because sometimes I use VS Code as well, and OmniSharp (the plugin for C# in VS Code) will crash VS Code entirely if I open a folder that contains load scripts.

Repro steps

Please provide the steps required to reproduce the problem

  1. Create a solution containing C# projects that uses paket.

  2. Add generate_load_scripts: false to the top of the paket.dependencies file.

  3. Set the VS setting to "Automatically restore packages during build in Visual"

  4. Build the solution in VS

Expected behavior

The .paket folder would only contain paket.exe, paket.Restore.targets, and paket.targets

Actual behavior

The .paket folder also contains a "load" folder with load scripts.

Known workarounds

Delete the load folder manually each time you open VS Code.

Related information

  • Operating system: Win 10
  • Branch: Installed from the extension marketplace
  • .NET Runtime Version: ? Of my solution? net471
  • Performance information, links to performance testing scripts: none
@forki
Copy link
Member

forki commented Apr 3, 2019 via email

@ntwilson
Copy link
Author

ntwilson commented Apr 3, 2019

Okay, I had some trouble reproducing it from scratch, and learned more about the problem. Apparently it happens when your paket.dependencies file and paket.lock file are out-of-sync. Using the CLI, paket.dependencies wins (if you say generate_load_scripts: false in paket.dependencies, it doesn't matter what's in the paket.lock). Using the VS extension, the paket.lock file wins (if you have GENERATE-LOAD-SCRIPTS: ON at the top of your lock file, it doesn't matter what's in paket.dependencies). That's what threw me off. I have that situation replicated in the zip file attached. If you look in paket.dependencies, it says generate_load_scripts: false, but if you open the .sln file in VS and build, it will produce a .paket/load folder.
Now that I know the cause and the fix, it's quite easy for me to workaround, so I guess this issue is just FYI. Feel free to close if you want.

vs-paket-trouble.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants