[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework

Temp file collision when building with csc.exe

Sune Foldager

9/8/2008 7:50:00 AM

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


9 Answers

v-fengch

9/9/2008 8:42:00 AM

0

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:
msdnmg@microsoft.com.
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default....
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/de... .
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Peter Duniho

9/9/2008 4:21:00 PM

0

On Mon, 08 Sep 2008 00:49:30 -0700, Sune Foldager <sune@community.nospam>
wrote:

> [...]
> 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? [...]

I admit, I'm surprised that this problem still exists. It was an issue in
previous Microsoft compilers, long before C# was around. I thought that
they'd fixed it.

As for a work-around, "back in the way", the usual solution was to set the
TEMP environment variable to a directory unique for each process. That
way even if two processes used the same filename, the files would wind up
in different directories.

I don't know enough about the C# compiler to know if this work-around
still applies, but I'd guess it does.

Pete

v-fengch

9/10/2008 6:53:00 AM

0

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/Vi...

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/Vi..., 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:
msdnmg@microsoft.com.

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

v-fengch

9/12/2008 1:56:00 AM

0

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:
msdnmg@microsoft.com.
This posting is provided "AS IS" with no warranties, and confers no rights.

Sune Foldager

9/16/2008 6:27:00 AM

0

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.


Feng Chen[MSFT]

9/17/2008 6:08:00 AM

0

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:
msdnmg@microsoft.com.
This posting is provided "AS IS" with no warranties, and confers no rights.

"Sune Foldager" <sune@community.nospam> wrote in message
news:41ad1c9145c8cae5ed1ea782ef@msnews.microsoft.com...
> 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.
>
>

Feng Chen[MSFT]

9/19/2008 7:57:00 AM

0

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:
msdnmg@microsoft.com.

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

"Sune Foldager" <sune@community.nospam> wrote in message
news:41ad1c9145c8cae5ed1ea782ef@msnews.microsoft.com...
> 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.
>
>

Sune Foldager

9/29/2008 7:30:00 AM

0

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 Foldager


v-fengch

10/1/2008 10:36:00 AM

0

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:
msdnmg@microsoft.com.