编译和发布失败.Net Core

时间:2016-10-04 16:24:02

标签: c# visual-studio-2015 asp.net-core .net-core

我已经设置了两台机器来编译和发布.netcore Web应用程序。

一个似乎工作正常,另一个没有。

问题机器声称已经成功构建,但发布失败,因为没有生成DLL。

构建/发布输出如下,我将非常感谢我从这里开始追踪出错的地方

1>------ Build started: Project: Engine, Configuration: Release Any CPU ------
1>  C:\Program Files\dotnet\dotnet.exe build "C:\Users\Dev\Documents\Visual Studio 2015\Projects\Engine\src\Engine" --configuration Release --no-dependencies
1>  Project Engine (.NETCoreApp,Version=v1.0) will be compiled because expected outputs are missing
1>  Compiling Engine for .NETCoreApp,Version=v1.0
1>  Compilation succeeded
1>      0 Warning(s)
1>      0 Error(s)
1>  Time elapsed 00:00:00.9996920
1>
2>------ Publish started: Project: Engine, Configuration: Release Any CPU ------
Connecting to C:\Users\MHR\Documents\Visual Studio 2015\Projects\Engine\src\Engine\.\bin\Release\PublishOutput...
Environment variables:
Path=.\node_modules\.bin;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Web\External;%PATH%;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Web\External\git
C:\Program Files\dotnet\dotnet.exe publish "C:\Users\Dev\Documents\Visual Studio 2015\Projects\Engine\src\Engine" --framework netcoreapp1.0 --output "C:\Users\Dev\AppData\Local\Temp\PublishTemp\Engine75" --configuration Release --no-build
Publishing Engine for .NETCoreApp,Version=v1.0
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Publishing.targets(149,5): Error : Could not find file 'C:\Users\Dev\Documents\Visual Studio 2015\Projects\Engine\src\Engine\bin\Release\netcoreapp1.0\Engine.dll'.

2>Publish failed due to build errors. Check the error list for more details.
========== Build: 1 succeeded, 0 failed, 2 up-to-date, 0 skipped ==========
========== Publish: 0 succeeded, 1 failed, 0 skipped ==========

计算机是Windows 10 Pro,安装了所有更新。 IDE是Visual Studio Enterprise 2015,版本14.0.25431.01更新3 使用.NetCore SDK版本1.0.0-preview2-003131

1 个答案:

答案 0 :(得分:1)

奇怪的是,编译器声称二进制文件已经构建,但是发布过程声称它不存在。

通过在编译时监视构建目录内容,很明显DLL正在构建,但随后被立即删除。

快速检查在此计算机上运行的Norton / Symantec病毒检查程序,显示它负责吃掉这些DLL。

开发环境本身没有任何问题。

我将项目树添加到病毒检查程序的排除列表中,现在一切正常。