Skip to content

build.cmd /t:Pin, build.cmd /t:Restore and build.cmd all not work #2191

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

Closed
heku opened this issue Sep 10, 2017 · 1 comment
Closed

build.cmd /t:Pin, build.cmd /t:Restore and build.cmd all not work #2191

heku opened this issue Sep 10, 2017 · 1 comment

Comments

@heku
Copy link

heku commented Sep 10, 2017

Hi,
I'm not quite sure if here is the correct place to put my question, I have a problem to build any of .net core projects (DI, Configuration, Hosting etc).

Error	KRB1001	Package references have not been pinned. 
Run './build.cmd /t:Pin'. 
Also, you can run './build.cmd /t:Restore' which will pin *and* restore packages.

The suggest commands build.cmd /t:Pin, build.cmd /t:Restore and build.cmd all not work, same error below.

PS C:\Codes\Configuration> .\build.cmd
Downloading KoreBuild 2.1.0-preview1-15493
Using KoreBuild 2.1.0-preview1-15493
WARNING: dotnet found on the system PATH is 'C:\Program Files\dotnet\dotnet.exe' but KoreBuild will use
'C:\Users\heku\.dotnet\x64\dotnet.exe'.
WARNING: Adding 'C:\Users\heku\.dotnet\x64' to system PATH permanently may be required for applications like Visual
Studio or VS Code to work correctly.
Adding C:\Users\heku\.dotnet\x64 to PATH
.NET Core runtime 2.0.0 is already installed. Skipping installation.
dotnet-install: Downloading link: https://dotnetcli.azureedge.net/dotnet/Sdk/2.1.0-preview1-007042/dotnet-sdk-2.1.0-preview1-007042-win-x64.zip
dotnet-install: Extracting zip from https://dotnetcli.azureedge.net/dotnet/Sdk/2.1.0-preview1-007042/dotnet-sdk-2.1.0-preview1-007042-win-x64.zip
dotnet-install: Adding to current process PATH: "C:\Users\heku\.dotnet\x64\". Note: This change will not be visible if PowerShell was run as a child process.
dotnet-install: Installation finished
>>> dotnet.exe msbuild @C:\Codes\Configuration\artifacts\msbuild\msbuild.rsp
Invoke-RepositoryBuild : Program 'dotnet.exe' failed to run: The specified executable is not a valid application for th
is OS platform.At C:\Users\heku\.dotnet\buildtools\korebuild\2.1.0-preview1-15493\scripts\common.psm1:7 char:5
+     & $cmd @args
+     ~~~~~~~~~~~~.
At C:\Codes\Configuration\build.ps1:173 char:5
+     Invoke-RepositoryBuild $Path @MSBuildArgs
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (:) [Invoke-RepositoryBuild], ApplicationFailedException
    + FullyQualifiedErrorId : NativeCommandFailed,Invoke-RepositoryBuild

It seems it downloads a x64 version dotnet CLI to my x86 OS, is this a bug?

Here is my environment info:

Visual Studio Community 15.3 (the latest version)
.netcore 2.0 SDK installed.

C:\Users\heku>dotnet --info
.NET Command Line Tools (2.0.0)

Product Information:
 Version:            2.0.0
 Commit SHA-1 hash:  cdcd1928c9

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.15063
 OS Platform: Windows
 RID:         win10-x86
 Base Path:   C:\Program Files\dotnet\sdk\2.0.0\

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.0
  Build    : e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d

Any suggestion will be appreciated.

@heku
Copy link
Author

heku commented Sep 10, 2017

@natemcmaster gives a solution, anyone has similar problem please refer to aspnet/DependencyInjection#579

ryanbrandenburg pushed a commit that referenced this issue Nov 27, 2018
fix #2134 by disposing httpconnection if start fails (#2137) (#2188)
@ghost ghost locked as resolved and limited conversation to collaborators Dec 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant