question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Design-time builds should not lock tasks coming from packages

See original GitHub issue

From @jasonwilliams200OK on March 8, 2016 9:11

Steps to Reproduce:

  1. Open a project in VS2015 which has dependency on Microsoft.Bcl.Build.Tasks.dll.
  2. Build the project and keep the project opened.
  3. While the project is still opened in VS after the build, open cmd and cd into the solution directory and run rmdir /s/q packages (or PowerShell’s rm -r -fo packages).
    • Alternatively, if the project is under git SC, run git clean -xdf command in cmd/ps, everything which is not under source control gets deleted, except for Microsoft.Bcl.Build.Tasks.dll.

Expected Behavior: packages folder gets deleted. VS should release the handle to resource in user space, when there is no user-driven operation going on.

Actual Behavior: packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.Tasks.dll - Access is denied. VS2015 does not release handle to this particular file unless we close the solution and kill devenv and wait for like 20 extra seconds before user gets a chance to remove the packages folder.

Copied from original issue: dotnet/roslyn#9554

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:19 (19 by maintainers)

github_iconTop GitHub Comments

1reaction
davkeancommented, May 13, 2016

This won’t be backported to VS14. CPS is the “Common Project System”, the base infrastructure that we’re building the new project system on.

The new project system hasn’t been turned on in VS15 yet - so there’s nothing to verify yet - here’s our roadmap of when it will be enabled: https://github.com/dotnet/roslyn-project-system/blob/master/docs/Roadmap.md

0reactions
davkeancommented, Mar 22, 2017

I’m going to mark this as completed - there’s really no other work that we plan on doing around this. C#/VB CPS-based projects perform out-of-proc design-time and official builds - devenv.exe will no longer lock tasks when using those project types.

The legacy project system still performs design-time builds in-proc, and still suffers from this problem - there are no plans to change that design. In a future Visual Studio version, all C#/VB project types will replaced by the new project system, see the roadmap: https://github.com/dotnet/roslyn-project-system/blob/master/docs/repo/roadmap.md.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Design-time builds should not lock tasks coming from ...
Steps to Reproduce: Open a project in VS2015 which has dependency on Microsoft.Bcl.Build.Tasks.dll. Build the project and keep the project ...
Read more >
Chasing an MSBuild task devenv.exe file lock
This file locking behavior has been quite odd and confusing, since MSBuild and VS teams have been making lots of changes to make...
Read more >
.NET Framework: Build outputs behaving strangely under ...
It does have the drawback of occasionally locking assemblies that are required for build (Task assemblies), but it should not hold locks on...
Read more >
Design-time errors - Windows Forms .NET
Learn about some of the common errors that occur when the Windows Forms Designer fails to load.
Read more >
Unable to create an object of type 'ApplicationDbContext ...
I found the cause of this error could be multiple things in your code. For me at least, the best way was to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found