Closed cwchapma closed 7 years ago
For the most part the Feature template is at the bottom of that (and it mentions a blank slate).
Isn't this as simple as:
diff --git a/src/chocolatey/infrastructure/services/XmlService.cs b/src/chocolatey/infrastructure/services/XmlService.cs
index 00619f6..032e87d 100644
--- a/src/chocolatey/infrastructure/services/XmlService.cs
+++ b/src/chocolatey/infrastructure/services/XmlService.cs
@@ -19,6 +19,7 @@ namespace chocolatey.infrastructure.services
using System.Text;
using System.Xml;
using System.Xml.Serialization;
+ using System.Diagnostics;
using cryptography;
using filesystem;
using tolerance;
@@ -65,7 +66,7 @@ namespace chocolatey.infrastructure.services
{
_fileSystem.create_directory_if_not_exists(_fileSystem.get_directory_name(xmlFilePath));
- var xmlUpdateFilePath = xmlFilePath + ".update";
+ var xmlUpdateFilePath = xmlFilePath + ".update" + Process.GetCurrentProcess().Id().ToString();
FaultTolerance.try_catch_with_logging_exception(
() =>
Possibly - what happens in the case of multiple update files though?
Similar work for this is in #1258, and there is a PR for that, so we will close this as a duplicate. Follow along on 1258 for updates. Thanks!
Removing from milestone as a duplicate
What You Are Seeing?
The process cannot access the file 'C:\ProgramData\chocolatey\config\chocolatey.config.update' because it is being used by another process.
What is Expected?
Parallel builds should just work ;)
How Did You Get This To Happen? (Steps to Reproduce)
I have a Visual Studio 2013 solution that builds many packages. By default, Visual Studio builds projects in parallel. I often get the above error with Chocolatey v0.9.9.11
Output Log
Visual Studio output: