Aspnetcore: Add ASP.NET Core to https://source.dot.net

Created on 5 Feb 2019  路  39Comments  路  Source: dotnet/aspnetcore

So that we can join the family of APIs on https://source.dot.net/, we should add this repository and Extensions and EF to the list.

The source is here:

cc @KirillOsenkov @stephentoub @natemcmaster

area-infrastructure

Most helpful comment

I think I got this working. I'll send a PR.

All 39 comments

Thanks for following up on this.

cc: @alexperovich, @danmosemsft

@natemcmaster only a dup if you want to support project.json :trollface:

FWIW it looks simple and I gave it a try but I couldn't figure out how to build just the managed projects in our stack. It doesn't seem to work anymore but I haven't dug into why.

If you don't have any weird post-compile processes that change type forwards in the assemblies then the indexer build should not actually build any of the ASP.NET projects. It only needs to do a complete package restore so the compiler can get the correct ReferencePaths to analyze the sources.

Then maybe a build.cmd /t:Restore is enough to make it work. Let me try that.

Tangent - does source-indexer have the ability to take symbols as inputs and use sourcelink metadata to find the code?

I don't believe it does. Its all based on Roslyn analysis and hasn't changed significantly in a while. @KirillOsenkov wrote https://github.com/KirillOsenkov/SourceBrowser which powers https://source.dot.net/. He can give a more complete answer.

I think I got this working. I'll send a PR.

@natemcmaster no, the way it works it needs both the full built source laid out next to obj, bin and packages on the same machine, so that Roslyn MSBuildWorkspace can open the .sln and populate projects/compilations. We don't need the source to be built strictly speaking, but we need all references (NuGet) to be in place, as well as all generated files in obj, otherwise compilation will have errors and hyperlinks won't work.

Hmm, so it does need to build?

No, mostly to restore packages. It'll be good enough. Don't worry about full accuracy now.

P2Ps are currently broken. I need to figure out why.

Does MSBuildWorkspace run the ResolveReferences target?

I ran the tool on just the srcHttp* subfolder and this is what it said:

c:\dev\git\source-indexer\src\SourceBrowser\src\HtmlGenerator\bin\Debug\net461\HtmlGenerator.exe /donotincludereferencedprojects /nobuiltinfederations /noplugins /out:c:\d
  ev\git\source-indexer\bin/index/ /in:c:\dev\git\source-indexer\bin/index.list /serverPath:"c:\dev\git\source-indexer\bin/repo/aspnetcore/=https://github.com/aspnet/aspnetc
  ore/tree/ad0377e88fcb13ca05558e3bf5bd626150ab0782/" /p:TargetGroup=netcoreapp /p:RunApiCompat=false
  17:10:25 Disabling built-in federations.
  17:10:25 Adding property TargetGroup=netcoreapp
  17:10:25 Adding property RunApiCompat=false
  17:10:25 Generating website
  17:10:25 Reading assembly names from c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Authentication.Abstractions\src\Microsoft.AspNetCore.Authentication.Abstraction
  s.csproj
  17:10:26 2/5/2019 5:10:26 PM: First chance exception
  System.Runtime.InteropServices.COMException (0x80070490): Element not found. (Exception from HRESULT: 0x80070490)
  17:10:26 Reading assembly names from c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Authentication.Abstractions\src\Microsoft.AspNetCore.Authentication.Abstraction
  s.csproj complete. Took: 00:00:00.9475847
  17:10:26 Reading assembly names from c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Authentication.Core\src\Microsoft.AspNetCore.Authentication.Core.csproj
  17:10:26 Reading assembly names from c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Authentication.Core\src\Microsoft.AspNetCore.Authentication.Core.csproj complet
  e. Took: 00:00:00.1783173
  17:10:26 Reading assembly names from c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Headers\src\Microsoft.Net.Http.Headers.csproj
  17:10:27 Reading assembly names from c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Headers\src\Microsoft.Net.Http.Headers.csproj complete. Took: 00:00:00.1346843
  17:10:27 Reading assembly names from c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Http.Abstractions\src\Microsoft.AspNetCore.Http.Abstractions.csproj
  17:10:27 Reading assembly names from c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Http.Abstractions\src\Microsoft.AspNetCore.Http.Abstractions.csproj complete. T
  ook: 00:00:00.1364179
  17:10:27 Reading assembly names from c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Http.Extensions\src\Microsoft.AspNetCore.Http.Extensions.csproj
  17:10:27 Reading assembly names from c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Http.Extensions\src\Microsoft.AspNetCore.Http.Extensions.csproj complete. Took:
   00:00:00.1234079
  17:10:27 Reading assembly names from c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Http.Features\src\Microsoft.AspNetCore.Http.Features.csproj
  17:10:27 Reading assembly names from c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Http.Features\src\Microsoft.AspNetCore.Http.Features.csproj complete. Took: 00:
  00:00.2717136
  17:10:27 Reading assembly names from c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Http\src\Microsoft.AspNetCore.Http.csproj
  17:10:27 Reading assembly names from c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Http\src\Microsoft.AspNetCore.Http.csproj complete. Took: 00:00:00.1242807
  17:10:27 Reading assembly names from c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Owin\src\Microsoft.AspNetCore.Owin.csproj
  17:10:27 Reading assembly names from c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Owin\src\Microsoft.AspNetCore.Owin.csproj complete. Took: 00:00:00.1249785
  17:10:27 Reading assembly names from c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Routing.Abstractions\src\Microsoft.AspNetCore.Routing.Abstractions.csproj
  17:10:27 Reading assembly names from c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Routing.Abstractions\src\Microsoft.AspNetCore.Routing.Abstractions.csproj compl
  ete. Took: 00:00:00.1285729
  17:10:27 Reading assembly names from c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Routing\src\Microsoft.AspNetCore.Routing.csproj
  17:10:28 Reading assembly names from c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Routing\src\Microsoft.AspNetCore.Routing.csproj complete. Took: 00:00:00.127296
  1
  17:10:28 Reading assembly names from c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\WebUtilities\src\Microsoft.AspNetCore.WebUtilities.csproj
  17:10:28 Reading assembly names from c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\WebUtilities\src\Microsoft.AspNetCore.WebUtilities.csproj complete. Took: 00:00
  :00.1256453
  17:10:28 Reading type forwards from c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Authentication.Abstractions\src\Microsoft.AspNetCore.Authentication.Abstractions
  .csproj
  17:10:33 File doesn't exist: c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Authentication.Abstractions\src\bin\Debug\netcoreapp3.0\Microsoft.AspNetCore.Authentica
  tion.Abstractions.dll
  17:10:33 File doesn't exist: c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Http.Features\src\bin\Debug\netstandard2.0\Microsoft.AspNetCore.Http.Features.dll
  17:10:33 File doesn't exist: c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Http.Abstractions\src\bin\Debug\netcoreapp3.0\Microsoft.AspNetCore.Http.Abstractions.dl
  l
  17:10:33 Reading type forwards from c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Authentication.Abstractions\src\Microsoft.AspNetCore.Authentication.Abstractions
  .csproj complete. Took: 00:00:05.3406855
  17:10:33 Reading type forwards from c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Authentication.Core\src\Microsoft.AspNetCore.Authentication.Core.csproj
  17:10:37 File doesn't exist: c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Authentication.Core\src\bin\Debug\netcoreapp3.0\Microsoft.AspNetCore.Authentication.Cor
  e.dll
  17:10:37 File doesn't exist: c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Http.Features\src\bin\Debug\netstandard2.0\Microsoft.AspNetCore.Http.Features.dll
  17:10:37 File doesn't exist: c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Http.Abstractions\src\bin\Debug\netcoreapp3.0\Microsoft.AspNetCore.Http.Abstractions.dl
  l
  17:10:37 File doesn't exist: c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Authentication.Abstractions\src\bin\Debug\netcoreapp3.0\Microsoft.AspNetCore.Authentica
  tion.Abstractions.dll
  17:10:37 File doesn't exist: c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Headers\src\bin\Debug\netcoreapp3.0\Microsoft.Net.Http.Headers.dll
  17:10:37 File doesn't exist: c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Http.Extensions\src\bin\Debug\netcoreapp3.0\Microsoft.AspNetCore.Http.Extensions.dll
  17:10:37 File doesn't exist: c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\WebUtilities\src\bin\Debug\netcoreapp3.0\Microsoft.AspNetCore.WebUtilities.dll
  17:10:37 File doesn't exist: c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Http\src\bin\Debug\netcoreapp3.0\Microsoft.AspNetCore.Http.dll
  17:10:37 Reading type forwards from c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Authentication.Core\src\Microsoft.AspNetCore.Authentication.Core.csproj complete
  . Took: 00:00:03.8048393
  17:10:37 Reading type forwards from c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Headers\src\Microsoft.Net.Http.Headers.csproj
  17:10:37 File doesn't exist: c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Headers\src\bin\Debug\netcoreapp3.0\Microsoft.Net.Http.Headers.dll
  17:10:37 Reading type forwards from c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Headers\src\Microsoft.Net.Http.Headers.csproj complete. Took: 00:00:00.2521209
  17:10:37 Reading type forwards from c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Http.Abstractions\src\Microsoft.AspNetCore.Http.Abstractions.csproj
  17:10:39 File doesn't exist: c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Http.Abstractions\src\bin\Debug\netcoreapp3.0\Microsoft.AspNetCore.Http.Abstractions.dl
  l
  17:10:39 File doesn't exist: c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Http.Features\src\bin\Debug\netstandard2.0\Microsoft.AspNetCore.Http.Features.dll
  17:10:39 Reading type forwards from c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Http.Abstractions\src\Microsoft.AspNetCore.Http.Abstractions.csproj complete. To
  ok: 00:00:01.7844969
  17:10:39 Reading type forwards from c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Http.Extensions\src\Microsoft.AspNetCore.Http.Extensions.csproj
  17:10:41 File doesn't exist: c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Http.Extensions\src\bin\Debug\netcoreapp3.0\Microsoft.AspNetCore.Http.Extensions.dll
  17:10:41 File doesn't exist: c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Headers\src\bin\Debug\netcoreapp3.0\Microsoft.Net.Http.Headers.dll
  17:10:41 File doesn't exist: c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Http.Features\src\bin\Debug\netstandard2.0\Microsoft.AspNetCore.Http.Features.dll
  17:10:41 File doesn't exist: c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Http.Abstractions\src\bin\Debug\netcoreapp3.0\Microsoft.AspNetCore.Http.Abstractions.dl
  l
  17:10:41 Reading type forwards from c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Http.Extensions\src\Microsoft.AspNetCore.Http.Extensions.csproj complete. Took:
  00:00:02.4780031
  17:10:41 Reading type forwards from c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Http.Features\src\Microsoft.AspNetCore.Http.Features.csproj
  17:10:42 File doesn't exist: c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Http.Features\src\bin\Debug\netstandard2.0\Microsoft.AspNetCore.Http.Features.dll
  17:10:42 Reading type forwards from c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Http.Features\src\Microsoft.AspNetCore.Http.Features.csproj complete. Took: 00:0
  0:00.8889137
  17:10:42 Reading type forwards from c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Http\src\Microsoft.AspNetCore.Http.csproj
  17:10:45 File doesn't exist: c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Http\src\bin\Debug\netcoreapp3.0\Microsoft.AspNetCore.Http.dll
  17:10:45 File doesn't exist: c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Headers\src\bin\Debug\netcoreapp3.0\Microsoft.Net.Http.Headers.dll
  17:10:45 File doesn't exist: c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Http.Features\src\bin\Debug\netstandard2.0\Microsoft.AspNetCore.Http.Features.dll
  17:10:45 File doesn't exist: c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Http.Abstractions\src\bin\Debug\netcoreapp3.0\Microsoft.AspNetCore.Http.Abstractions.dl
  l
  17:10:45 File doesn't exist: c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\WebUtilities\src\bin\Debug\netcoreapp3.0\Microsoft.AspNetCore.WebUtilities.dll
  17:10:45 Reading type forwards from c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Http\src\Microsoft.AspNetCore.Http.csproj complete. Took: 00:00:02.7150773
  17:10:45 Reading type forwards from c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Owin\src\Microsoft.AspNetCore.Owin.csproj
  17:10:48 File doesn't exist: c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Owin\src\bin\Debug\netcoreapp3.0\Microsoft.AspNetCore.Owin.dll
  17:10:48 File doesn't exist: c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Headers\src\bin\Debug\netcoreapp3.0\Microsoft.Net.Http.Headers.dll
  17:10:48 File doesn't exist: c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Http.Features\src\bin\Debug\netstandard2.0\Microsoft.AspNetCore.Http.Features.dll
  17:10:48 File doesn't exist: c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Http.Abstractions\src\bin\Debug\netcoreapp3.0\Microsoft.AspNetCore.Http.Abstractions.dl
  l
  17:10:48 File doesn't exist: c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\WebUtilities\src\bin\Debug\netcoreapp3.0\Microsoft.AspNetCore.WebUtilities.dll
  17:10:48 File doesn't exist: c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Http\src\bin\Debug\netcoreapp3.0\Microsoft.AspNetCore.Http.dll
  17:10:48 Reading type forwards from c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Owin\src\Microsoft.AspNetCore.Owin.csproj complete. Took: 00:00:03.1345043
  17:10:48 Reading type forwards from c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Routing.Abstractions\src\Microsoft.AspNetCore.Routing.Abstractions.csproj
  17:10:50 File doesn't exist: c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Routing.Abstractions\src\bin\Debug\netcoreapp3.0\Microsoft.AspNetCore.Routing.Abstracti
  ons.dll
  17:10:50 File doesn't exist: c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Http.Features\src\bin\Debug\netstandard2.0\Microsoft.AspNetCore.Http.Features.dll
  17:10:50 File doesn't exist: c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Http.Abstractions\src\bin\Debug\netcoreapp3.0\Microsoft.AspNetCore.Http.Abstractions.dl
  l
  17:10:50 Reading type forwards from c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Routing.Abstractions\src\Microsoft.AspNetCore.Routing.Abstractions.csproj comple
  te. Took: 00:00:02.1697634
  17:10:50 Reading type forwards from c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Routing\src\Microsoft.AspNetCore.Routing.csproj
  17:10:53 File doesn't exist: c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Routing\src\bin\Debug\netcoreapp3.0\Microsoft.AspNetCore.Routing.dll
  17:10:53 File doesn't exist: c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Headers\src\bin\Debug\netcoreapp3.0\Microsoft.Net.Http.Headers.dll
  17:10:53 File doesn't exist: c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Http.Features\src\bin\Debug\netstandard2.0\Microsoft.AspNetCore.Http.Features.dll
  17:10:53 File doesn't exist: c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Http.Abstractions\src\bin\Debug\netcoreapp3.0\Microsoft.AspNetCore.Http.Abstractions.dl
  l
  17:10:53 File doesn't exist: c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Http.Extensions\src\bin\Debug\netcoreapp3.0\Microsoft.AspNetCore.Http.Extensions.dll
  17:10:53 File doesn't exist: c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Routing.Abstractions\src\bin\Debug\netcoreapp3.0\Microsoft.AspNetCore.Routing.Abstracti
  ons.dll
  17:10:53 Reading type forwards from c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Routing\src\Microsoft.AspNetCore.Routing.csproj complete. Took: 00:00:03.0316682
  17:10:53 Reading type forwards from c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\WebUtilities\src\Microsoft.AspNetCore.WebUtilities.csproj
  17:10:54 File doesn't exist: c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\WebUtilities\src\bin\Debug\netcoreapp3.0\Microsoft.AspNetCore.WebUtilities.dll
  17:10:54 File doesn't exist: c:\dev\git\source-indexer\bin\repo\aspnetcore\src\Http\Headers\src\bin\Debug\netcoreapp3.0\Microsoft.Net.Http.Headers.dll

I dunno if that has anything to do with it but I also tried it on extensions and it didn't work so its likely our custom logic for resolving refs

Good news: https://source.dot.net is now updated with aspnet/AspNetCore.
Bad news: as expected, most reference links aren't working yet.

As far as I can see the MSBuildWorkspace is building the Compile and CoreCompile targets:
http://source.roslyn.io/#Microsoft.CodeAnalysis.Workspaces.MSBuild/MSBuild/Build/ProjectBuildManager.cs,192

I'm guessing ResolveReferences is being pulled in as part of CompileDependsOn:

      ResolveReferences;
      ResolveKeySource;
      SetWin32ManifestProperties;
      FindReferenceAssembliesForReferences;
      _GenerateCompileInputs;
      BeforeCompile;
      _TimeStampBeforeCompile;
      _GenerateCompileDependencyCache;
      CoreCompile;
      _TimeStampAfterCompile;
      AfterCompile;

I'm wondering if one can pass a logger to MSBuildWorkspace to see what's going on inside it's build.

Aha, unfortunately it doesn't look like it's currently possible but this would have been a place to insert a custom logger (such as BinaryLogger):
http://source.roslyn.io/#Microsoft.CodeAnalysis.Workspaces.MSBuild/MSBuild/Build/ProjectBuildManager.cs,156

@KirillOsenkov what are the next steps?

It looks like Csc isn't receiving references to the framework during the build:
https://source.dot.net/Microsoft.AspNetCore.Server.HttpSys/diagnostics.txt

I don't know why that is. Does the ASP.NET solution or any of the individual projects build from the command line? You'd need to build from command line and inspect .binlogs to figure out why references aren't being passed.

Looks like you do need to have the solution buildable from command line using simple msbuild.exe in order for the references to work. If you need to pass additional properties, that's fine, you can pass the same properties to HtmlGenerator.

I always recommend to people that git clone + msbuild /r should be able to build the repo and it should be the north star for all repos out there ;)

We have several solutions. Way too many projects for just one single solution. How does corefx do this? I don't think they have a single solution either.

Btw, you should try adding aspnet/Extensions. That has the same reference resolution targets AND has a single solution in the repo root.

I did, it doesn't work 馃槃

I think a combination of these things is causing problems:

  1. Looks like a specific version of SDK is required:
A compatible SDK version for global.json version: [3.0.100-preview-010184] from [D:\extensions\global.json] was not found
  1. The restore.cmd specified doesn't recognize the argument
MSBUILD : error MSB1001: Unknown switch.
Switch: -nobuildnodejs
  1. The build has script files such as build.bat and restore.bat. They're completely opaque to tools such as HtmlGenerator. With MSBuild we can introspect using MSBuildWorkspace and retrieve the list of Csc command lines that way. With the .bat files in the way we have no idea to run a build programmatically and inject our loggers etc.

  2. The build relies on dotnet restore and dotnet build, and I have never used or tested these. These may or may not work with HtmlGenerator.

FYI: an update on current status. We're in source.dot.net now (for example HttpContext) but we aren't cross-linked with other people in that site. For example HttpContext.Items is a dictionary and the IDictionary<object, object> isn't clickable to jump over to the definition despite it being present on source.dot.net as well. So this item can continue to track that work.

What happened? It was added, now it was removed?

now it was removed?

Not on purpose. It's defined in:
https://github.com/dotnet/source-indexer/blob/d14bee52d995a03fef0746adab67102876d7d323/src/index/repositories.props#L59-L65
@alexperovich, do you know why ASP.NET source isn't currently showing up in source.dot.net?
cc: @danmosemsft

The aspnetcore build for the index is failing now with errors like this:
F:\workspace\_work\1\s\bin\repo\aspnetcore\src\Security\samples\Identity.ExternalClaims\Identity.ExternalClaims.csproj : error NU1202: Package Microsoft.EntityFrameworkCore.SqlServer 5.0.0-preview.6.20268.4 is not compatible with net50 (.NETFramework,Version=v5.0). Package Microsoft.EntityFrameworkCore.SqlServer 5.0.0-preview.6.20268.4 supports: netstandard2.1 (.NETStandard,Version=v2.1) [C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\NuGet\NuGet.targets] F:\workspace\_work\1\s\bin\repo\aspnetcore\src\Security\samples\DynamicSchemes\DynamicSchemes.csproj : error NU1202: Package Microsoft.EntityFrameworkCore.Tools 5.0.0-preview.6.20268.4 is not compatible with net50 (.NETFramework,Version=v5.0). Package Microsoft.EntityFrameworkCore.Tools 5.0.0-preview.6.20268.4 supports: netstandard2.1 (.NETStandard,Version=v2.1) [C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\NuGet\NuGet.targets]

This can be seen from the logs here https://dev.azure.com/dnceng/internal/_build/results?buildId=651181&view=logs&j=7e79d6de-e39e-5bca-18d8-41f08c7b8538&t=8ff4c0d3-e716-500a-c416-e60f5313e63f

This is a very weird error, I have no idea what causes it.

Maybe a mismatch issue between netcoreapp50 and net50 TFMs?

The error suggests that net50 doesn't support netstandard2.1 but that seems... odd.

It would make sense if it didn't know what net50 was, and the parenthetical ".NETFramework,Version=v5.0" seems to suggest that's the case. But maybe I'm reading too much into it. I see a bunch of TFM-related discussion in https://github.com/dotnet/aspnetcore/pull/21630, so maybe this is related.
cc: @wtgodbe

net50 should be compatible w/ netstandard2.1 - This may be happening specifically w/ EFCore packages because that repo knows about net50, but targets netstandard2.1. @dougbu @ajcvickers any thoughts on this one?

Without a new-enough SDK (5.0.100-preview.5.20258.4 seems to work) and, unless using dotnet msbuild, desktop msbuild (from VS 2019 16.6 p2 or later), weird errors about TFMs are the default.

This is not building on preview VS, its using 16.5, so that is probably the issue.

Well, if possible, use dotnet msbuild because the queues won't need to be changed 馃樅

I'm calling eng/common/build.ps1 its using VS because the repo's global.json says to.

It's not clear from the above disucssion if source indexing needs to build native projects e.g. the ANCM sources. If those projects aren't needed, set $msbuildEngine = 'dotnet' before calling eng/common/build.ps1. Otherwise, the pipeline needs to run on VS2019.Pre agents (unfortunately).

It doesn't need to build any of the native sources. I can pass that.

That fixed it. Asp.Net core is once again showing up on source.dot.net.

Was this page helpful?
0 / 5 - 0 ratings