Permalink
Browse files

Workaround for incorrect TFM attribute on assembly.

  • Loading branch information...
1 parent eb72bfe commit 43ad5119a2632765979e12cef8904e6d2408923a @dsplaisted committed Jul 26, 2016
Showing with 14 additions and 0 deletions.
  1. +14 −0 NetStandardTFM/NetStandardTFM.csproj
@@ -16,6 +16,7 @@
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
+ <TargetFrameworkMonikerAssemblyAttributesPath>$(IntermediateOutputPath)AssemblyTFMAttribute.cs</TargetFrameworkMonikerAssemblyAttributesPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -50,4 +51,17 @@
<Target Name="AfterBuild">
</Target>
-->
+ <Target Name="_SetTargetFrameworkMonikerAttribute" BeforeTargets="GenerateTargetFrameworkMonikerAttribute">
+ <PropertyGroup>
+
+ <RealTargetFrameworkMoniker>.NETStandard,Version=v1.1</RealTargetFrameworkMoniker>
+ <RealTargetFrameworkMonikerDisplayName>$(RealTargetFrameworkMoniker)</RealTargetFrameworkMonikerDisplayName>
+ <TargetFrameworkMonikerAssemblyAttributeText Condition="'$(RealTargetFrameworkMoniker)' != '' and '$(TargetingClr2Framework)' != 'true'">
+ // &lt;autogenerated /&gt;
+ using System%3b
+ using System.Reflection%3b
+ [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(&quot;$(RealTargetFrameworkMoniker)&quot;, FrameworkDisplayName = &quot;$(RealTargetFrameworkMonikerDisplayName)&quot;)]
+ </TargetFrameworkMonikerAssemblyAttributeText>
+ </PropertyGroup>
+ </Target>
</Project>

0 comments on commit 43ad511

Please sign in to comment.