-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Common.targets support for reference assemblies (#2039)
Provides an item, `ReferencePathWithInterfaceOnlyAssemblies`, that consists of the reference (interface-only) versions of assemblies where available, allowing a consuming task to be incrementally up-to-date after implementation-only changes have been made to a reference. When `%(ReferenceAssembly)` metadata is unavailable for a given reference, the new item contains the implementation assembly directly. Additionally creates a new output item for the current project's reference assembly when `$(ProduceReferenceAssembly)` is true. If this is created, it is copied to the output directory using the new `CopyRefAssembly` task, which copies only if the ref assembly is different from the current file. If present, the ref asm is passed to the project's consumes in metadata. Introduce $(CompileUsingReferenceAssemblies), which can avoid passing reference assemblies to the compiler when set to false. This is not expected to be commonly used. IDE fast up-to-date checks need to be able to compare timestamps on _both_ the reference assembly (to see if a recompile is needed) and the implementation assembly (because it needs to be copied to an output location). Provide OriginalPathmetadata on the adjusted references that points back to the implementation assembly if a ref assembly was found. When a project both uses and produces reference assemblies, its primary output assembly might be up to date while (transitive) references need to be copied to its output directory. This case fooled the Visual Studio Fast Up-To-Date check, because the transitive dependencies aren't listed as project inputs (because design-time builds disable RAR's FindDependencies for performance reasons). To account for this, introduce a new file that is updated whenever _CopyFilesMarkedCopyLocal does actual work, pass it along as part of the project's output, and consider it a project input for the FUTD check. See #1986, dotnet/roslyn#2184.
- Loading branch information
1 parent
67954cb
commit e3a3d69
Showing
2 changed files
with
91 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters