Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error CS2012: Cannot open '<filename>' for writing, because used by another process #1359

Closed
attilah opened this issue Jun 20, 2017 · 4 comments
Assignees
Milestone

Comments

@attilah
Copy link

attilah commented Jun 20, 2017

Our Orleans.PlatformServices.dll is a multi targeted project and we're building it for Orleans.csproj as bootstrapping the code generator. We had a similar issue with 1.x tooling, but then it was working. We moved to .Net Core 2 Preview 1 tooling and the error surfaced again.

It seems very similar to: #739

Failed builds on CI can be found here: https://ci.dot.net/job/dotnet_orleans/job/master/job/netstandard-win-bvt_prtest/384/

We call the bootstrapping MSBuild here: https://github.com/dotnet/orleans/blob/master/vNext/src/Orleans/Orleans.csproj#L82

This is the proj file begin called: https://github.com/dotnet/orleans/blob/master/vNext/src/ClientGenerator/BootstrapCodegen.proj

@nguerrera nguerrera added this to the 2.0.x milestone Sep 19, 2017
@nguerrera nguerrera self-assigned this Sep 19, 2017
@nguerrera
Copy link
Contributor

nguerrera commented Sep 19, 2017

@attilah Those links are no longer available. Does this repro for you locally? Can you provide the full repro steps? Failing that, can you enable the /bl argument (see http://msbuildlog.com) and send us the resulting .binlog for a failed build?

@nguerrera
Copy link
Contributor

@attilah Do your errors always involve writing to an intermediate xml file. If so, use GenerateDocumentationFile=true instead of DocumentationFile=obj\MyProjectName.xml. Otherwise, multi-targeted builds will write to the same location for different TargetFrameworks in parallel.

@nguerrera
Copy link
Contributor

See #1599

@livarcocc
Copy link
Contributor

Closing as we haven't had activity here and need better repro steps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants