2017-08-16 5 views
1

Die folgenden Fehler werden im Protokoll angezeigt, wenn Webprojekt in Ordner veröffentlicht wird.Visual Studio 2017 Webprojekt in Ordner veröffentlichen schlägt fehl

.... 
Publishing folder /... 
Publishing folder bin... 
Publishing folder bin/es... 
Publishing folder bin/roslyn... 
Unable to add 'bin/roslyn/System.IO.FileSystem.dll' to the Web site. Unable to add file 'bin\roslyn\System.IO.FileSystem.dll'. The process cannot access the file because it is being used by another process. 
Unable to add 'bin/roslyn/System.IO.FileSystem.Primitives.dll' to the Web site. Unable to add file 'bin\roslyn\System.IO.FileSystem.Primitives.dll'. The process cannot access the file because it is being used by another process. 
Unable to add 'bin/roslyn/System.Reflection.Metadata.dll' to the Web site. Unable to add file 'bin\roslyn\System.Reflection.Metadata.dll'. The process cannot access the file because it is being used by another process. 
Unable to add 'bin/roslyn/System.Security.Cryptography.Algorithms.dll' to the Web site. Unable to add file 'bin\roslyn\System.Security.Cryptography.Algorithms.dll'. The process cannot access the file because it is being used by another process. 
Unable to add 'bin/roslyn/System.Security.Cryptography.Primitives.dll' to the Web site. Unable to add file 'bin\roslyn\System.Security.Cryptography.Primitives.dll'. The process cannot access the file because it is being used by another process. 
Unable to add 'bin/roslyn/System.ValueTuple.dll' to the Web site. Unable to add file 'bin\roslyn\System.ValueTuple.dll'. The process cannot access the file because it is being used by another process. 
Unable to add 'bin/roslyn/VBCSCompiler.exe' to the Web site. Unable to add file 'bin\roslyn\VBCSCompiler.exe'. The process cannot access the file because it is being used by another process. 
Publishing folder bin/zh... 
... 
Publishing folder Views/WFDefs... 
Publish failed. Target file://machine/d$/PATH. 

Wenn sie Web veröffentlicht es mit publish funktioniert, aber das eigentliche Ziel nicht Web-Publishing unterstützt.

Hinweis: VBCSCompiler wird nicht ausgeführt.

Antwort

0

Hatte das gleiche Problem in Visual Studio 2017 Community Edition. Als Ihre Frage in Google kam, aber keine Antwort, dachte ich, ich würde hinzufügen.

Ich fand Process Explorer von Sysinternals half mir einen Haufen.

Öffnen Sie sysinternals und gehen Sie zu Find -> Find Handle oder DLL ... oder (Ctrl + F) und durchsuchen Sie die geöffnete Datei. In meinem Fall "System.IO.FileSystem.dll"

Die Suchergebnisse zeigten zwei Instanzen von MSBuild und ein VBCSCompiler wurde an den Dateien hängen. Im schlimmsten Fall habe ich gerade den Prozessbaum getötet, das Projekt gebaut und alles war wieder gut.

Verwandte Antwort: https://serverfault.com/questions/1966/how-do-you-find-what-process-is-holding-a-file-open-in-windows

2

hatte ich das gleiche Problem mit meiner Anwendung mit Visual Studio Community 2017. In meinem Fall die Lösung einfach, ich alle Dateien im Verzeichnis ist nur gelöscht (C: \ Projects \ DotNet \ ApplicationName \ bin) und nachdem ich die Anwendung neu kompiliert habe.

Ich hoffe, es kann Ihnen helfen.

0

Wenn Sie versuchen, asp.net Web App in Azure zu veröffentlichen und oben genannten Fehler erhalten, dann versuchen Sie UPDATE das Microsoft.CodeDom.Providers.DotNetCompilerPlatform-Paket auf V1.0.7 oder höher. Zu Beginn wird in Ihrer Anwendung Microsoft.CodeDom.Providers.DotNetCompilerPlatform Version 1.0.5 dann deinstallieren und dann installieren Sie die neueste Version V 1.0.7 oder später davon. Säubere deine Lösung und baue sie. Jetzt können Sie Ihre Web-App in Azure mit Visual Studio 2017 veröffentlichen.

Verwandte Themen