2016-12-29 76 views
0

我的環境:VS2015構建.NET無效核心代碼

  • VS 2015年,新的安裝與更新3(14.0.25431.01)
  • 的Windows 10,最新更新
  • 安裝了.NET核心1.0.3 SDK(LTS),.NET 1.1核心SDK(電流)和它們的運行時間
  • VS 2015年工具預覽版2(.NET核心)
  • 沒有ReSharper的

enter image description here

我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 

enter image description here

爲什麼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

它給你一個非0退出代碼,並在底部有一個錯誤。 – Carcigenicate

+0

@Carcigenicate所以你確認這是一種常見的行爲?我不這麼認爲。 – Ben

+0

我不是說這是平常的行爲,而是說我不認爲它是真正編譯的。它似乎引發了一個錯誤。 – Carcigenicate

回答

0

重新安裝我的機器。現在它可以工作。 通常的Windows問題解決方案...

0

我認爲這是一個普遍問題。但爲什麼?什麼?

如果我修復errer,我從CLI獲得一般的非0錯誤:

enter image description here

關於向DOTNET CLI回購,錯誤0x80008081造成by an invalid argument