Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't build the latest revision. #2057

Closed
SetoKaiba opened this issue Apr 24, 2019 · 5 comments
Closed

Can't build the latest revision. #2057

SetoKaiba opened this issue Apr 24, 2019 · 5 comments

Comments

@SetoKaiba
Copy link

Expected behavior

Build successfully.

Actual behavior

Build failed.

Steps to reproduce

Run runbuild.cmd.

Here's the log. MSB4057 in English is "The target "_GetRestoreSettingsPerFramework" does not exist in the project." It fails to restore the nuget packages I think.
I previously try to build it in VS2019 with no luck.


Windows PowerShell 脚本开始
开始时间: 20190424235101
用户名: SETO-PC\Seto
RunAs 用户: SETO-PC\Seto
配置名称:
计算机: SETO-PC (Microsoft Windows NT 10.0.17763.0)
主机应用程序: powershell -Command & { Start-Transcript 'E:\Seto\GitHub\JamesNK\Newtonsoft.Json\Build\Temp\runbuild.txt'; Import-Module 'E:\Seto\GitHub\JamesNK\Newtonsoft.Json\Build\psake.psm1'; Invoke-psake 'E:\Seto\GitHub\JamesNK\Newtonsoft.Json\Build..\Build\build.ps1' ; Stop-Transcript; exit !($psake.build_success); }
进程 ID: 15284
PSVersion: 5.1.17763.316
PSEdition: Desktop
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.17763.316
BuildVersion: 10.0.17763.316
CLRVersion: 4.0.30319.42000
WSManStackVersion: 3.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: 1.1.0.1


已启动脚本,输出文件为 E:\Seto\GitHub\JamesNK\Newtonsoft.Json\Build\Temp\runbuild.txt
psake version 4.4.2
Copyright (c) 2010-2015 James Kovacs, Damian Hickey & Contributors
Executing Clean
Setting location to E:\Seto\GitHub\JamesNK\Newtonsoft.Json
Deleting existing working directory E:\Seto\GitHub\JamesNK\Newtonsoft.Json\Working
Creating working directory E:\Seto\GitHub\JamesNK\Newtonsoft.Json\Working

目录: E:\Seto\GitHub\JamesNK\Newtonsoft.Json

Mode LastWriteTime Length Name


d----- 2019/4/24 23:51 Working
Executing Build
Found 9 enabled builds

目录: E:\Seto\GitHub\JamesNK\Newtonsoft.Json\Build

Mode LastWriteTime Length Name


d----- 2019/4/24 23:51 Temp
Downloading dotnet-install.ps1
dotnet-install: .NET Core SDK version 2.2.105 is already installed.
dotnet-install: Adding to current process PATH: "C:\Users\Seto\AppData\Local\Microsoft\dotnet". Note: This change will not be visible if PowerShell was run as a child process.
MSBuild path C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\MSBuild.exe
Restoring packages for netstandard2.0;netstandard1.3;netstandard1.0;net45;net40;net35;net20;portable-net45+win8+wpa81+wp8;portable-net40+win8+wpa81+wp8+sl5 in E:\Seto\GitHub\JamesNK\Newtonsoft.Json\Src\Newtonsoft.Json.sln

用于 .NET Framework 的 Microsoft (R) 生成引擎版本 16.0.461+g6ff56ef63c
版权所有(C) Microsoft Corporation。保留所有权利。

E:\Seto\GitHub\JamesNK\Newtonsoft.Json\Src\Newtonsoft.Json\Newtonsoft.Json.csproj : error MSB4057: 该项目中不存在目标“_GetRestoreSettingsPerFramework”。
PS>TerminatingError():“Exec: Error restoring E:\Seto\GitHub\JamesNK\Newtonsoft.Json\Src\Newtonsoft.Json.sln”

TerminatingError():“Exec: Error restoring E:\Seto\GitHub\JamesNK\Newtonsoft.Json\Src\Newtonsoft.Json.sln”
TerminatingError():“Exec: Error restoring E:\Seto\GitHub\JamesNK\Newtonsoft.Json\Src\Newtonsoft.Json.sln”
TerminatingError():“Exec: Error restoring E:\Seto\GitHub\JamesNK\Newtonsoft.Json\Src\Newtonsoft.Json.sln”
TerminatingError():“Exec: Error restoring E:\Seto\GitHub\JamesNK\Newtonsoft.Json\Src\Newtonsoft.Json.sln”
TerminatingError():“Exec: Error restoring E:\Seto\GitHub\JamesNK\Newtonsoft.Json\Src\Newtonsoft.Json.sln”
Error: 2019/4/24 23:51:08:
所在位置 E:\Seto\GitHub\JamesNK\Newtonsoft.Json\Build\psake.psm1:147 字符: 17

  •             throw ("Exec: " + $errorMessage)
    
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [<<==>>] Exception: Exec: Error restoring E:\Seto\GitHub\JamesNK\Newtonsoft.Json\Src\Newtonsoft.Json.sln
    

Windows PowerShell 脚本结束
结束时间: 20190424235108


@SetoKaiba
Copy link
Author

Just add some components to VS 2019. It's OK now.

@arun-subramanian-1
Copy link

@JamesNK

I am getting this error on windows 10 with Vs2017 and vs 2019 build tool sets, @SetoKaiba whats exactly did you do to resolve this ?

@SetoKaiba
Copy link
Author

SetoKaiba commented May 17, 2019

@arun-subramanian-1 Just installed all the .net sdks for 2019.

@JamesNK
Copy link
Owner

JamesNK commented May 17, 2019

The component you need is the portable library SDK. It is not installed in VS2019 by default.

@chucklu
Copy link

chucklu commented Jun 19, 2019

@JamesNK Thanks for your solution
After installed the ".net portable library targeting pack", the build task works now
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants