2017-05-31 23 views
1

我想深入瞭解由gihub託管的asp.net核心源碼。在windows 10上使用VS2017構建github的aspnet核心源碼

所以採取asp.net core security可以在這裏找到 - https://github.com/aspnet/Security

我已經下載並安裝了GitHub桌面。我在本地機器上克隆了本地回購。我期待在Dev分支:

Git dev

我已經下載並從https://www.microsoft.com/net/core/preview#windowscmd我認爲項目目標安裝SDK(我可能是錯的),但這裏是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> 

有一個解決方案文件(Security.sln)和一個build.cmd,build.ps1,build.sh。我希望能夠加載解決方案並進行編譯,但事情似乎永遠不再那麼簡單。

運行build.ps1似乎安裝了一些東西,然後build.cmd似乎執行,我已經在VS2017加載解決方案。我無法獲得任何東西。

錯誤窗口現在瘋狂地出現一組錯誤,這些錯誤似乎陷入循環從10增加到88,然後在無限循環中回到10。

我無法在建立這些解決方案的任何地方找到任何信息。任何人都可以給我一個建立它們所需要的東西的頭腦嗎?它遲到了,漫長的一天,我的眼睛受傷了。

這裏是錯誤/警告的選擇:

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)    

回答

2

問題是現在有點過時。我正在考慮後人的這一點。

說明:

我結束了一個類似的一堆錯誤信息後:

-Being通知特定的開發項目得到了更新,以.NET核2.0

-Downloading和安裝.NET Core 2.0

- 對更新的分支進行構建

-Doing一個乾淨的構建

解決方案:

我檢查項目屬性,並意識到.NET核2.0的安裝並沒有出現在「目標框架」下拉菜單。

我將VS2017更新到最新的可用補丁後,問題就消失了。之後,.NET Core 2.0可用作目標框架。

+1

確實。這是我在15.3可用時所做的第一件事。它只是建立在VS2017更新3開箱即用。 – Andez

+0

我不得不更新。 VS2017只是一大塊廢話 –

相關問題