问题:

我有一个C# webforms应用程序,直到今天一直在webforms地工作。

今天,突然之间,每当我尝试运行该应用程序时,我都会收到文件锁定错误:

无法将文件“ obj \\ Debug \\ MyProject.exe”复制到“ bin \\ Debug \\ MyProject.exe”。 该进程无法访问文件“ bin \\ Debug \\ MyProject.exe”,因为它正在被另一个进程使用。

谷歌搜索错误不会带来明显的错误,即VS认为文件已锁定。 它是绝对的Visual Studio本身锁定文件,因为当我关闭VS并重新打开它,项目执行罚款-第一次。 当我尝试第二次运行它时,出现文件锁定错误。

每次我要运行该应用程序时,关闭VS并重新打开它都不可行! 如何找出锁定文件的内容,并阻止它被锁定?

编辑:另一个有趣的发现:我什至不必运行该应用程序。 编译一次会导致文件锁定。 我不能连续编译两次!

此问题特定于我的解决方案中的一个项目。 所有其他项目都可以正常工作,并且可以执行多次。 只是这个项目被锁定了。

I’ve got a C# webforms app, that until today had been working just swimmingly.Now today, all of a sudden, every time I try run the app, I get a file locking error:Unable to copy file “obj\\Debug\\MyProject.exe” to “bin\\Debug\\MyProject.exe”.The process cannot access the file “bin\\Debug\\MyProject.exe” because it is being used by another process.Googling the error doesn’t come up with anything beyond the obvious, ie VS thinks the file is locked.And it is definitely Visual Studio itself that locks the file, because when I close VS and reopen it, the project executes fine – the first time.When I try to run it a second time, I get the file locking error.Closing VS and reopening every time I want to run the app is not a viable workaround!How do I find out what’s locking the file, and stop it from getting locked?EDIT: Another interesting discovery: I don’t even have to run the app.Just compiling it once causes the file locking;I cannot compile twice in a row!This problem is specific to one project in my solution.All other projects work fine and can be executed as many times as I like.It’s only this one project that gets itself locked up.

问题:

在自动构建中使用devenv时,我一直收到此错误。 我已经浏览了我能找到的每个网站,并且通常的答案提到了刷新的依赖关系(我认为它修复了它用于手动部署,但不用于自动)并从项目中删除源代码控制编码,这对我没有帮助。

每次构建时都不会发生错误,但每次在不同的部署项目上似乎都是随机的。

有没有人对为什么会出现这个错误以及如何修复它有任何建议?

I have been receiving this error for a while when using devenv on an automatic build.I have gone through every website I can find, and the usual answers mention refreshing dependencies (Which I believe fixes it for manual deployment, but not for automatic) and removing the source control coding from the projects, which hasn’t helped me.The error does not occur every time I build, but it seems random on different deployment projects each time.Does anyone have any advice on why exactly this error occurs and how to go about fixing it?

问题:

我正在尝试部署ClickOnce应用程序,但在客户端上安装失败。 这是错误日志:

PLATFORM VERSION INFO
Windows             : 6.1.7601.65536 (Win32NT)
Common Language Runtime     : 4.0.30319.1
System.Deployment.dll       : 4.0.30319.1 (RTMRel.030319-0100)
clr.dll             : 4.0.30319.1 (RTMRel.030319-0100)
dfdll.dll           : 4.0.30319.1 (RTMRel.030319-0100)
dfshim.dll          : 4.0.31106.0 (Main.031106-0000)

SOURCES
Deployment url          : http://MyProduct.com/download/workstation/MyProduct%20Front%20Desk.application
                    Server      : Microsoft-IIS/7.5
                    X-Powered-By    : ASP.NET
Deployment Provider url     : http://MyProduct.com/Download/Workstation/MyProduct%20Front%20Desk.application
                    Server      : Microsoft-IIS/7.5
                    X-Powered-By    : ASP.NET
Application url         : http://MyProduct.com/Download/Workstation/Application%20Files/MyProduct%20Front%20Desk_1_0_0_7/MyProduct%20Front%20Desk.exe.manifest
                    Server      : Microsoft-IIS/7.5
                    X-Powered-By    : ASP.NET

IDENTITIES
Deployment Identity     : MyProduct Front Desk.application, Version=1.0.0.7, Culture=neutral, PublicKeyToken=df343a0868ab2d74, processorArchitecture=msil
Application Identity        : MyProduct Front Desk.exe, Version=1.0.0.7, Culture=neutral, PublicKeyToken=df343a0868ab2d74, processorArchitecture=msil, type=win32

APPLICATION SUMMARY
* Installable application.

ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of http://MyProduct.com/download/workstation/MyProduct%20Front%20Desk.application resulted in exception. Following failure messages were detected:
    + Reference in the manifest does not match the identity of the downloaded assembly MyProductSiteServer.exe.

COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.

WARNINGS
There were no warnings during this operation.

OPERATION PROGRESS STATUS
* [03/17/11 11:51:04] : Activation of http://MyProduct.com/download/workstation/MyProduct%20Front%20Desk.application has started.
* [03/17/11 11:51:04] : Processing of deployment manifest has successfully completed.
* [03/17/11 11:51:04] : Installation of the application has started.
* [03/17/11 11:51:05] : Processing of application manifest has successfully completed.
* [03/17/11 11:51:06] : Found compatible runtime version 4.0.30319.
* [03/17/11 11:51:06] : Request of trust and detection of platform is complete.

ERROR DETAILS
Following errors were detected during this operation.
* [03/17/11 11:51:30] System.Deployment.Application.InvalidDeploymentException (RefDefValidation)
    - Reference in the manifest does not match the identity of the downloaded assembly MyProductSiteServer.exe.
    - Source: System.Deployment
    - Stack trace:
        at System.Deployment.Application.DownloadManager.ProcessDownloadedFile(Object sender, DownloadEventArgs e)
        at System.Deployment.Application.FileDownloader.DownloadModifiedEventHandler.Invoke(Object sender, DownloadEventArgs e)
        at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
        at System.Deployment.Application.SystemNetDownloader.DownloadAllFiles()
        at System.Deployment.Application.FileDownloader.Download(SubscriptionState subState)
        at System.Deployment.Application.DownloadManager.DownloadDependencies(SubscriptionState subState, AssemblyManifest deployManifest, AssemblyManifest appManifest, Uri sourceUriBase, String targetDirectory, String group, IDownloadNotification notification, DownloadOptions options)
        at System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp)
        at System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc)
        at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
        at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)

COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.

我需要部署的主要exe是MyProductFrontDesk.exe ,它依赖于MyProductSiteServer.exe – 这似乎是抛出错误的位置:“清单中的引用与下载的程序集MyProductSiteServer.exe的标识不匹配“。

哪个清单需要纠正? 如何?

I’m trying to deploy a ClickOnce application, but installation fails on the client.Here’s the error log:The main exe I need to deploy is MyProductFrontDesk.exe , which has a dependency on MyProductSiteServer.exe – and that appears to be where the error is being thrown: “Reference in the manifest does not match the identity of the downloaded assembly MyProductSiteServer.exe.”Which manifest needs to be corrected?And how?

问题:

当我尝试更新我的项目时,我正在做-我第一次看到错误:

“签名时发生错误:未找到SignTool.exe。”

我之前从未见过,所以我检查了SignTool.exe是为我的项目进行ClickOnce部署的标志。

我还读到它是Windows SDK的一部分-但是当我寻找SignTool.exe的位置时-我在那里看到了它!

  C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin

我没发现问题,而且我一直一直在发布我的项目-我使用的是68版。但这是我第一次看到它-我没有碰过任何能做到这一点的选项。

有什么帮助吗?

While I was trying to Update my Project I was making – I got an error for the first time I’ve seen:’An error occurred while signing: SignTool.exe not found.’I’ve never seen this before, So I looked up that SignTool.exe is what signs my project for ClickOnce Deployment.I also read that is it a part of Windows SDK – but when I looked to find where SignTool.exe is – I saw it right there!I saw no problem, and I’ve always published my Project all the time – I’m on Version 68. But this is the first time I’ve seen this – I didn’t touch any options that would do this.Any help?

问题:

在Visual Studio 2010中,我有许多单元测试。 当我使用测试列表一次运行多个测试时,我有时会在一个或多个测试中发现以下错误:

在测试运行时,代理程序进程已停止。

从来没有相同的测试失败,如果我再次尝试运行测试,它就会成功。

在Connect上发现了这个错误报告 ,这似乎是同样的问题,但它没有提供解决方案。

有没有人见过这种行为? 我怎么能避免呢?

编辑

我仍然遇到这个错误,我的许多同事也在使用相同的软件/硬件设置。 到目前为止,我已经评估了答案,但他们没有解决问题。 我正在为这个问题找到解决方案。

In Visual Studio 2010, I have a number of unit tests.When I run multiple tests at one time using test lists, I sometimes reveive the following error for one or more of the tests:The agent process was stopped while the test was running.It is never the same test failing, and if I try to run the test again, it succeeds.I found this bug report on Connect , which seems to be the same problem, but it does not offer a solution.Has anyone else seen this behaviour ?How I can avoid it ?EditI am still experiencing this bug, and so is many of my colleagues on the same software/hardware setup.I have evaluated the answers so far, but they don’t resolve the problem.I am starting a bounty for a solution to this problem.