Nathan
Nathan

Reputation: 6216

asp.net core 2.0 unable to delete PreCompiledViews.dll

I have an asp.net core 2.0 web application.

When I publish it to a web server (using a UNC path), the [AppName].PrecompiledViews.dll becomes locked and I'm unable to delete it (and therefore can't re-publish the app).

I've tried manually deleting the file(s) - everything deletes fine, except for this one dll... and I don't have permission to go and restart the IIS worker process to free the lock, so I'm at a loss as to what to do... waiting for the app to recycle is my current best plan.

Any suggestions are welcome.

(Using the following:)

Microsoft Visual Studio Community 2017 Version 15.4.2 VisualStudio.15.Release/15.4.2+27004.2006 Microsoft .NET Framework Version 4.7.02046

Installed Version: Community

Visual Basic 2017 00369-60000-00001-AA538 Microsoft Visual Basic 2017

Visual C# 2017 00369-60000-00001-AA538 Microsoft Visual C# 2017

Visual F# 4.1 00369-60000-00001-AA538 Microsoft Visual F# 4.1

Application Insights Tools for Visual Studio Package 8.9.00809.2 Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2017 15.0.30925.0 ASP.NET and Web Tools 2017

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

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

Azure App Service Tools v3.0.0 15.0.30915.0 Azure App Service Tools v3.0.0

Azure Data Lake Node 1.0 This package contains the Data Lake integration nodes for Server Explorer.

Azure Data Lake Tools for Visual Studio 2.2.9000.1 Microsoft Azure Data Lake Tools for Visual Studio

Azure Data Lake Tools for Visual Studio 2.2.9000.1 Microsoft Azure Data Lake Tools for Visual Studio

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

Cookiecutter 3.0.17297.4 Provides tools for finding, instantiating and customizing templates in cookiecutter format.

Fabric.DiagnosticEvents 1.0 Fabric Diagnostic Events

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

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

Microsoft Azure HDInsight Azure Node 2.2.9000.1 HDInsight Node under Azure Node

Microsoft Azure Hive Query Language Service 2.2.9000.1 Language service for Hive query

Microsoft Azure Service Fabric Tools for Visual Studio 1.8 Microsoft Azure Service Fabric Tools for Visual Studio

Microsoft Azure Stream Analytics Language Service 2.2.9000.1 Language service for Azure Stream Analytics

Microsoft Azure Stream Analytics Node 1.0 Azure Stream Analytics Node under Azure Node

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

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 Studio VC Package 1.0 Microsoft Visual Studio VC Package

Mono Debugging for Visual Studio 4.7.4-pre (c2d89eb) Support for debugging Mono processes with Visual Studio.

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

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

Python 3.0.17297.4 Provides IntelliSense, projects, templates, debugging, interactive windows, and other support for Python developers.

Python - Django support 3.0.17297.4 Provides templates and integration for the Django web framework.

Python - IronPython support 3.0.17297.4 Provides templates and integration for IronPython-based projects.

Python - Profiling support 3.0.17297.4 Profiling support for Python projects.

R Tools for Visual Studio 1.2.30905.1244 Provides project system, R Interactive window, plotting, and more for the R programming language.

SQL Server Data Tools 15.1.61707.200 Microsoft SQL Server Data Tools

ToolWindowHostedEditor 1.0 Hosting json editor into a tool window

TypeScript 2.3.5.0 TypeScript tools for Visual Studio

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 Universal Windows Apps 15.0.27004.2006 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.IoT 1.0 Package with IoT components for Visual Studio

VisualStudio.Mac 1.0 Mac Extension for Visual Studio

WebJobs Tools v1.0.0 15.0.30915.0 WebJobs Tools v1.0.0

Xamarin 4.7.10.33 (70936af) Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android SDK 8.0.2.1 (HEAD/c2a33d8ea) Xamarin.Android Reference Assemblies and MSBuild support.

Xamarin.iOS and Xamarin.Mac SDK 11.2.1.0 (12e80e0) Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

Upvotes: 0

Views: 549

Answers (1)

Fidel Garcia
Fidel Garcia

Reputation: 417

This work for me deploying from appveyor to an azure server:

You can configure the appOffline rule in the publishing profile (.pubxml). Add the EnableMSDeployAppOffline element to the PropertyGroup like this:

<PropertyGroup>
  <EnableMSDeployAppOffline>true</EnableMSDeployAppOffline>
</PropertyGroup>

This is the link to the Microsoft documentation: https://learn.microsoft.com/en-us/iis/publish/troubleshooting-web-deploy/web-deploy-error-codes#errorfileinuse

Upvotes: 0

Related Questions