【发布时间】:2016-12-29 13:27:07
【问题描述】:
我的环境:
- VS 2015,全新安装更新 3 (14.0.25431.01)
- Windows 10,最新更新
- 已安装 .NET Core 1.0.3 SDK (LTS)、.NET Core 1.1 SDK(当前)及其运行时
- VS 2015 工具预览 2 (.NET Core)
- 没有 ReSharper
我的 dotnet 信息
C:\Users\Ben>dotnet --info
.NET Command Line Tools (1.0.0-preview2-1-003177)
Product Information:
Version: 1.0.0-preview2-1-003177
Commit SHA-1 hash: a2df9c2576
Runtime Environment:
OS Name: Windows
OS Version: 10.0.14393
OS Platform: Windows
RID: win10-x64
为什么 VS 2015 认为,这里的构建很好?它无法编译。 CLI 工作正常:
PM> dotnet build **/project.json
Project VS2015NetCore (.NETCoreApp,Version=v1.1) will be compiled because expected outputs are missing
Compiling VS2015NetCore for .NETCoreApp,Version=v1.1
dotnet : C:\Program Files\dotnet\dotnet.exe compile-csc @C:\Users\Ben\documents\visual studio
2015\Projects\VS2015NetCore\src\VS2015NetCore\obj\Debug\netcoreapp1.1\dotnet-compile.rsp returned Exit Code 1
At line:1 char:1
+ dotnet build **/project.json
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (C:\Program File...ned Exit Code 1:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
C:\Users\Ben\documents\visual studio 2015\Projects\VS2015NetCore\src\VS2015NetCore\Program.cs(7,28): error CS0246: The type or namespace name 'ThisClassDoesNotExist' could not
be found (are you missing a using directive or an assembly reference?)
【问题讨论】:
-
它给你一个非0的退出代码,并且在底部有一个错误。
-
@Carcigenicate 所以你确认这是一种常见的行为?我不这么认为。
-
我不是说这是通常的行为,我是说我认为它实际上并没有编译。它似乎抛出了一个错误。
标签: visual-studio-2015 .net-core