2017-08-16 20 views
1

Webプロジェクトをフォルダに公開するときに、次のエラーがログに記録されます。Visual Studio 2017 Webプロジェクトをフォルダに公開できない

.... 
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. 

私はWeb公開を使って公開しても動作しますが、実際のターゲットはWeb公開をサポートしていません。

注:VBCSCompilerは実行されていません。

答えて

0

Visual Studio 2017 Community Editionで同じ問題が発生していました。あなたの質問はGoogleで出てきましたが、回答はありませんでしたので、私はそれに追加すると思いました。

私が見つけたProcess ExplorerからSysinternals私を束に助けた。

sysinternalsを開き、検索 - >ハンドルまたはDLLを検索...または(Ctrl + F)を押して、開いているファイルを検索します。私の場合「System.IO.FileSystem.dll」

検索結果には、MSBuildの2つのインスタンスと1つのVBCSCompilerがファイルにハングアップしていたことが示されました。最悪の場合、私はプロセスツリーを殺し、プロジェクトを構築したが、すべてがうまくいった。

関連の答え:https://serverfault.com/questions/1966/how-do-you-find-what-process-is-holding-a-file-open-in-windows

2

私は唯一のディレクトリのbin(C内のすべてのファイルを削除し、解決策は単純だった私の場合はVisual Studioのコミュニティ2017年と私のアプリケーションと同じ問題を抱えていた:プロジェクトの\を\ DotNet \ ApplicationName \ bin)と、アプリケーションを再コンパイルした後。

私はそれがあなたを助けることを願っています。

0

あなたはアズールでasp.netのWebアプリを公開しようとするとエラーが上になった場合、UPDATEにMicrosoft.CodeDom.Providers.DotNetCompilerPlatform v1.0.7デベロッパーへのパッケージ以降を試してみてください。最初に、アプリケーションでは、Microsoft.CodeDom.Providers.DotNetCompilerPlatformバージョン1.0.5、次にがアンインストールされ、最新バージョンV 1.0.7以降がインストールされます。。ソリューションをクリーンアップしてビルドします。今度は、ビジュアルスタジオ2017を使用してAzureでWebアプリケーションを公開することができます。

関連する問題