Skip to content
This repository has been archived by the owner on Dec 20, 2018. It is now read-only.

Cant build project VS 17 windows 10 #1534

Closed
LindaLawton opened this issue Dec 18, 2017 · 7 comments
Closed

Cant build project VS 17 windows 10 #1534

LindaLawton opened this issue Dec 18, 2017 · 7 comments

Comments

@LindaLawton
Copy link

I have been trying to build this all morning. I have updated .net core

c:\dotnet --version
2.1.2
C:>dotnet --info
.NET Command Line Tools (2.1.2)

Product Information:
Version: 2.1.2
Commit SHA-1 hash: 5695315371

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

Microsoft .NET Core Shared Framework Host

Version : 2.0.3
Build : a9190d4a75f4a982ae4b4fa8d1a24526566c69df

I have updated Visual Stuido.

Annoying error:

The current .NET SDK does not support targeting .NET Core 2.1. Either target .NET Core 2.0 or lower, or use a version of the .NET SDK that supports .NET Core 2.1.

What am i missing? Yes i have tried rebooting. This is quite annoying

@HaoK
Copy link
Member

HaoK commented Dec 18, 2017

Try running build.cmd first, that should pull down everything you need https://github.com/aspnet/Identity/blob/dev/build.cmd

@LindaLawton
Copy link
Author

LindaLawton commented Dec 18, 2017

Well that downloaded an impressive amount of stuff. When i cloned the project i thought to myself this is way to small. This makes more sense now if you need to run the cmd to download the rest of it.

> Time Elapsed 00:06:43.51
> dotnet.exe failed with exit code: 1
> At C:\Users\lilaw\.dotnet\buildtools\korebuild\2.1.0-preview1-15626\scripts\common.psm1:11 char:9
> +         throw "$cmdName failed with exit code: $exitCode"
> +         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>     + CategoryInfo          : OperationStopped: (dotnet.exe failed with exit code: 1:String) [], RuntimeException
>     + FullyQualifiedErrorId : dotnet.exe failed with exit code: 1

Looks like the tests are throwing a bunch of errors. When i try and build the solution its throwing more errors now than before.

Severity Code Description Project File Line Suppression State
Error The current .NET SDK does not support targeting .NET Standard 2.0. Either target .NET Standard 1.6 or lower, or use a version of the .NET SDK that supports .NET Standard 2.0. Microsoft.AspNetCore.Identity.Service.Abstractions C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.TargetFrameworkInference.targets 126
Error The current .NET SDK does not support targeting .NET Standard 2.0. Either target .NET Standard 1.6 or lower, or use a version of the .NET SDK that supports .NET Standard 2.0. Microsoft.AspNetCore.Identity.Service.Core C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.TargetFrameworkInference.targets 126
Error The current .NET SDK does not support targeting .NET Standard 2.0. Either target .NET Standard 1.6 or lower, or use a version of the .NET SDK that supports .NET Standard 2.0. Microsoft.Extensions.Identity.Core C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.TargetFrameworkInference.targets 126
Error The current .NET SDK does not support targeting .NET Core 2.0. Either target .NET Core 1.1 or lower, or use a version of the .NET SDK that supports .NET Core 2.0. Microsoft.AspnetCore.Identity.Service.FunctionalTests C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.TargetFrameworkInference.targets 112
Error The current .NET SDK does not support targeting .NET Core 2.1. Either target .NET Core 1.1 or lower, or use a version of the .NET SDK that supports .NET Core 2.1. Microsoft.AspnetCore.Identity.Service.FunctionalTests C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.TargetFrameworkInference.targets 112
Error The current .NET SDK does not support targeting .NET Core 2.0. Either target .NET Core 1.1 or lower, or use a version of the .NET SDK that supports .NET Core 2.0. Microsoft.AspNetCore.Identity.Service.Abstractions.Test C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.TargetFrameworkInference.targets 112
Error The current .NET SDK does not support targeting .NET Core 2.1. Either target .NET Core 1.1 or lower, or use a version of the .NET SDK that supports .NET Core 2.1. Microsoft.AspNetCore.Identity.Service.Abstractions.Test C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.TargetFrameworkInference.targets 112
Error The version of Microsoft.NET.Sdk used by this project is insufficient to support references to libraries targeting .NET Standard 1.5 or higher. Please install version 2.0 or higher of the .NET Core SDK. Microsoft.AspNet.Identity.AspNetCoreCompat C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.NETFramework.targets 65
Error Unable to locate the .NET Core SDK. Check that it is installed and that the version specified in global.json (if any) matches the installed version. NativeWPFClient C:\Development\NetCore\Identity\test\WebSites\Identity.OpenIdConnect.WebSite\Identity.OpenIdConnect.WebSite.csproj

Any other ideas?

@HaoK
Copy link
Member

HaoK commented Dec 18, 2017

@natemcmaster is there anything else someone needs to do (feeds or environment or other pre build.cmd steps to build from a clean cloned dev enlistment)?

@natemcmaster
Copy link
Contributor

natemcmaster commented Dec 18, 2017

The most common error is not setting up PATH correctly. https://github.com/aspnet/Home/wiki/Building-from-source#path

@LindaLawton did build.cmd issue a warning like this?

image

@LindaLawton
Copy link
Author

LindaLawton commented Dec 19, 2017

@natemcmaster Yes I was getting that error. I have fixed that. Its bulding now.

Tests are throwing a lot of errors.

System.ArgumentOutOfRangeException : The UTC time represented when the offset is applied must be between year 0 and 10,000.

Microsoft.AspNetCore.Identity.Service.JwtIdTokenIssuerTest.JwtIdTokenIssuer_IncludesNonceAndTokenHashesWhenPresent(nonce: "nonce", code: null, accessToken: "accesstoken")
Error Message:
System.ArgumentOutOfRangeException : Det UTC-tidspunkt, der vises, når forskydningen anvendes, skal ligge mellem år 0 og 10.000.

Build still failed

Time Elapsed 00:05:23.30
dotnet.exe failed with exit code: 1
At C:\Users\lilaw\.dotnet\buildtools\korebuild\2.1.0-preview1-15626\scripts\common.psm1:11 char:9
+         throw "$cmdName failed with exit code: $exitCode"
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (dotnet.exe failed with exit code: 1:String) [], RuntimeException
    + FullyQualifiedErrorId : dotnet.exe failed with exit code: 1

On the bright side Identity.sln does build in visual studio now so I think you have solved the problem.

I have a couple of additional questions if someone has time.

There are two .sln files in the project. which one should i be running i am assuming its IdentityCore.sln. Out of curiosity why are there two?

What is the best way in your opinion to debug my application with this? Should I had the project to my solution or can I do a debug attach process with it?

Update: I had to add the path back as i was unable to build my own project with that removed. :/

@blowdart
Copy link
Member

blowdart commented Jan 4, 2018

@HaoK could you answer the outstanding questions, and then close once @LindaLawton is happy with your answers?

@HaoK
Copy link
Member

HaoK commented Jan 4, 2018

IdentityCore is the slimmed down sln that doen'st include the identity service stuff which hasn't been shipped yet. You can launch using the sln or attach, either way should work

@HaoK HaoK closed this as completed Jan 4, 2018
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

4 participants