@@ -40,7 +40,7 @@ public override bool Execute()
40
40
string projectTemplateContent = File . ReadAllText ( ProjectTemplate ) ;
41
41
string pkgProjectOutput = projectTemplateContent ;
42
42
string packageReferenceIncludes = "\n " ;
43
- string propertiesByTfm = "\n " ;
43
+ string tfmSpecificProperties = "\n " ;
44
44
45
45
// Make sure that we always use the same directory separator.
46
46
string relativePath = Path . GetRelativePath ( BaseTargetPath , Path . GetDirectoryName ( TargetPath ) ) . Replace ( '\\ ' , '/' ) ;
@@ -55,7 +55,7 @@ public override bool Execute()
55
55
string packageReferences = "" ;
56
56
string netStandardTag = "NETStandardImplicitPackageVersion" ;
57
57
58
- if ( targetFramework == "netstandard2.0" && ! includesNetStandard21 && ! includesNetCoreApp30 )
58
+ if ( targetFramework == "netstandard2.0" )
59
59
{
60
60
packageReferences += $ " <PackageReference Include=\" NETStandard.Library\" Version=\" $({ netStandardTag } )\" />\n ";
61
61
}
@@ -135,19 +135,18 @@ public override bool Execute()
135
135
}
136
136
}
137
137
138
- propertiesByTfm += $ " <PropertyGroup Condition=\" '$(TargetFramework)' == '{ targetFramework } ' \" >\n ";
138
+ tfmSpecificProperties += $ " <PropertyGroup Condition=\" '$(TargetFramework)' == '{ targetFramework } ' \" >\n ";
139
139
if ( subPath == "lib" )
140
140
{
141
- propertiesByTfm += $ " <OutputPath>$(ArtifactsBinDir){ relativePath } /{ subPath } /</OutputPath>\n ";
141
+ tfmSpecificProperties += $ " <OutputPath>$(ArtifactsBinDir){ relativePath } /{ subPath } /</OutputPath>\n ";
142
142
}
143
- if ( targetFramework == "netstandard2.0" ||
144
- targetFramework == "netstandard2.1" ||
143
+ if ( targetFramework == "netstandard2.1" ||
145
144
targetFramework == "netcoreapp3.0" ||
146
145
targetFramework == "net6.0" )
147
146
{
148
- propertiesByTfm += " <DisableImplicitFrameworkReferences>false</DisableImplicitFrameworkReferences>\n " ;
147
+ tfmSpecificProperties += " <DisableImplicitFrameworkReferences>false</DisableImplicitFrameworkReferences>\n " ;
149
148
}
150
- propertiesByTfm += $ " </PropertyGroup>\n \n ";
149
+ tfmSpecificProperties += $ " </PropertyGroup>\n \n ";
151
150
}
152
151
153
152
// If necessary, write the strong name key into the project file.
@@ -159,7 +158,7 @@ public override bool Execute()
159
158
}
160
159
161
160
pkgProjectOutput = pkgProjectOutput . Replace ( "$$LowerCaseFileName$$" , PackageId . ToLowerInvariant ( ) ) ;
162
- pkgProjectOutput = pkgProjectOutput . Replace ( "$$PropertiesByTfm $$" , propertiesByTfm ) ;
161
+ pkgProjectOutput = pkgProjectOutput . Replace ( "$$TfmSpecificProperties $$" , tfmSpecificProperties ) ;
163
162
pkgProjectOutput = pkgProjectOutput . Replace ( "$$RelativePath$$" , relativePath ) ;
164
163
pkgProjectOutput = pkgProjectOutput . Replace ( "$$PackageReferences$$" , packageReferenceIncludes ) ;
165
164
pkgProjectOutput = pkgProjectOutput . Replace ( "$$TargetFrameworks$$" , string . Join ( ';' , orderedTargetFrameworks ) ) ;
0 commit comments