Temp file collision when building with csc.exe

  • Thread starter Thread starter Sune Foldager
  • Start date Start date
S

Sune Foldager

We use a build system which compiles in 3-6 processes in parallel, using
the csc.exe program (usually via the .NET interface to it). To save time
copying resulting build products, we set the output directory to the destination
we want directly, instead of building each project to its own local location
and copying the results.

Sometimes a project will fail with a message something like:

c:\src\dev\GAF\Release\client\CSCD59A.tmp: error CS1567: Error generating
Win32 resource: The process cannot access the file because it is being used
by another process.

Investigating further, it seems csc produces a lot of files like that, CSCxxxx.tmp,
in the destination directory during compile, and removes them as soon as
it's done. The file names also seem to be very poorly protected from being
unique; it seems mostly like an increasing sequence of numbers. So my theory
is that it's simply a collision between the parallel build processes that
is the cause.

Why it doesn't use the (at any point in time) unique process id as part of
the name of the temp file is beyond me. Does anyone know of a way to get
around this other than building in another directory and copying stuff around?

Thanks in advance, and I really hope MS considers fixing this problem in
upcoming releases. Please use a more unique name, involving the process identifier
or similar :).

Sincerly,
Sune Foldager
Edlund A/S
 
Hello Sune,

I apologize for the delayed response. This is a quick note to let you know
that I am performing research on this issue and will get back to you as
soon as possible. I appreciate your patience.

Best regards,
Feng Chen
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications .

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx .
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Hello Sune,

Thanks for your valuable feedback. I consulted the product group, studied
the C# compiler's command-line options, so I found that the C# compiler has
not expose any option can let us control the name of the temp files being
used during the compile process. And I agree that this behavior less
desirable.

It is my pleasure to help send a wish to our product group via internal
channel. You are also welcome to submit this issue as a feature request to
the following site in the formal way:
https://connect.microsoft.com/VisualStudio

As we strive to capture any and all product feedback so as to ensure that
we are continuously developing Microsoft products to meet customer needs,
feedback such as yours is always taken very seriously. It is appreciated
that you can paste the suggestion's link here after you submit the ticket
in https://connect.microsoft.com/VisualStudio, so that other community
members can benefit from it.

If you have any other question or concern about this issue, feel free to
tell me.

Thanks.

Best regards,
Feng Chen
Microsoft Online Community Support
=========================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Hello sune,

I am currently standing by for an update from you and would like to know
how things are going there. Should you have any questions or concerns on
the recent information I've provided to you, please don't hesitate to let
me know directly.

Best regards,
Feng Chen
Microsoft Online Community Support
=========================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Hi Feng,
I am currently standing by for an update from you and would like to
know how things are going there. Should you have any questions or
concerns on the recent information I've provided to you, please don't
hesitate to let me know directly.

Thanks a lot. Yes, it would be great if you would forward a wish (to change
the naming scheme for temp files) via an internal channel, as you meantioned
in your previous post. I think a good idea would be to make sure the name
includes the current process identifier, which seems to be the norm on other
platforms as well. That way the problem should go away.

If you would like me to post the request to connect as well, or anything
else, please let me know.

Sincerly,
Sune Foldager.
 
Hello Sune,

I have sent this issue to the product group through internal escalation
channel.

At the same time, I also suggest that you can submit this issue to our
connect portal since it will be easier for the product group to respond to
issues logged from customer through the connect portal. You can also watch
it and directly send any comment to the product team which will handle this
issue. Other community members having similar issues can also find and vote
on it.

Thanks again for your time and valuable feedback.

Best regards,
Feng Chen
Microsoft Online Community Support
=========================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Hello Sune,

How are things going? I would appreciate it if you could let me know the
status of the issue. If you have any questions or concerns, please don't
hesitate to let me know.

Best regards,
Feng Chen
Microsoft Online Community Support
=========================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Hello Feng,
How are things going? I would appreciate it if you could let me know
the status of the issue. If you have any questions or concerns, please
don't hesitate to let me know.

Sorry for the delay; I have now created a connect issue with ID 370582, mentioning
that it was discussed in this newsgroup with feedback from you. Let me know
if there is anything else I should do :-). Thank you for your help and feedback.

Regards,
Sune Foldage
 
Hello,

Thank again you for your feedback. Currently our developers are aware of
this issue already. They will take this into serious account when designing
the future releases of the products.

Best regards,
Feng Chen
Microsoft Online Community Support
=========================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).
 
Back
Top