Bug 35848 - Build failed with error "Could not write lines to file "obj\Debug\Distech.Network.Data.Portable.vbproj.FileListAbsolute.txt". The [...]"
Summary: Build failed with error "Could not write lines to file "obj\Debug\Distech.Net...
Status: RESOLVED DUPLICATE of bug 36190
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: General ()
Version: 4.0.0 (C6)
Hardware: PC Windows
: --- major
Target Milestone: 4.0.0 (C6)
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-11-13 16:44 UTC by Guillaume
Modified: 2015-11-26 07:59 UTC (History)
8 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED DUPLICATE of bug 36190

Description Guillaume 2015-11-13 16:44:07 UTC
# Steps to reproduce
This issue is happening randomly and I currently do not have a stable reproduction pattern.
Must of the it happens when starting multiple debug sessions from Visual Studio by switching platform iPhone or iPhoneSimulator between runs

# Expected behavior
All debug sessions should start without issues or requiring more cleaning

# Actual behavior
Sometimes the build step fails with the error message
Could not write lines to file "obj\Debug\MyPclLibrary.vbproj.FileListAbsolute.txt". The process cannot access the file 'C:\Path\To\My\Solution\MyPclLibrary\obj\Debug\MyPclLibrary.vbproj.FileListAbsolute.txt' because it is being used by another process.
My current workaround is to restart every Visual Studio instances.

# Supplemental info (logs, images, videos)


# Test environment (full version information)
## Windows
Microsoft Visual Studio Enterprise 2015
Version 14.0.23107.0 D14REL
Xamarin   4.0.0.1686 (4a80730)

## MAC
Xamarin.iOS 9.2.151 (Business Edition)
Comment 1 Daniel Cazzulino 2015-11-14 22:06:12 UTC
Thanks a lot for reporting this. We're investigating, but we have a pretty good idea where this is coming from, and will have a fix in place very soon.

In the meantime, could you please try the following workaround?

1 - From an administrator command prompt, open C:\Program Files (x86)\MSBuild\[4.0|12.0|14.0]\Microsoft.Common.Targets\ImportAfter\Xamarin.Common.targets
2 - Edit line #, and add the following attribute to the WriteLinesToFile element: ContinueOnError="WarnAndContinue"

Let us know if it works, since that will most likely be the fix too.

Thanks in advance!
Comment 2 Jose Gallardo 2015-11-16 07:50:54 UTC
This issue seems pretty much a duplicate of 35850.
Please feel free to reopen if the provided workaround doesn't help. For now, marking it as a duplicate to keep things tidy.
You can follow up on the other bug.

Thanks for reporting!

*** This bug has been marked as a duplicate of bug 35850 ***
Comment 3 Boris Spinner 2015-11-19 07:52:06 UTC
You are not authorized to access bug #35850.
Comment 4 Brendan Zagaeski (Xamarin Team, assistant) 2015-11-24 00:30:18 UTC
I am replacing the non-public bug from Comment 2 with a cleaned-up public duplicate of the same issue for further public tracking.

*** This bug has been marked as a duplicate of bug 36190 ***