Merge pull request #1542 from ninjarobot/UriTemplateMatchException
[mono.git] / mcs / tools / xbuild / data / 12.0 / Microsoft.Common.targets
index 4e8bc4d76e34218f1fea4cddc019aa7f1c899593..fdf43ccd488b2b7019eda123ea3625c93ae92179 100644 (file)
                        Text="OutDir property must end with a slash."/>
        </Target>
 
-       <Target Name="PrepareForBuild">
+       <PropertyGroup>
+               <PrepareForBuildDependsOn>AssignLinkMetadata</PrepareForBuildDependsOn>
+       </PropertyGroup>
+       <Target Name="PrepareForBuild" DependsOnTargets="$(PrepareForBuildDependsOn)">
                <Message Importance="High" Text="Configuration: $(Configuration) Platform: $(Platform)"/>
 
                <!-- Look for app.config, if $(AppConfig) is specified, then use that. Else look in
                />
        </Target>
 
+       <Target Name="AssignLinkMetadata">
+           <AssignLinkMetadata Items="@(EmbeddedResource)" Condition="'@(EmbeddedResource)' != '' and '%(EmbeddedResource.DefiningProjectFullPath)' != '$(MSBuildProjectFullPath)'">
+             <Output TaskParameter="OutputItems" ItemName="_EmbeddedResourceWithLinkAssigned" />
+           </AssignLinkMetadata>
+
+           <ItemGroup>
+               <EmbeddedResource Remove="@(_EmbeddedResourceWithLinkAssigned)" />
+               <EmbeddedResource Include="@(_EmbeddedResourceWithLinkAssigned)" />
+               <_EmbeddedResourceWithLinkAssigned Remove="@(_EmbeddedResourceWithLinkAssigned)" />
+           </ItemGroup>
+       </Target>
+
        <PropertyGroup>
                <GetFrameworkPathsDependsOn />
        </PropertyGroup>
                Condition="'$(TargetFrameworkIdentifier)' == '' or '$(TargetFrameworkIdentifier)' == '.NETFramework'"
                DependsOnTargets="$(GetFrameworkPathsDependsOn)">
                <GetFrameworkPath>
-                       <Output Condition="'$(TargetFrameworkVersion)' == 'v4.5'"
+                       <Output Condition="'$(TargetFrameworkVersion)' == 'v4.5' and '$(TargetFrameworkVersion)' == 'v4.5.1'"
                                TaskParameter="FrameworkVersion45Path"
                                ItemName="_CombinedTargetFrameworkDirectoriesItem"/>
                        <Output Condition="'$(TargetFrameworkVersion)' == 'v4.0'"
                </CreateProperty>
 
                <Warning Text="TargetFrameworkVersion '$(TargetFrameworkVersion)' not supported by this toolset (ToolsVersion: $(MSBuildToolsVersion))."
-                       Condition="'$(TargetFrameworkVersion)' != 'v4.5' and '$(TargetFrameworkVersion)' != 'v4.0' and '$(TargetFrameworkVersion)' != 'v3.5' and '$(TargetFrameworkVersion)' != 'v3.0' and '$(TargetFrameworkVersion)' != 'v2.0'"/>
+                       Condition="'$(TargetFrameworkVersion)' != 'v4.5.1' and '$(TargetFrameworkVersion)' != 'v4.5' and '$(TargetFrameworkVersion)' != 'v4.0' and '$(TargetFrameworkVersion)' != 'v3.5' and '$(TargetFrameworkVersion)' != 'v3.0' and '$(TargetFrameworkVersion)' != 'v2.0'"/>
        </Target>
 
        <PropertyGroup>