Update resgen, typegen to use .Net Core 2.1 (#8369)
This commit is contained in:
parent
13cf8af667
commit
7c021e42e9
@ -597,9 +597,9 @@ namespace Microsoft.PowerShell.Commands
|
|||||||
|
|
||||||
#region LoadAssembly
|
#region LoadAssembly
|
||||||
|
|
||||||
// We now ship the NetCoreApp2.0 reference assemblies with PowerShell Core, so that Add-Type can work
|
// We now ship .Net Core's reference assemblies with PowerShell Core, so that Add-Type can work
|
||||||
// in a predictable way and won't be broken when we move to newer version of .NET Core.
|
// in a predictable way and won't be broken when we move to newer version of .NET Core.
|
||||||
// The NetCoreApp2.0 reference assemblies are located at '$PSHOME\ref'.
|
// The reference assemblies are located at '$PSHOME\ref'.
|
||||||
private static string s_netcoreAppRefFolder = PathType.Combine(PathType.GetDirectoryName(typeof(PSObject).Assembly.Location), "ref");
|
private static string s_netcoreAppRefFolder = PathType.Combine(PathType.GetDirectoryName(typeof(PSObject).Assembly.Location), "ref");
|
||||||
private static string s_frameworkFolder = PathType.GetDirectoryName(typeof(object).Assembly.Location);
|
private static string s_frameworkFolder = PathType.GetDirectoryName(typeof(object).Assembly.Location);
|
||||||
|
|
||||||
@ -655,7 +655,7 @@ namespace Microsoft.PowerShell.Commands
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private static IEnumerable<PortableExecutableReference> InitDefaultRefAssemblies()
|
private static IEnumerable<PortableExecutableReference> InitDefaultRefAssemblies()
|
||||||
{
|
{
|
||||||
// netcoreapp2.0 currently comes with 137 reference assemblies (maybe more in future), so we use a capacity of '150'.
|
// netcoreapp2.1 currently comes with 144 reference assemblies (maybe more in future), so we use a capacity of '150'.
|
||||||
var defaultRefAssemblies = new List<PortableExecutableReference>(150);
|
var defaultRefAssemblies = new List<PortableExecutableReference>(150);
|
||||||
|
|
||||||
foreach (string file in Directory.EnumerateFiles(s_netcoreAppRefFolder, "*.dll", SearchOption.TopDirectoryOnly))
|
foreach (string file in Directory.EnumerateFiles(s_netcoreAppRefFolder, "*.dll", SearchOption.TopDirectoryOnly))
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Description>Generates C# typed bindings for .resx files</Description>
|
<Description>Generates C# typed bindings for .resx files</Description>
|
||||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||||
<AssemblyName>resgen</AssemblyName>
|
<AssemblyName>resgen</AssemblyName>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TieredCompilation>true</TieredCompilation>
|
<TieredCompilation>true</TieredCompilation>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Description>Generates CorePsTypeCatalog.cs given powershell.inc</Description>
|
<Description>Generates CorePsTypeCatalog.cs given powershell.inc</Description>
|
||||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||||
<AssemblyName>TypeCatalogGen</AssemblyName>
|
<AssemblyName>TypeCatalogGen</AssemblyName>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TieredCompilation>true</TieredCompilation>
|
<TieredCompilation>true</TieredCompilation>
|
||||||
|
@ -11,6 +11,6 @@
|
|||||||
<NuspecProperties>runtime=$(RID);version=$(SemVer);PackageName=$(PackageName)</NuspecProperties>
|
<NuspecProperties>runtime=$(RID);version=$(SemVer);PackageName=$(PackageName)</NuspecProperties>
|
||||||
<NuspecBasePath>$(StagingPath)</NuspecBasePath>
|
<NuspecBasePath>$(StagingPath)</NuspecBasePath>
|
||||||
<IsTool>True</IsTool>
|
<IsTool>True</IsTool>
|
||||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
Loading…
Reference in New Issue
Block a user