| 1 |
<!-- |
| 2 |
*********************************************************************************************** |
| 3 |
Microsoft.Portable.Core.targets |
| 4 |
|
| 5 |
Contains common targets that are shared by all portable library projects regardless of version. |
| 6 |
|
| 7 |
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have |
| 8 |
created a backup copy. Incorrect changes to this file will make it |
| 9 |
impossible to load or build your projects from the command-line or the IDE. |
| 10 |
|
| 11 |
*********************************************************************************************** |
| 12 |
--> |
| 13 |
|
| 14 |
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| 15 |
|
| 16 |
<Import Project="VisualStudio\v$(VisualStudioVersion)\Microsoft.Portable.CurrentVersion.targets" Condition="Exists('VisualStudio\v$(VisualStudioVersion)\Microsoft.Portable.CurrentVersion.targets')"/> |
| 17 |
|
| 18 |
<Target Name="_CheckForInvalidTargetFrameworkProfile" |
| 19 |
AfterTargets="_CheckForInvalidConfigurationAndPlatform"> |
| 20 |
|
| 21 |
<Error Condition="'$(TargetFrameworkProfile)' == '' AND '$(PortableNuGetMode)' != 'true'" Text="The TargetFrameworkProfile property is not set for project '$(MSBuildProjectFile)'. Portable projects must specify a profile."/> |
| 22 |
|
| 23 |
</Target> |
| 24 |
|
| 25 |
<!-- |
| 26 |
To prevent framework assembly references from being unified to the ones in the full |
| 27 |
framework (for example, System.Net.Primitives, v3.9.0.0 -> System.Net.Primitives, v4.0.0.0), |
| 28 |
we set the full framework folder to the profile folder so that RAR thinks that the |
| 29 |
profile itself is the full framework. Given that we don't actually use our full framework, |
| 30 |
we do not need any of the warnings from RAR that are turned off because of this. |
| 31 |
--> |
| 32 |
<Target Name="_SetFullFrameworkFolderToProfile" |
| 33 |
AfterTargets="GetReferenceAssemblyPaths"> |
| 34 |
|
| 35 |
<PropertyGroup> |
| 36 |
<_FullFrameworkReferenceAssemblyPaths>$(TargetFrameworkDirectory)</_FullFrameworkReferenceAssemblyPaths> |
| 37 |
</PropertyGroup> |
| 38 |
</Target> |
| 39 |
|
| 40 |
<PropertyGroup> |
| 41 |
<ResolveReferencesDependsOn> |
| 42 |
$(ResolveReferencesDependsOn); |
| 43 |
ImplicitlyExpandTargetFramework; |
| 44 |
</ResolveReferencesDependsOn> |
| 45 |
|
| 46 |
<ImplicitlyExpandTargetFrameworkDependsOn> |
| 47 |
$(ImplicitlyExpandTargetFrameworkDependsOn); |
| 48 |
GetReferenceAssemblyPaths |
| 49 |
</ImplicitlyExpandTargetFrameworkDependsOn> |
| 50 |
|
| 51 |
</PropertyGroup> |
| 52 |
|
| 53 |
<!-- |
| 54 |
The ImplicitlyExpandTargetFramework target will expand all |
| 55 |
of the dll reference assemblies in the TargetFrameworkDirectory |
| 56 |
for the project and place the items into the ReferencePath itemgroup |
| 57 |
which contains resolved items. |
| 58 |
--> |
| 59 |
|
| 60 |
<Target Name="ImplicitlyExpandTargetFramework" |
| 61 |
Condition="'$(ImplicitlyExpandTargetFramework)' == 'true'" |
| 62 |
DependsOnTargets="$(ImplicitlyExpandTargetFrameworkDependsOn)" |
| 63 |
> |
| 64 |
<ItemGroup> |
| 65 |
<ReferenceAssemblyPaths Include="$(_TargetFrameworkDirectories)"/> |
| 66 |
<ReferencePath Include="%(ReferenceAssemblyPaths.Identity)*.dll"> |
| 67 |
<WinMDFile>false</WinMDFile> |
| 68 |
<CopyLocal>false</CopyLocal> |
| 69 |
<ReferenceGroupingDisplayName>.NET</ReferenceGroupingDisplayName> |
| 70 |
<ReferenceGrouping>$(TargetFrameworkIdentifier),$(TargetFrameworkVersion)</ReferenceGrouping> |
| 71 |
<ResolvedFrom>ImplicitlyExpandTargetFramework</ResolvedFrom> |
| 72 |
<IsSystemReference>True</IsSystemReference> |
| 73 |
</ReferencePath> |
| 74 |
</ItemGroup> |
| 75 |
|
| 76 |
<Message Importance="Low" Text="TargetMonikerDisplayName: $(TargetFrameworkMonikerDisplayName) ReferenceAssemblyPaths: @(ReferenceAssemblyPaths)"/> |
| 77 |
|
| 78 |
<Message Importance="Low" Text="Including @(ReferencePath)" |
| 79 |
Condition="'%(ReferencePath.ResolvedFrom)' == 'ImplicitlyExpandTargetFramework'"/> |
| 80 |
|
| 81 |
<ItemGroup> |
| 82 |
<_ResolveAssemblyReferenceResolvedFiles Include="@(ReferencePath)" |
| 83 |
Condition="'%(ReferencePath.ResolvedFrom)' == 'ImplicitlyExpandTargetFramework'"/> |
| 84 |
</ItemGroup> |
| 85 |
</Target> |
| 86 |
|
| 87 |
</Project> |