0

I'm not a big specialist in written control files for MSBuild, but my task is concerning building dotnet/corefx from source files. So my question is about customizing the corefx by adding some nuget packages to it. I need to add logging to some project in corefx. For example I tried to add some nuget packages for logging into System.Runtime.InteropServices project as a part of corefx. I did it in VS 2019. Packages like Microsoft.Extensions.Logging were added into the project without problems. But when I try to build whole corefx solution as written in build corefx from sources manual, I get errors like this: C:\Projects\C#\corefx-master\pkg\frameworkPackage.targets(110,5): error : Assembly 'System.Runtime.InteropServices' is missing dependency 'Microsoft.Extensions.Logging.Abstractions' [C:\Projects\C#\corefx-master\pkg\Microsoft.Private.CoreFx.NETCoreApp\Microsoft.Private.CoreFx.NETCoreApp.pkgproj] C:\Projects\C#\corefx-master\pkg\frameworkPackage.targets(110,5): error : Assembly 'System.Runtime.InteropServices' is missing dependency 'Microsoft.Extensions.Logging' [C:\Projects\C#\corefx-master\pkg\Microsoft.Private.CoreFx.NETCoreApp\Microsoft.Private.CoreFx.NETCoreApp.pkgproj] C:\Projects\C#\corefx-master\pkg\frameworkPackage.targets(110,5): error : Assembly 'System.Runtime.InteropServices' is missing dependency 'Microsoft.Extensions.Logging.EventLog' [C:\Projects\C#\corefx-master\pkg\Microsoft.Private.CoreFx.NETCoreApp\Microsoft.Private.CoreFx.NETCoreApp.pkgproj] Does somebody has experience in subj? What can I do in this situation?

I tried to add nuget package Microsoft.Extensions.Logging into project System.Runtime.InteropServices

  • It's been a while since I've built the runtime, but ... do you really want to build a custom runtime? Can't you trace what you want in other ways, like [EventPipe](https://learn.microsoft.com/en-us/dotnet/core/diagnostics/eventpipe) and PerfView? Anyhow show how you modified the build scripts and what your generated project/package files look like. – CodeCaster Mar 17 '23 at 13:34

0 Answers0