Skip to content
  • Matt Ward's avatar
    [NuGet] Ensure generated files are available for code completion · 6f3fee5a
    Matt Ward authored
    The LibLog NuGet package has contentFiles that are processed by
    MSBuild and converted into .cs files that are implicitly included
    in the project. These files are generated into the obj folder,
    for example:
    
    obj/Debug/netstandard2.0/NuGet/SomeID/LibLog/5.0.0/ILog.cs
    
    These types defined inside these generated files can be referenced by
    code in the project and the project will compile but the text editor
    would show an error.
    
    These generated files are not created or returned by running the
    CoreCompileDependsOn target. So to fix this the NuGet addin has
    a project extension that overrides the OnGetSourceFiles method and
    modifies the targets being called, when the CoreCompileDependsOn
    target is evaluated, so that NuGet specific targets are also run to
    generate the files and returns them to the type system.
    
    Fixes VSTS #636061 - NuGet source transformations not recognized by
    intellisense
    6f3fee5a