由于VS2017中的锁定文件,无法发布ASP.Net Razor应用程序 [英] Can't publish ASP.Net Razor app because of locked file in VS2017

查看:216
本文介绍了由于VS2017中的锁定文件,无法发布ASP.Net Razor应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个ASP.Net Razor网站,我在过去几年里一直在增强并成功发布到我们的内部网。我最近开始使用VS2017没有任何问题。今天,我在尝试发布时遇到错误:



错误       将文件.vs \ETF \ v15 \Server \sqlite3 \db.lock复制到C:\ Users \ myId \ AppData \ Local \Temp \WebSitePublish \ mySite-1436350714 \\ \\ obj\Debug\Package\PackageTmp \.vs \ETF \ v15 \ Server \sqlite3 \db.lock失败。该进程无法访问文件'.vs \ETF \ v15 \ Server \sqlite3 \db.lock'
,因为它正由另一个进程使用。



我尝试重新启动我的机器并在.vs \ETF \v15 \ Server \sqlite3文件夹中重命名db.lock,但当我在VS中启动项目并尝试再次发布时,它重新创建db.lock文件(使用当前时间戳),并给我相同的错误。我在app b
中使用SQL Server,但不知道sqlite3引用的来源。此外,目标目录中没有db.lock文件。



由于我的在线搜索毫无结果,所以我会非常感激。

I have an ASP.Net Razor web site that I've been enhancing and successfully publishing to our intranet for the last couple of years. I recently started using VS2017 with it without any problems. Today, I encountered an error when I tried to publish it:

Error       Copying file .vs\ETF\v15\Server\sqlite3\db.lock to C:\Users\myId\AppData\Local\Temp\WebSitePublish\mySite-1436350714\obj\Debug\Package\PackageTmp\.vs\ETF\v15\Server\sqlite3\db.lock failed. The process cannot access the file '.vs\ETF\v15\Server\sqlite3\db.lock' because it is being used by another process.

I tried restarting my machine and renaming db.lock in the .vs\ETF\v15\Server\sqlite3 folder, but when I start the project in VS and try to publish it again, it recreates db.lock file (with current timestamp), and gives me the same error. I use SQL Server in the app, but have no idea where the sqlite3 reference is coming from. Also there is no db.lock file in the destination directory.

Any ideas would be greatly appreciated as my online searches have been fruitless.

推荐答案

>>我最近开始使用VS2017而没有任何问题。今天,我在尝试发布时遇到错误

你能成功构建项目吗?

如果没有,请有看一下
thread

If not, please have a look at the thread:

你可以使用这个:
https: //github.com/github/gitignore/blob/master/VisualStudio.gitignore

如果您在添加.gitignore时遇到任何问题,可以按照以下文章进行操作:
https://elanderson.net/ 2016/09 / add-git-ignore-to-existing-visual-studio-project /

If you have any trouble adding the .gitignore, you could follow this article: https://elanderson.net/2016/09/add-git-ignore-to-existing-visual-studio-project/

如果您可以构建它,并且在发布时发生错误,请转到
Microsoft asp.net论坛
打开一个新主题来讨论它。

If you can build it, and error just occurs when you publish it, please go to Microsoft asp.net forum to open a new thread to talk about it.

最好的问候,

乔伊斯


这篇关于由于VS2017中的锁定文件,无法发布ASP.Net Razor应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆