Search code examples
asp.net-coreasp.net-core-security

Building aspnet core sources from github on windows 10 with VS2017


I want to delve deeper into the asp.net core sources which are hosted over at gihub.

So take the asp.net core security which can be found here - https://github.com/aspnet/Security.

I've downloaded and installed the GitHub desktop. I've cloned the repo locally on my machine. I'm looking at the dev branch:

Git dev

I have downloaded and installed the SDK from https://www.microsoft.com/net/core/preview#windowscmd which I think the projects target (I might be wrong), but here is the authentication.csproj:

<Project Sdk="Microsoft.NET.Sdk">

  <Import Project="..\..\build\common.props" />

  <PropertyGroup>
    <Description>ASP.NET Core common types used by the various authentication middleware components.</Description>
    <TargetFramework>netstandard2.0</TargetFramework>
    <NoWarn>$(NoWarn);CS1591</NoWarn>
    <GenerateDocumentationFile>true</GenerateDocumentationFile>
    <PackageTags>aspnetcore;authentication;security</PackageTags>
    <EnableApiCheck>false</EnableApiCheck>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.Authentication.Core" Version="$(AspNetCoreVersion)" />
    <PackageReference Include="Microsoft.AspNetCore.DataProtection" Version="$(AspNetCoreVersion)" />
    <PackageReference Include="Microsoft.AspNetCore.Http" Version="$(AspNetCoreVersion)" />
    <PackageReference Include="Microsoft.AspNetCore.Http.Extensions" Version="$(AspNetCoreVersion)" />
    <PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="$(AspNetCoreVersion)" />
    <PackageReference Include="Microsoft.Extensions.Options" Version="$(AspNetCoreVersion)" />
    <PackageReference Include="Microsoft.Extensions.SecurityHelper.Sources" Version="$(AspNetCoreVersion)" PrivateAssets="All" />
    <PackageReference Include="Microsoft.Extensions.TaskCache.Sources" Version="$(AspNetCoreVersion)" PrivateAssets="All" />
    <PackageReference Include="Microsoft.Extensions.WebEncoders" Version="$(AspNetCoreVersion)" />
  </ItemGroup>

</Project>

There is a solution file (Security.sln) and a build.cmd, build.ps1, build.sh. I was hoping to load the solution and compile, but things never seem that straight forward anymore.

Having ran build.ps1 which seemed to install a few things, then build.cmd which seemed to execute, I've loaded the solution in VS2017. I just cannot get anything to build.

The error window is currently going crazy with a set of errors which seems to be stuck in a loop going up from 10 to 88, then back to 10 in an endless loop.

I cannot find any info anywhere on building these solutions. Can anyone give me a heads up on what is needed to build them? Its late, it has been a long day, and my eyes hurt.

Here is a selection of the errors/warnings:

Error       One or more projects are incompatible with .NETFramework,Version=v4.6.1 (win7-x86).             
Error       Project Microsoft.AspNetCore.Authentication.OpenIdConnect is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0). Project Microsoft.AspNetCore.Authentication.OpenIdConnect supports: netstandard2.0 (.NETStandard,Version=v2.0)               
Error       Project Microsoft.AspNetCore.Authentication.Twitter is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0) / win7-x86. Project Microsoft.AspNetCore.Authentication.Twitter supports: netstandard2.0 (.NETStandard,Version=v2.0)                
Error       Project Microsoft.AspNetCore.Authorization.Policy is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0). Project Microsoft.AspNetCore.Authorization.Policy supports: netstandard2.0 (.NETStandard,Version=v2.0)               
Error       Project Microsoft.AspNetCore.Authentication.Google is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0) / win7-x86. Project Microsoft.AspNetCore.Authentication.Google supports: netstandard2.0 (.NETStandard,Version=v2.0)              
Error       Project Microsoft.AspNetCore.Authentication.MicrosoftAccount is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0) / win7-x86. Project Microsoft.AspNetCore.Authentication.MicrosoftAccount supports: netstandard2.0 (.NETStandard,Version=v2.0)              
Error       Package Microsoft.AspNetCore.Diagnostics 2.0.0-preview2-25336 is not compatible with net461 (.NETFramework,Version=v4.6.1) / win7-x86. Package Microsoft.AspNetCore.Diagnostics 2.0.0-preview2-25336 supports: netstandard2.0 (.NETStandard,Version=v2.0)               
Error       Project Microsoft.AspNetCore.Authentication.Google is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0). Project Microsoft.AspNetCore.Authentication.Google supports: netstandard2.0 (.NETStandard,Version=v2.0)             
Error       Project Microsoft.AspNetCore.CookiePolicy is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0). Project Microsoft.AspNetCore.CookiePolicy supports: netstandard2.0 (.NETStandard,Version=v2.0)               
Error       Package Microsoft.AspNetCore.DataProtection 2.0.0-preview2-25336 is not compatible with net461 (.NETFramework,Version=v4.6.1). Package Microsoft.AspNetCore.DataProtection 2.0.0-preview2-25336 supports: netstandard2.0 (.NETStandard,Version=v2.0)                
Error       Package Microsoft.AspNetCore.Testing 2.0.0-preview2-25336 is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0). Package Microsoft.AspNetCore.Testing 2.0.0-preview2-25336 supports:
  - net46 (.NETFramework,Version=v4.6)
  - net461 (.NETFramework,Version=v4.6.1)
  - netstandard2.0 (.NETStandard,Version=v2.0)              
Error       Project Microsoft.AspNetCore.Authentication.JwtBearer is not compatible with net461 (.NETFramework,Version=v4.6.1). Project Microsoft.AspNetCore.Authentication.JwtBearer supports: netstandard2.0 (.NETStandard,Version=v2.0)              
Error       Project Microsoft.AspNetCore.Authentication.OpenIdConnect is not compatible with net461 (.NETFramework,Version=v4.6.1) / win7-x86. Project Microsoft.AspNetCore.Authentication.OpenIdConnect supports: netstandard2.0 (.NETStandard,Version=v2.0)               
Error       Project Microsoft.AspNetCore.Authentication.JwtBearer is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0). Project Microsoft.AspNetCore.Authentication.JwtBearer supports: netstandard2.0 (.NETStandard,Version=v2.0)               
Error       One or more projects are incompatible with .NETCoreApp,Version=v2.0.                
Error       Project Microsoft.AspNetCore.Authorization is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0). Project Microsoft.AspNetCore.Authorization supports: netstandard2.0 (.NETStandard,Version=v2.0)             
Error       Project Microsoft.AspNetCore.Authentication.Twitter is not compatible with net461 (.NETFramework,Version=v4.6.1). Project Microsoft.AspNetCore.Authentication.Twitter supports: netstandard2.0 (.NETStandard,Version=v2.0)              
Error       Project Microsoft.AspNetCore.Authentication.Facebook is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0). Project Microsoft.AspNetCore.Authentication.Facebook supports: netstandard2.0 (.NETStandard,Version=v2.0)             
Error       Package Microsoft.AspNetCore.Diagnostics 2.0.0-preview2-25336 is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0). Package Microsoft.AspNetCore.Diagnostics 2.0.0-preview2-25336 supports: netstandard2.0 (.NETStandard,Version=v2.0)               
Error       Package Microsoft.AspNetCore.Hosting 2.0.0-preview2-25336 is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0) / win7-x86. Package Microsoft.AspNetCore.Hosting 2.0.0-preview2-25336 supports: netstandard2.0 (.NETStandard,Version=v2.0)                
Error       One or more packages are incompatible with .NETCoreApp,Version=v2.0 (win7-x86).             
Error       One or more packages are incompatible with .NETFramework,Version=v4.6.1.                
Error       Project Microsoft.AspNetCore.Authentication.Facebook is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0) / win7-x86. Project Microsoft.AspNetCore.Authentication.Facebook supports: netstandard2.0 (.NETStandard,Version=v2.0)              
Error       Package Microsoft.Extensions.SecretManager.Tools 2.0.0-preview2-25336 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.Extensions.SecretManager.Tools 2.0.0-preview2-25336 supports: netcoreapp2.0 (.NETCoreApp,Version=v2.0)             
Error       Project Microsoft.AspNetCore.Authentication.Google is not compatible with net461 (.NETFramework,Version=v4.6.1). Project Microsoft.AspNetCore.Authentication.Google supports: netstandard2.0 (.NETStandard,Version=v2.0)                
Error       Project Microsoft.AspNetCore.Authorization is not compatible with net461 (.NETFramework,Version=v4.6.1). Project Microsoft.AspNetCore.Authorization supports: netstandard2.0 (.NETStandard,Version=v2.0)                
Error       Package Microsoft.AspNetCore.Hosting 2.0.0-preview2-25336 is not compatible with net461 (.NETFramework,Version=v4.6.1) / win7-x86. Package Microsoft.AspNetCore.Hosting 2.0.0-preview2-25336 supports: netstandard2.0 (.NETStandard,Version=v2.0)               
Error       Package Microsoft.AspNetCore.Http 2.0.0-preview2-25336 is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0). Package Microsoft.AspNetCore.Http 2.0.0-preview2-25336 supports: netstandard2.0 (.NETStandard,Version=v2.0)             
Error       Package Microsoft.AspNetCore.Server.Kestrel 2.0.0-preview2-25336 is not compatible with net461 (.NETFramework,Version=v4.6.1) / win7-x86. Package Microsoft.AspNetCore.Server.Kestrel 2.0.0-preview2-25336 supports: netstandard2.0 (.NETStandard,Version=v2.0)             
Error       Package Microsoft.AspNetCore.Server.Kestrel.Https 2.0.0-preview2-25336 is not compatible with net461 (.NETFramework,Version=v4.6.1) / win7-x86. Package Microsoft.AspNetCore.Server.Kestrel.Https 2.0.0-preview2-25336 supports: netstandard2.0 (.NETStandard,Version=v2.0)             
Error       Project Microsoft.AspNetCore.Authorization.Policy is not compatible with net461 (.NETFramework,Version=v4.6.1). Project Microsoft.AspNetCore.Authorization.Policy supports: netstandard2.0 (.NETStandard,Version=v2.0)              
Error       Package Microsoft.AspNetCore.Server.IISIntegration 2.0.0-preview2-25336 is not compatible with net461 (.NETFramework,Version=v4.6.1). Package Microsoft.AspNetCore.Server.IISIntegration 2.0.0-preview2-25336 supports: netstandard2.0 (.NETStandard,Version=v2.0)              
Error       One or more projects are incompatible with .NETFramework,Version=v4.6.1.                
Error       Package Microsoft.AspNetCore.DataProtection.Extensions 2.0.0-preview2-25336 is not compatible with net461 (.NETFramework,Version=v4.6.1). Package Microsoft.AspNetCore.DataProtection.Extensions 2.0.0-preview2-25336 supports: netstandard2.0 (.NETStandard,Version=v2.0)              
Error       Package Microsoft.AspNetCore.Server.Kestrel 2.0.0-preview2-25336 is not compatible with net461 (.NETFramework,Version=v4.6.1). Package Microsoft.AspNetCore.Server.Kestrel 2.0.0-preview2-25336 supports: netstandard2.0 (.NETStandard,Version=v2.0)                
Error       Project Microsoft.AspNetCore.Authentication.Facebook is not compatible with net461 (.NETFramework,Version=v4.6.1). Project Microsoft.AspNetCore.Authentication.Facebook supports: netstandard2.0 (.NETStandard,Version=v2.0)                
Error       Package Microsoft.AspNetCore.DataProtection 2.0.0-preview2-25336 is not compatible with net461 (.NETFramework,Version=v4.6.1) / win7-x86. Package Microsoft.AspNetCore.DataProtection 2.0.0-preview2-25336 supports: netstandard2.0 (.NETStandard,Version=v2.0)             
Error       One or more projects are incompatible with .NETCoreApp,Version=v2.0 (win7-x86).             
Error       Project Microsoft.AspNetCore.Authentication.JwtBearer is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0) / win7-x86. Project Microsoft.AspNetCore.Authentication.JwtBearer supports: netstandard2.0 (.NETStandard,Version=v2.0)                
Error       Package Microsoft.AspNetCore.Diagnostics 2.0.0-preview2-25336 is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0) / win7-x86. Package Microsoft.AspNetCore.Diagnostics 2.0.0-preview2-25336 supports: netstandard2.0 (.NETStandard,Version=v2.0)                
Error       Package Microsoft.AspNetCore.DataProtection 2.0.0-preview2-25336 is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0) / win7-x86. Package Microsoft.AspNetCore.DataProtection 2.0.0-preview2-25336 supports: netstandard2.0 (.NETStandard,Version=v2.0)              
Error       Project Microsoft.AspNetCore.Authentication.MicrosoftAccount is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0). Project Microsoft.AspNetCore.Authentication.MicrosoftAccount supports: netstandard2.0 (.NETStandard,Version=v2.0)             
Error       Package Microsoft.AspNetCore.Server.Kestrel 2.0.0-preview2-25336 is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0). Package Microsoft.AspNetCore.Server.Kestrel 2.0.0-preview2-25336 supports: netstandard2.0 (.NETStandard,Version=v2.0)             
Error       Package Microsoft.AspNetCore.TestHost 2.0.0-preview2-25336 is not compatible with net461 (.NETFramework,Version=v4.6.1). Package Microsoft.AspNetCore.TestHost 2.0.0-preview2-25336 supports: netstandard2.0 (.NETStandard,Version=v2.0)                
Error       Package Microsoft.AspNetCore.StaticFiles 2.0.0-preview2-25336 is not compatible with net461 (.NETFramework,Version=v4.6.1) / win7-x86. Package Microsoft.AspNetCore.StaticFiles 2.0.0-preview2-25336 supports: netstandard2.0 (.NETStandard,Version=v2.0)               
Error       One or more packages are incompatible with .NETFramework,Version=v4.6.1 (win7-x86).             
Error       Package Microsoft.AspNetCore.DataProtection 2.0.0-preview2-25336 is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0). Package Microsoft.AspNetCore.DataProtection 2.0.0-preview2-25336 supports: netstandard2.0 (.NETStandard,Version=v2.0)             
Error       Package Microsoft.AspNetCore.Server.IISIntegration 2.0.0-preview2-25336 is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0) / win7-x86. Package Microsoft.AspNetCore.Server.IISIntegration 2.0.0-preview2-25336 supports: netstandard2.0 (.NETStandard,Version=v2.0)                
Error       Package Microsoft.AspNetCore.StaticFiles 2.0.0-preview2-25336 is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0). Package Microsoft.AspNetCore.StaticFiles 2.0.0-preview2-25336 supports: netstandard2.0 (.NETStandard,Version=v2.0)               
Error       One or more packages are incompatible with .NETCoreApp,Version=v2.0.                
Error       One or more packages are incompatible with .NETCoreApp,Version=v1.0.                
Error       Package Microsoft.AspNetCore.Server.IISIntegration 2.0.0-preview2-25336 is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0). Package Microsoft.AspNetCore.Server.IISIntegration 2.0.0-preview2-25336 supports: netstandard2.0 (.NETStandard,Version=v2.0)               
Error       Project Microsoft.AspNetCore.Authentication.Cookies is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0) / win7-x86. Project Microsoft.AspNetCore.Authentication.Cookies supports: netstandard2.0 (.NETStandard,Version=v2.0)                
Error       Package Microsoft.AspNetCore.Hosting 2.0.0-preview2-25336 is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0). Package Microsoft.AspNetCore.Hosting 2.0.0-preview2-25336 supports: netstandard2.0 (.NETStandard,Version=v2.0)               
Error       Package Microsoft.AspNetCore.StaticFiles 2.0.0-preview2-25336 is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0) / win7-x86. Package Microsoft.AspNetCore.StaticFiles 2.0.0-preview2-25336 supports: netstandard2.0 (.NETStandard,Version=v2.0)                
Error       Package Microsoft.AspNetCore.Http 2.0.0-preview2-25336 is not compatible with net461 (.NETFramework,Version=v4.6.1). Package Microsoft.AspNetCore.Http 2.0.0-preview2-25336 supports: netstandard2.0 (.NETStandard,Version=v2.0)                
Error       Package Microsoft.AspNetCore.Server.Kestrel 2.0.0-preview2-25336 is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0) / win7-x86. Package Microsoft.AspNetCore.Server.Kestrel 2.0.0-preview2-25336 supports: netstandard2.0 (.NETStandard,Version=v2.0)              
Error       Project Microsoft.AspNetCore.Authentication.OpenIdConnect is not compatible with net461 (.NETFramework,Version=v4.6.1). Project Microsoft.AspNetCore.Authentication.OpenIdConnect supports: netstandard2.0 (.NETStandard,Version=v2.0)              
Error       Package Microsoft.AspNetCore.Server.IISIntegration 2.0.0-preview2-25336 is not compatible with net461 (.NETFramework,Version=v4.6.1) / win7-x86. Package Microsoft.AspNetCore.Server.IISIntegration 2.0.0-preview2-25336 supports: netstandard2.0 (.NETStandard,Version=v2.0)               

Solution

  • Question is a bit dated now. I am writing this with posterity in mind.

    Description:

    I ended up with a similar pile of error messages after:

    -Being notified that a particular development project got updated to .NET Core 2.0

    -Downloading and installing .NET Core 2.0

    -Merging the updated branch

    -Doing a clean build

    Solution:

    I checked the project properties and realized that .NET Core 2.0 installation did not appear in "Target Framework" drop down.

    The problem went away after I updated VS2017 to latest available patch. After which .NET Core 2.0 was available as a target framework.