diff options
author | Alex Perovich <alperovi@microsoft.com> | 2016-10-07 22:46:17 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-07 22:46:17 +0300 |
commit | 1865bf5ca4e39918cbd32c69ebcf2cbe203c774f (patch) | |
tree | eb953ceb959bd0e5953ff212261d2d546a05d482 /dir.targets | |
parent | 31bf15bb5763b20106cc7d35314db3893d85f3e8 (diff) |
Add Source Index generation project (#12326)
* Add Source Index generation project
* Add error and fix bad working directory
* Remove .builds file GetTargetPath
* Address nits
* Add a proper ending tag.
Diffstat (limited to 'dir.targets')
-rw-r--r-- | dir.targets | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/dir.targets b/dir.targets index 7d45879e5d..e51ab5fa25 100644 --- a/dir.targets +++ b/dir.targets @@ -70,4 +70,24 @@ </ItemGroup> </Target> + <Target Name="RewriteReferences" Condition="'$(SourceIndex)' == 'true'" AfterTargets="ResolveNuGetPackages"> + <ItemGroup> + <Reference Remove="@(_ReferenceFromPackage)"/> + <_ReferenceProjectToHarvest Include="@(_ReferenceFromPackage -> '$(MSBuildThisFileDirectory)src/%(Filename)/src/%(FileName).csproj')"/> + <_ReferenceProjectToHarvest Include="@(_ReferenceFromPackage -> '$(MSBuildThisFileDirectory)src/%(Filename)/src/%(FileName).vbproj')"/> + </ItemGroup> + + <MSBuild Condition="'$(SourceIndex)' == 'true' AND Exists('%(Identity)')" + Projects="%(_ReferenceProjectToHarvest.Identity)" + Targets="GetTargetPath"> + <Output TaskParameter="TargetOutputs" ItemName="_PackageLibReferencePath"/> + </MSBuild> + <Error Condition="!Exists('%(_PackageLibReferencePath.Identity)')" Text="Required Reference '%(Identity)' does not exist. Ensure that you have built the entire tree."/> + <ItemGroup Condition=" '$(SourceIndex)' == 'true' "> + <ReferencePath Include="%(_PackageLibReferencePath.Identity)" Condition="Exists('%(Identity)')"/> + <ReferencePath Include="$(PackagesDir)runtime.win7-x64.Microsoft.NETCore.Runtime.CoreCLR\1.2.0-$(CoreClrExpectedPrerelease)\runtimes\win7-x64\lib\netstandard1.0\mscorlib.dll"/> + <ReferencePath Include="$(PackagesDir)runtime.win7-x64.Microsoft.NETCore.Runtime.CoreCLR\1.2.0-$(CoreClrExpectedPrerelease)\runtimes\win7-x64\lib\netstandard1.0\System.Private.CoreLib.dll"/> + </ItemGroup> + </Target> + </Project> |