简体   繁体   English

编译和发布失败 .Net Core

[英]Compile and Publish Failure .Net Core

I have setup two machines to compile and publish a .netcore web application.我已经设置了两台机器来编译和发布 .netcore Web 应用程序。

One seems to work OK, the other does not.一个似乎工作正常,另一个没有。

The problem machine claims to have succeeded with the build, but the publish fails because no DLL was produced.问题机器声称构建成功,但发布失败,因为没有生成 DLL。

The build/publish output is as follows, I would be very grateful on where I go from here to track down what is wrong构建/发布输出如下,我将非常感谢我从这里开始追踪哪里出了问题

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

Machine is Windows 10 Pro, all updates installed.机器是 Windows 10 专业版,已安装所有更新。 IDE is Visual Studio Enterprise 2015, Version 14.0.25431.01 Update 3 Using .NetCore SDK version 1.0.0-preview2-003131 IDE 是 Visual Studio Enterprise 2015, Version 14.0.25431.01 Update 3 Using .NetCore SDK version 1.0.0-preview2-003131

It is odd that the compiler claims the binary was built but yet the Publishing process claims it was not there.奇怪的是,编译器声称已构建二进制文件,但发布过程声称它不存在。

By monitoring the build directory contents at compile time it became obvious that the DLL was being built, but then was immediately deleted.通过在编译时监视构建目录内容,很明显 DLL 正在构建,但随后立即被删除。

A quick check of the Norton/Symantec virus checker running on this machine, showed that it was responsible for eating the DLLs.快速检查这台机器上运行的诺顿/赛门铁克病毒检查程序,发现它负责吞噬 DLL。

There was nothing wrong with the development environment itself.开发环境本身没有问题。

I added the project tree to the exclusion list for the virus checker and it all works fine now.我将项目树添加到病毒检查器的排除列表中,现在一切正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM