ProjectA references a Newtonsoft JSON.NET v4.5
ProjectB references the same Nuget package v7.0
Both projects have Octopack.
After TFS builds a deployment would fail because ProjectA’s OctoPack nuget contains v7.0 while ProjectB contains v4.5. Most of the time the deployment is fine. It happens intermittently in about 10% of cases. It is as if they swap versions or Octopack/TFS uses some shared directory for parallel builds and grabs the wrong version.
Is there any explanation for this behavior? We can upgrade both projects to 7.0 but the behavior is kind of weird.
Thanks for getting in touch. I’d suggest you’re right. OctoPack doesn’t do much beyond figure out what files should be packaged, and call NuGet to pack the files in to a .nupkg file.
The resulting .nupkg file will be the result of whatever files happen to be in the source folder(s) at the time NuGet is executed, and if TFS is changing those files you’ll get non-deterministic results.