Visual Studio 2017 требует перезагрузки после исключения во время отладки - PullRequest
0 голосов
/ 22 мая 2018

У меня странная проблема в Visual Studio 2017 (версия 15.7.1).Visual Studio не удается построить после возникновения исключения во время сеанса отладки.Это происходит в проекте WebApi, который использует net462.Одна из используемых библиотек - это пользовательская библиотека, встроенная в .NET 4.6.2, которая использует Entity Framework 6, Automapper и LinqKit.

После исключения, если я пытаюсь собрать, я получаю следующие ошибки сборкии мне нужно перезапустить Visual Studio, чтобы получить успешную сборку:

1>Build FAILED.
1>
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(5033,5): warning MSB3061: Unable to delete file "C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\WebApiApplication.exe". Access to the path 'C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\WebApiApplication.exe' is denied.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(5033,5): warning MSB3061: Unable to delete file "C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\AutoMapper.dll". Access to the path 'C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\AutoMapper.dll' is denied.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(5033,5): warning MSB3061: Unable to delete file "C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\EntityFramework.SqlServer.dll". Access to the path 'C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\EntityFramework.SqlServer.dll' is denied.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(5033,5): warning MSB3061: Unable to delete file "C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\EntityFramework.dll". Access to the path 'C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\EntityFramework.dll' is denied.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(5033,5): warning MSB3061: Unable to delete file "C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.AspNetCore.DataProtection.dll". Access to the path 'C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.AspNetCore.DataProtection.dll' is denied.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(5033,5): warning MSB3061: Unable to delete file "C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.AspNetCore.Diagnostics.dll". Access to the path 'C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.AspNetCore.Diagnostics.dll' is denied.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(5033,5): warning MSB3061: Unable to delete file "C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.AspNetCore.Hosting.dll". Access to the path 'C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.AspNetCore.Hosting.dll' is denied.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(5033,5): warning MSB3061: Unable to delete file "C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.AspNetCore.Http.dll". Access to the path 'C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.AspNetCore.Http.dll' is denied.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(5033,5): warning MSB3061: Unable to delete file "C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.AspNetCore.Http.Abstractions.dll". Access to the path 'C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.AspNetCore.Http.Abstractions.dll' is denied.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(5033,5): warning MSB3061: Unable to delete file "C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.AspNetCore.Mvc.Abstractions.dll". Access to the path 'C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.AspNetCore.Mvc.Abstractions.dll' is denied.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(5033,5): warning MSB3061: Unable to delete file "C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.AspNetCore.Mvc.Core.dll". Access to the path 'C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.AspNetCore.Mvc.Core.dll' is denied.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(5033,5): warning MSB3061: Unable to delete file "C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.AspNetCore.Mvc.Razor.dll". Access to the path 'C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.AspNetCore.Mvc.Razor.dll' is denied.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(5033,5): warning MSB3061: Unable to delete file "C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.AspNetCore.Mvc.Razor.Extensions.dll". Access to the path 'C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.AspNetCore.Mvc.Razor.Extensions.dll' is denied.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(5033,5): warning MSB3061: Unable to delete file "C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.AspNetCore.Mvc.RazorPages.dll". Access to the path 'C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.AspNetCore.Mvc.RazorPages.dll' is denied.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(5033,5): warning MSB3061: Unable to delete file "C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.AspNetCore.Mvc.TagHelpers.dll". Access to the path 'C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.AspNetCore.Mvc.TagHelpers.dll' is denied.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(5033,5): warning MSB3061: Unable to delete file "C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.AspNetCore.Mvc.ViewFeatures.dll". Access to the path 'C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.AspNetCore.Mvc.ViewFeatures.dll' is denied.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(5033,5): warning MSB3061: Unable to delete file "C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.AspNetCore.Razor.Language.dll". Access to the path 'C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.AspNetCore.Razor.Language.dll' is denied.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(5033,5): warning MSB3061: Unable to delete file "C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.AspNetCore.Routing.dll". Access to the path 'C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.AspNetCore.Routing.dll' is denied.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(5033,5): warning MSB3061: Unable to delete file "C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.AspNetCore.Server.Kestrel.Core.dll". Access to the path 'C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.AspNetCore.Server.Kestrel.Core.dll' is denied.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(5033,5): warning MSB3061: Unable to delete file "C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.dll". Access to the path 'C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.dll' is denied.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(5033,5): warning MSB3061: Unable to delete file "C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.dll". Access to the path 'C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.dll' is denied.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(5033,5): warning MSB3061: Unable to delete file "C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.AspNetCore.StaticFiles.dll". Access to the path 'C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.AspNetCore.StaticFiles.dll' is denied.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(5033,5): warning MSB3061: Unable to delete file "C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.AspNetCore.WebUtilities.dll". Access to the path 'C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.AspNetCore.WebUtilities.dll' is denied.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(5033,5): warning MSB3061: Unable to delete file "C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.CodeAnalysis.dll". Access to the path 'C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.CodeAnalysis.dll' is denied.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(5033,5): warning MSB3061: Unable to delete file "C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.CodeAnalysis.CSharp.dll". Access to the path 'C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.CodeAnalysis.CSharp.dll' is denied.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(5033,5): warning MSB3061: Unable to delete file "C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.IdentityModel.Protocols.OpenIdConnect.dll". Access to the path 'C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.IdentityModel.Protocols.OpenIdConnect.dll' is denied.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(5033,5): warning MSB3061: Unable to delete file "C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.IdentityModel.Tokens.dll". Access to the path 'C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.IdentityModel.Tokens.dll' is denied.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(5033,5): warning MSB3061: Unable to delete file "C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.Net.Http.Headers.dll". Access to the path 'C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.Net.Http.Headers.dll' is denied.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(5033,5): warning MSB3061: Unable to delete file "C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.VisualStudio.Web.CodeGeneration.Core.dll". Access to the path 'C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.VisualStudio.Web.CodeGeneration.Core.dll' is denied.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(5033,5): warning MSB3061: Unable to delete file "C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.VisualStudio.Web.CodeGeneration.EntityFrameworkCore.dll". Access to the path 'C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.VisualStudio.Web.CodeGeneration.EntityFrameworkCore.dll' is denied.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(5033,5): warning MSB3061: Unable to delete file "C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.VisualStudio.Web.CodeGenerators.Mvc.dll". Access to the path 'C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Microsoft.VisualStudio.Web.CodeGenerators.Mvc.dll' is denied.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(5033,5): warning MSB3061: Unable to delete file "C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Newtonsoft.Json.dll". Access to the path 'C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Newtonsoft.Json.dll' is denied.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(5033,5): warning MSB3061: Unable to delete file "C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Swashbuckle.AspNetCore.SwaggerUI.dll". Access to the path 'C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Swashbuckle.AspNetCore.SwaggerUI.dll' is denied.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(5033,5): warning MSB3061: Unable to delete file "C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\System.Collections.Immutable.dll". Access to the path 'C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\System.Collections.Immutable.dll' is denied.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(5033,5): warning MSB3061: Unable to delete file "C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\System.IdentityModel.Tokens.Jwt.dll". Access to the path 'C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\System.IdentityModel.Tokens.Jwt.dll' is denied.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(5033,5): warning MSB3061: Unable to delete file "C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\System.Numerics.Vectors.dll". Access to the path 'C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\System.Numerics.Vectors.dll' is denied.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(5033,5): warning MSB3061: Unable to delete file "C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\System.Net.Http.dll". Access to the path 'C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\System.Net.Http.dll' is denied.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(5033,5): warning MSB3061: Unable to delete file "C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\System.ValueTuple.dll". Access to the path 'C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\System.ValueTuple.dll' is denied.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(5033,5): warning MSB3061: Unable to delete file "C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Camms.Wapi.Common.dll". Access to the path 'C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Camms.Wapi.Common.dll' is denied.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(5033,5): warning MSB3061: Unable to delete file "C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\CAMMS.WAPI.Repository.dll". Access to the path 'C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\CAMMS.WAPI.Repository.dll' is denied.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(5033,5): warning MSB3061: Unable to delete file "C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Oracle.ManagedDataAccess.EntityFramework.dll". Access to the path 'C:\PATH_TO_PROJECT_FOLDER\bin\Debug\net462\Oracle.ManagedDataAccess.EntityFramework.dll' is denied.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(4172,5): warning MSB3026: Could not copy "obj\Debug\net462\WebApiApplication.exe" to "bin\Debug\net462\WebApiApplication.exe". Beginning retry 1 in 1000ms. The process cannot access the file 'bin\Debug\net462\WebApiApplication.exe' because it is being used by another process. The file is locked by: "Microsoft Visual Studio 2017 (9520)"
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(4172,5): warning MSB3026: Could not copy "obj\Debug\net462\WebApiApplication.exe" to "bin\Debug\net462\WebApiApplication.exe". Beginning retry 2 in 1000ms. The process cannot access the file 'bin\Debug\net462\WebApiApplication.exe' because it is being used by another process. The file is locked by: "Microsoft Visual Studio 2017 (9520)"
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(4172,5): warning MSB3026: Could not copy "obj\Debug\net462\WebApiApplication.exe" to "bin\Debug\net462\WebApiApplication.exe". Beginning retry 3 in 1000ms. The process cannot access the file 'bin\Debug\net462\WebApiApplication.exe' because it is being used by another process. The file is locked by: "Microsoft Visual Studio 2017 (9520)"
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(4172,5): warning MSB3026: Could not copy "obj\Debug\net462\WebApiApplication.exe" to "bin\Debug\net462\WebApiApplication.exe". Beginning retry 4 in 1000ms. The process cannot access the file 'bin\Debug\net462\WebApiApplication.exe' because it is being used by another process. The file is locked by: "Microsoft Visual Studio 2017 (9520)"
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(4172,5): warning MSB3026: Could not copy "obj\Debug\net462\WebApiApplication.exe" to "bin\Debug\net462\WebApiApplication.exe". Beginning retry 5 in 1000ms. The process cannot access the file 'bin\Debug\net462\WebApiApplication.exe' because it is being used by another process. The file is locked by: "Microsoft Visual Studio 2017 (9520)"
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(4172,5): warning MSB3026: Could not copy "obj\Debug\net462\WebApiApplication.exe" to "bin\Debug\net462\WebApiApplication.exe". Beginning retry 6 in 1000ms. The process cannot access the file 'bin\Debug\net462\WebApiApplication.exe' because it is being used by another process. The file is locked by: "Microsoft Visual Studio 2017 (9520)"
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(4172,5): warning MSB3026: Could not copy "obj\Debug\net462\WebApiApplication.exe" to "bin\Debug\net462\WebApiApplication.exe". Beginning retry 7 in 1000ms. The process cannot access the file 'bin\Debug\net462\WebApiApplication.exe' because it is being used by another process. The file is locked by: "Microsoft Visual Studio 2017 (9520)"
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(4172,5): warning MSB3026: Could not copy "obj\Debug\net462\WebApiApplication.exe" to "bin\Debug\net462\WebApiApplication.exe". Beginning retry 8 in 1000ms. The process cannot access the file 'bin\Debug\net462\WebApiApplication.exe' because it is being used by another process. The file is locked by: "Microsoft Visual Studio 2017 (9520)"
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(4172,5): warning MSB3026: Could not copy "obj\Debug\net462\WebApiApplication.exe" to "bin\Debug\net462\WebApiApplication.exe". Beginning retry 9 in 1000ms. The process cannot access the file 'bin\Debug\net462\WebApiApplication.exe' because it is being used by another process. The file is locked by: "Microsoft Visual Studio 2017 (9520)"
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(4172,5): warning MSB3026: Could not copy "obj\Debug\net462\WebApiApplication.exe" to "bin\Debug\net462\WebApiApplication.exe". Beginning retry 10 in 1000ms. The process cannot access the file 'bin\Debug\net462\WebApiApplication.exe' because it is being used by another process. The file is locked by: "Microsoft Visual Studio 2017 (9520)"
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(4172,5): error MSB3027: Could not copy "obj\Debug\net462\WebApiApplication.exe" to "bin\Debug\net462\WebApiApplication.exe". Exceeded retry count of 10. Failed. The file is locked by: "Microsoft Visual Studio 2017 (9520)"
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(4172,5): error MSB3021: Unable to copy file "obj\Debug\net462\WebApiApplication.exe" to "bin\Debug\net462\WebApiApplication.exe". The process cannot access the file 'bin\Debug\net462\WebApiApplication.exe' because it is being used by another process.

Вот информация об установке для моей Visual Studio:

Microsoft Visual Studio Enterprise 2017 
Version 15.7.1
VisualStudio.15.Release/15.7.1+27703.2000
Microsoft .NET Framework
Version 4.7.02556

Installed Version: Enterprise

Architecture Diagrams and Analysis Tools   00369-60000-00001-AA311
Microsoft Architecture Diagrams and Analysis Tools

Visual C++ 2017   00369-60000-00001-AA311
Microsoft Visual C++ 2017

ActiveReports 11   11.2.10750.0
The first report writer for Microsoft .NET

Application Insights Tools for Visual Studio Package   8.12.10405.1
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2017   15.0.40501.0
ASP.NET and Web Tools 2017

ASP.NET Core Razor Language Services   15.7.31476
Provides languages services for ASP.NET Core Razor.

ASP.NET Web Frameworks and Tools 2012   4.0.21208.0
For additional information, visit https://www.asp.net/

ASP.NET Web Frameworks and Tools 2017   5.2.60419.0
For additional information, visit https://www.asp.net/

Azure App Service Tools v3.0.0   15.0.40424.0
Azure App Service Tools v3.0.0

C# Tools   2.8.0-beta6-62830-08. Commit Hash: e595ee276d14e14bfb3eb323fb57f2aa668bddea
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools   1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

JavaScript Language Service   2.0
JavaScript Language Service

JavaScript Project System   2.0
JavaScript Project System

JavaScript UWP Project System   2.0
JavaScript UWP Project System

JetBrains ReSharper Ultimate 2018.1    Build 112.0.20180414.70444
JetBrains ReSharper Ultimate package for Microsoft Visual Studio. For more information about ReSharper Ultimate, visit http://www.jetbrains.com/resharper. Copyright © 2018 JetBrains, Inc.

Merq   1.1.17-rc (cba4571)
Command Bus, Event Stream and Async Manager for Visual Studio extensions.

Microsoft Azure Tools   2.9
Microsoft Azure Tools for Microsoft Visual Studio 2017 - v2.9.10420.2

Microsoft Continuous Delivery Tools for Visual Studio   0.3
Simplifying the configuration of continuous build integration and continuous build delivery from within the Visual Studio IDE.

Microsoft JVM Debugger   1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft MI-Based Debugger   1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual C++ Wizards   1.0
Microsoft Visual C++ Wizards

Microsoft Visual Studio Tools for Containers   1.1
Develop, run, validate your ASP.NET Core applications in the target environment. F5 your application directly into a container with debugging, or CTRL + F5 to edit & refresh your app without having to rebuild the container.

Microsoft Visual Studio VC Package   1.0
Microsoft Visual Studio VC Package

Mono Debugging for Visual Studio   4.10.5-pre (ab58725)
Support for debugging Mono processes with Visual Studio.

Node.js Tools   1.4.11027.3
Adds support for developing and debugging Node.js apps in Visual Studio

NuGet Package Manager   4.6.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

ProjectServicesPackage Extension   1.0
ProjectServicesPackage Visual Studio Extension Detailed Info

ResourcePackage Extension   1.0
ResourcePackage Visual Studio Extension Detailed Info

Sandcastle Help File Builder   SHFB
Visual Studio integration for the Sandcastle Help File Builder.
https://GitHub.com/EWSoftware/SHFB

Snapshot Debugging Extension   1.0
Snapshot Debugging Visual Studio Extension Detailed Info

SQL Server Data Tools   15.1.61804.210
Microsoft SQL Server Data Tools

SQL Server Reporting Services   14.0.1016.246
Microsoft SQL Server Reporting Services Designers 
Version 14.0.1016.246

Syntax Visualizer   1.0
An extension for visualizing Roslyn SyntaxTrees.

TypeScript Tools   15.7.20419.2003
TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools   2.8.0-beta6-62830-08. Commit Hash: e595ee276d14e14bfb3eb323fb57f2aa668bddea
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual F# Tools 10.1 for F# 4.1   15.7.0.0.  Commit Hash: 16ecf5a30ad868d183c58e4a71a71c23d4ed3ba9.
Microsoft Visual F# Tools 10.1 for F# 4.1

Visual Studio Code Debug Adapter Host Package   1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

Visual Studio Tools for Apache Cordova   15.123.7408.1
Visual Studio Tools for Apache Cordova

Visual Studio Tools for Universal Windows Apps   15.0.27703.01
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

VisualStudio.Mac   1.0
Mac Extension for Visual Studio

Windows Machine Learning Generator Extension   1.0
Windows Machine Learning Visual Studio Extension Detailed Info

Xamarin   4.10.0.442 (396b18cef)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin Designer   4.12.264 (fc37cd02e)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.

Xamarin.Android SDK   8.3.0.19 (HEAD/342b2ce96)
Xamarin.Android Reference Assemblies and MSBuild support.

Xamarin.iOS and Xamarin.Mac SDK   11.10.1.177 (7e782c1)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

Я искал в Интернете, но яне могу найти ничего, даже отдаленно связанного.Я даже открыл справочную службу в Microsoft, но они хотели, чтобы я дал им небольшой проект, в котором воспроизведена проблема.Я не смог воспроизвести проблему за пределами нашего проприетарного кода, поэтому я не мог ничего им отправить.Однако я могу добавить, что если я удалю проект .NET 4.6.2 из микса, этого не произойдет.Поскольку это нереалистичное ожидание для нашего производственного кода, я ищу решение проблемы.

Это происходит не у всех в моей команде, только на моем компьютере.

Здесьвот что я пробовал:

  • Удалить папки bin и obj - это невозможно после исключения, поскольку в Visual Studio заблокированы файлы в этих папках.Их можно удалить после перезапуска и перед сеансом отладки.
  • Установить последнее обновление Visual Studio (15.7.1)
  • Отключить средства диагностики во время отладки
  • Отключить LiveМодульное тестирование во время сборки и отладки

Я в растерянности.Что я могу сделать, чтобы вернуть Visual Studio к сборке после исключения?Кто-нибудь еще видел подобное поведение?

Спасибо

1 Ответ

0 голосов
/ 25 мая 2018

После многих попыток исправить эту проблему, я в итоге решил удалить и переустановить Visual Studio.Это решило проблему.Я не переустанавливал все сторонние плагины (Resharper), поэтому я не уверен, что один из них был причиной.

Проблема ушла.Теперь я могу восстановить после исключения во время сеанса отладки.

Спасибо за все комментарии.

...