Open RogerKratz opened 9 years ago
Which version of VS are we dealing with?
I know the problem you're talking about though, I'm just not sure the best way to deal with it. It has to do with how VS creates and manages it's own MSBuild instances. They load before the package restore has happened, and then they typically don't restart until VS is restarted.
VS 2013. I'm not sure version matters though (?).
I believe this is why gitignore/VisualStudio.gitignore does not exclude packages/build. https://github.com/github/gitignore/blob/master/VisualStudio.gitignore#L139
However, package restore seems to work fine for me without that inclusion. I just have a .gitignore
file (you could use .gitkeep
if you prefer) checked-in to 'node_modules' to ensure the directory exists.
(this is about node, but I guess the same problem exists for gulp, karma etc)
If you use this package with the package restore workflow (Enable NuGet Package Restore) the Ncapsulate.Node.targets is not there when the solution is first opened and the node_module won't be created.
To reproduce, use your NCapsulate.Example and "Enable Nuget Package Restore" on the solution. Then make sure packages folder as well as node_module folder are deleted. Then compile... First build, nothing is happen. To "fix" it you can reopen VS and compileagain or change any file to "force" a new compile, then it'll work (because earlier compiles have downloaded packages).