Skip to content
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

Attempting to GenerateReferenceSource for System.Runtime fails #34604

Closed
tannergooding opened this issue Apr 6, 2020 · 7 comments · Fixed by #35818
Closed

Attempting to GenerateReferenceSource for System.Runtime fails #34604

tannergooding opened this issue Apr 6, 2020 · 7 comments · Fixed by #35818

Comments

@tannergooding
Copy link
Member

As per the title, the following fails:

D:\tagoo\Repos\runtime\src\libraries\System.Runtime\src> dotnet msbuild /t:GenerateReferenceSource /p:Configuration=Release
Microsoft (R) Build Engine version 16.5.0+d4cbfca49 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  Unable to resolve assembly 'Assembly(Name=System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)' referenced by 'Microsoft.Cci.DummyModule'
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added area-Infrastructure-libraries untriaged New issue has not been triaged by the area owner labels Apr 6, 2020
@ghost
Copy link

ghost commented Apr 6, 2020

Tagging @safern, @ViktorHofer as an area owner

@safern
Copy link
Member

safern commented Apr 6, 2020

cc: @ericstj

I repro this locally. We're missing two things here for assemblies that have a ReferenceFromRuntime. We need to pass down the --follow-type-forwards argument and also, instead of use the ref\netcoreapp* directory as --lib-path we should pass the runtime dir for libraries and the coreclr dir using the liveBuild.targets targets to get the runtime files.

@ericstj
Copy link
Member

ericstj commented Apr 6, 2020

So the way I'd expect this to work is that --follow-type-forwards is the default for any project that uses ReferenceFromRuntime (assuming it isn't already set) and for --lib-path it gets derived from all the directories passed as @(ReferencePath) to the compiler.

@safern
Copy link
Member

safern commented Apr 6, 2020

and for --lib-path it gets derived from all the directories passed as @(ReferencePath) to the compiler.

Right, however for that we would need to make GenerateReferenceSource depend on ResolveAssemblyReferences target because right now ReferencePath itemgroup is not populated.

@pgovind
Copy link

pgovind commented May 14, 2020

Not sure if this is something specific to me, but after I updated my System.Runtime.cs file, VS started crashing when I tried to open it.

@danmoseley
Copy link
Member

VS crash? That's not good - can you get a callstack? Let's get a bug opened against them

@pgovind
Copy link

pgovind commented May 14, 2020

Yup yup. I'm going to be debugging this a little later and will capture a log then.

@ghost ghost locked as resolved and limited conversation to collaborators Dec 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants