1
0
Fork 0
mirror of https://github.com/VSadov/Satori.git synced 2025-06-11 02:13:38 +09:00

Set FlagNetStandard1XDependencies=true and fix issues (#96795)

The only product change is upgrading Microsoft.DiaSymReader from 1.4.0 to 2.0.0 in ILCompiler.TypeSystem.csproj, the rest are test changes.
This commit is contained in:
Alexander Köplinger 2024-01-25 15:19:26 +01:00 committed by GitHub
parent f86af94bd3
commit 754a554c00
Signed by: github
GPG key ID: B5690EEEBB952194
29 changed files with 73 additions and 467 deletions

View file

@ -23,6 +23,7 @@
<!-- Opt-in/out repo features -->
<UsingToolIbcOptimization>false</UsingToolIbcOptimization>
<UsingToolXliff>false</UsingToolXliff>
<FlagNetStandard1XDependencies Condition="'$(FlagNetStandard1XDependencies)' == ''">true</FlagNetStandard1XDependencies>
<!-- Use SDK compilers in full source-build. -->
<UsingToolMicrosoftNetCompilers Condition="'$(DotNetBuildFromSourceFlavor)' != 'Product'">true</UsingToolMicrosoftNetCompilers>
</PropertyGroup>
@ -129,6 +130,7 @@
<SystemIOFileSystemAccessControlVersion>5.0.0</SystemIOFileSystemAccessControlVersion>
<SystemMemoryVersion>4.5.5</SystemMemoryVersion>
<SystemReflectionMetadataVersion>7.0.0</SystemReflectionMetadataVersion>
<SystemReflectionMetadataLoadContextVersion>7.0.0</SystemReflectionMetadataLoadContextVersion>
<SystemSecurityAccessControlVersion>6.0.0</SystemSecurityAccessControlVersion>
<SystemSecurityCryptographyCngVersion>5.0.0</SystemSecurityCryptographyCngVersion>
<SystemSecurityCryptographyOpenSslVersion>5.0.0</SystemSecurityCryptographyOpenSslVersion>
@ -163,6 +165,7 @@
<optimizationlinuxarm64MIBCRuntimeVersion>1.0.0-prerelease.24071.2</optimizationlinuxarm64MIBCRuntimeVersion>
<optimizationPGOCoreCLRVersion>1.0.0-prerelease.24071.2</optimizationPGOCoreCLRVersion>
<!-- Not auto-updated. -->
<MicrosoftDiaSymReaderVersion>2.0.0</MicrosoftDiaSymReaderVersion>
<MicrosoftDiaSymReaderNativeVersion>16.11.29-beta1.23404.4</MicrosoftDiaSymReaderNativeVersion>
<SystemCommandLineVersion>2.0.0-beta4.23407.1</SystemCommandLineVersion>
<TraceEventVersion>3.1.7</TraceEventVersion>
@ -186,7 +189,7 @@
<MicrosoftDotNetXHarnessCLIVersion>9.0.0-prerelease.24066.3</MicrosoftDotNetXHarnessCLIVersion>
<MicrosoftDotNetHotReloadUtilsGeneratorBuildToolVersion>9.0.0-alpha.0.24065.1</MicrosoftDotNetHotReloadUtilsGeneratorBuildToolVersion>
<NUnitVersion>3.12.0</NUnitVersion>
<NUnitTestAdapterVersion>4.1.0</NUnitTestAdapterVersion>
<NUnit3TestAdapterVersion>4.5.0</NUnit3TestAdapterVersion>
<CoverletCollectorVersion>6.0.0</CoverletCollectorVersion>
<NewtonsoftJsonVersion>13.0.3</NewtonsoftJsonVersion>
<NewtonsoftJsonBsonVersion>1.0.2</NewtonsoftJsonBsonVersion>
@ -194,6 +197,7 @@
<MoqVersion>4.18.4</MoqVersion>
<FluentAssertionsVersion>6.7.0</FluentAssertionsVersion>
<FsCheckVersion>2.14.3</FsCheckVersion>
<CommandLineParserVersion>2.9.1</CommandLineParserVersion>
<!-- Android gRPC client tests -->
<GoogleProtobufVersion>3.19.4</GoogleProtobufVersion>
<GrpcAspNetCoreVersion>2.46.0</GrpcAspNetCoreVersion>
@ -203,6 +207,9 @@
<GrpcDotnetClientVersion>2.45.0</GrpcDotnetClientVersion>
<GrpcToolsVersion>2.45.0</GrpcToolsVersion>
<CompilerPlatformTestingVersion>1.1.2-beta1.23323.1</CompilerPlatformTestingVersion>
<CompilerPlatformTestingDiffPlexVersion>1.7.2</CompilerPlatformTestingDiffPlexVersion>
<CompilerPlatformTestingMicrosoftVisualBasicVersion>10.2.0</CompilerPlatformTestingMicrosoftVisualBasicVersion>
<CompilerPlatformTestingMicrosoftVisualStudioCompositionVersion>17.0.46</CompilerPlatformTestingMicrosoftVisualStudioCompositionVersion>
<!-- Docs -->
<MicrosoftPrivateIntellisenseVersion>8.0.0-preview-20230918.1</MicrosoftPrivateIntellisenseVersion>
<!-- Mono Cecil -->

View file

@ -1,11 +1,4 @@
<Project>
<ItemGroup>
<!-- Upgrade the NETStandard.Library transitive xunit dependency to avoid transitive 1.x NS dependencies. -->
<PackageReference Include="NETStandard.Library"
Version="$(NetStandardLibraryVersion)"
Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'" />
</ItemGroup>
<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<AutoGenerateBindingRedirects Condition="'$(AutoGenerateBindingRedirects)' == ''">true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType Condition="'$(GenerateBindingRedirectsOutputType)' == ''">true</GenerateBindingRedirectsOutputType>

View file

@ -25,7 +25,7 @@
<ItemGroup>
<PackageReference Include="System.Reflection.Metadata" Version="$(SystemReflectionMetadataVersion)" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="$(SystemRuntimeCompilerServicesUnsafeVersion)" />
</ItemGroup>
<ItemGroup>

View file

@ -15,10 +15,11 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.0.0-alpha0002" />
<PackageReference Include="FluentAssertions" Version="$(FluentAssertionsVersion)" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="$(MicrosoftCodeAnalysisCSharpVersion)" />
<PackageReference Include="Microsoft.DotNet.Cecil" Version="$(MicrosoftDotNetCecilVersion)" />
<PackageReference Include="System.Reflection.MetadataLoadContext" Version="5.0.1" />
<PackageReference Include="System.Reflection.MetadataLoadContext" Version="$(SystemReflectionMetadataLoadContextVersion)" />
<ProjectReference Include="$(ToolsProjectRoot)illink/test/Mono.Linker.Tests.Cases/**/*.csproj" />
<ProjectReference Include="$(ToolsProjectRoot)illink/test/Mono.Linker.Tests.Cases.Expectations/Mono.Linker.Tests.Cases.Expectations.csproj" />

View file

@ -28,9 +28,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Condition="'$(EnableDiaSymReaderUse)' == 'true'" Include="Microsoft.DiaSymReader">
<Version>1.4.0</Version>
</PackageReference>
<PackageReference Condition="'$(EnableDiaSymReaderUse)' == 'true'" Include="Microsoft.DiaSymReader" Version="$(MicrosoftDiaSymReaderVersion)" />
</ItemGroup>
<ItemGroup>

View file

@ -15,8 +15,4 @@
<ProjectReference Include="..\..\managed\Microsoft.NET.HostModel\Microsoft.NET.HostModel.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Win32.Registry" Version="4.3.0" />
</ItemGroup>
</Project>

View file

@ -108,8 +108,6 @@
<PackageReference Include="xunit.core" Version="$(XUnitVersion)" ExcludeAssets="build" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
<!-- Upgrade the NetStandard.Library transitive xunit dependency to avoid 1.x NS dependencies. -->
<PackageReference Include="NETStandard.Library" Version="$(NetStandardLibraryVersion)" />
<!-- Use the arcade fork of xunit.assert for AOT-compat -->
<PackageReference Include="Microsoft.DotNet.XUnitAssert" Version="$(MicrosoftDotNetXUnitAssertVersion)" />
</ItemGroup>

View file

@ -21,12 +21,6 @@
<ProjectReference Include="$(LibrariesProjectRoot)Microsoft.Extensions.DependencyInjection.Abstractions\src\Microsoft.Extensions.DependencyInjection.Abstractions.csproj" />
<PackageReference Include="xunit.assert" Version="$(XUnitVersion)" />
<PackageReference Include="xunit.extensibility.core" Version="$(XUnitVersion)" />
<!-- Upgrade the NETStandard.Library transitive xunit dependency to avoid transitive 1.x NS dependencies. -->
<PackageReference Include="NETStandard.Library"
Version="$(NetStandardLibraryVersion)"
PrivateAssets="all"
Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'" />
</ItemGroup>
</Project>

View file

@ -4,6 +4,9 @@
<TargetFrameworks>$(NetCoreAppCurrent);$(NetFrameworkMinimum)</TargetFrameworks>
<EnableDefaultItems>true</EnableDefaultItems>
<NoWarn>$(NoWarn);CS8002</NoWarn>
<!-- third party DI containers bring in NS1.x dependencies -->
<FlagNetStandard1XDependencies>false</FlagNetStandard1XDependencies>
</PropertyGroup>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->

View file

@ -1,436 +0,0 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using FluentAssertions;
using Microsoft.DotNet.ProjectModel;
using Microsoft.DotNet.ProjectModel.Compilation;
using Microsoft.DotNet.ProjectModel.Graph;
using NuGet.Frameworks;
using NuGet.Versioning;
using Xunit;
namespace Microsoft.Extensions.DependencyModel.Tests
{
public class DependencyContextBuilderTests
{
private string _referenceAssembliesPath = Path.Combine("reference", "assemblies");
private NuGetFramework _defaultFramework;
private string _defaultName = "Library.Name";
private string _defaultHash = "Hash";
private NuGetVersion _defaultVersion = new NuGetVersion(1, 2, 3, new []{"dev"}, string.Empty);
public DependencyContext Build(CommonCompilerOptions compilerOptions = null,
IEnumerable<LibraryExport> compilationExports = null,
IEnumerable<LibraryExport> runtimeExports = null,
bool portable = false,
NuGetFramework target = null,
string runtime = null)
{
_defaultFramework = NuGetFramework.Parse("net451");
return new DependencyContextBuilder(_referenceAssembliesPath).Build(
compilerOptions,
compilationExports ?? new LibraryExport[] { },
runtimeExports ?? new LibraryExport[] {},
portable,
target ?? _defaultFramework,
runtime ?? string.Empty);
}
[Fact]
public void PreservesCompilationOptions()
{
var context = Build(new CommonCompilerOptions()
{
AllowUnsafe = true,
Defines = new[] { "Define", "D" },
DelaySign = true,
EmitEntryPoint = true,
GenerateXmlDocumentation = true,
KeyFile = "Key.snk",
LanguageVersion = "C#8",
Optimize = true,
Platform = "Platform",
PublicSign = true,
WarningsAsErrors = true
});
context.CompilationOptions.AllowUnsafe.Should().Be(true);
context.CompilationOptions.DelaySign.Should().Be(true);
context.CompilationOptions.EmitEntryPoint.Should().Be(true);
context.CompilationOptions.GenerateXmlDocumentation.Should().Be(true);
context.CompilationOptions.Optimize.Should().Be(true);
context.CompilationOptions.PublicSign.Should().Be(true);
context.CompilationOptions.WarningsAsErrors.Should().Be(true);
context.CompilationOptions.Defines.Should().BeEquivalentTo(new[] { "Define", "D" });
context.CompilationOptions.KeyFile.Should().Be("Key.snk");
context.CompilationOptions.LanguageVersion.Should().Be("C#8");
context.CompilationOptions.Platform.Should().Be("Platform");
}
[Fact]
public void AlowsNullCompilationOptions()
{
var context = Build(compilerOptions: null);
context.CompilationOptions.Should().Be(CompilationOptions.Default);
}
[Fact]
public void SetsPortableFlag()
{
var context = Build(portable: true);
context.Target.IsPortable.Should().BeTrue();
}
[Fact]
public void FillsRuntimeAndTarget()
{
var context = Build(target: new NuGetFramework("SomeFramework",new Version(1,2)), runtime: "win8-x86");
context.Target.Runtime.Should().Be("win8-x86");
context.Target.Framework.Should().Be("SomeFramework,Version=v1.2");
}
[Fact]
public void SetsServiceableToTrueForPackageDescriptions()
{
var context = Build(runtimeExports: new[]
{
Export(PackageDescription("Pack.Age", servicable: false))
});
var lib = context.RuntimeLibraries.Single();
lib.Serviceable.Should().BeTrue();
}
[Fact]
public void TakesServicableFromPackageDescription()
{
var context = Build(runtimeExports: new[]
{
Export(PackageDescription("Pack.Age", servicable: true))
});
var lib = context.RuntimeLibraries.Single();
lib.Serviceable.Should().BeTrue();
}
[Fact]
public void FillsRuntimeLibraryProperties()
{
var context = Build(runtimeExports: new[]
{
Export(
PackageDescription(
"Pack.Age",
servicable: true,
hash: "Hash",
version: new NuGetVersion(1, 2, 3),
dependencies: new[]
{
new LibraryRange("System.Collections",
new VersionRange(new NuGetVersion(2, 1, 2)),
LibraryType.ReferenceAssembly,
LibraryDependencyType.Default)
},
path: "path/TO/package",
hashPath: "Pack.Age.1.2.3.nupkg.sha512"),
resourceAssemblies: new[]
{
new LibraryResourceAssembly(
new LibraryAsset("Dll", "en-US/Pack.Age.resources.dll", ""),
"en-US"
)
},
runtimeAssemblyGroups: new[]
{
new LibraryAssetGroup(
new LibraryAsset("Dll", "lib/Pack.Age.dll", "")),
new LibraryAssetGroup("win8-x64",
new LibraryAsset("Dll", "win8-x64/Pack.Age.dll", ""))
},
nativeLibraryGroups: new []
{
new LibraryAssetGroup("win8-x64",
new LibraryAsset("Dll", "win8-x64/Pack.Age.native.dll", ""))
}),
Export(
ReferenceAssemblyDescription("System.Collections",
version: new NuGetVersion(3, 3, 3)),
runtimeAssemblyGroups: new[]
{
new LibraryAssetGroup(
new LibraryAsset("Dll", "System.Collections.dll", "System.Collections.dll"))
})
});
context.RuntimeLibraries.Should().HaveCount(2);
var lib = context.RuntimeLibraries.Should().Contain(l => l.Name == "Pack.Age").Subject;
lib.Type.Should().Be("package");
lib.Serviceable.Should().BeTrue();
lib.Hash.Should().Be("sha512-Hash");
lib.Version.Should().Be("1.2.3");
lib.Dependencies.Should().OnlyContain(l => l.Name == "System.Collections" && l.Version == "3.3.3");
lib.ResourceAssemblies.Should().OnlyContain(l => l.Path == "en-US/Pack.Age.resources.dll" && l.Locale == "en-US");
// When ProjectModel supports path and hashPath in the lock file library, this should assert the values
// provided above.
lib.Path.Should().BeNull();
lib.HashPath.Should().BeNull();
lib.RuntimeAssemblyGroups.GetDefaultAssets().Should().OnlyContain(l => l == "lib/Pack.Age.dll");
lib.RuntimeAssemblyGroups.GetRuntimeAssets("win8-x64").Should().OnlyContain(l => l == "win8-x64/Pack.Age.dll");
lib.NativeLibraryGroups.GetRuntimeAssets("win8-x64").Should().OnlyContain(l => l == "win8-x64/Pack.Age.native.dll");
var asm = context.RuntimeLibraries.Should().Contain(l => l.Name == "System.Collections").Subject;
asm.Type.Should().Be("referenceassembly");
asm.Version.Should().Be("3.3.3");
asm.Hash.Should().BeEmpty();
asm.Dependencies.Should().BeEmpty();
asm.RuntimeAssemblyGroups.GetDefaultAssets().Should().OnlyContain(l => l == "System.Collections.dll");
asm.Path.Should().BeNull();
asm.HashPath.Should().BeNull();
}
[Fact]
public void FiltersDuplicatedDependencies()
{
var context = Build(runtimeExports: new[]
{
Export(PackageDescription("Pack.Age",
dependencies: new[]
{
new LibraryRange("System.Collections",
new VersionRange(new NuGetVersion(2, 0, 0)),
LibraryType.ReferenceAssembly,
LibraryDependencyType.Default),
new LibraryRange("System.Collections",
new VersionRange(new NuGetVersion(2, 1, 2)),
LibraryType.Package,
LibraryDependencyType.Default)
})
),
Export(ReferenceAssemblyDescription("System.Collections",
version: new NuGetVersion(2, 0, 0)))
});
context.RuntimeLibraries.Should().HaveCount(2);
var lib = context.RuntimeLibraries.Should().Contain(l => l.Name == "Pack.Age").Subject;
lib.Dependencies.Should().HaveCount(1);
lib.Dependencies.Should().OnlyContain(l => l.Name == "System.Collections" && l.Version == "2.0.0");
}
[Fact]
public void FillsCompileLibraryProperties()
{
var context = Build(compilationExports: new[]
{
Export(PackageDescription("Pack.Age",
servicable: true,
hash: "Hash",
version: new NuGetVersion(1, 2, 3),
dependencies: new[]
{
new LibraryRange("System.Collections",
new VersionRange(new NuGetVersion(2, 1, 2)),
LibraryType.ReferenceAssembly,
LibraryDependencyType.Default)
},
path: "path/TO/package",
hashPath: "Pack.Age.1.2.3.nupkg.sha512"),
compilationAssemblies: new[]
{
new LibraryAsset("Dll", "lib/Pack.Age.dll", ""),
}
),
Export(ReferenceAssemblyDescription("System.Collections",
version: new NuGetVersion(3, 3, 3)),
compilationAssemblies: new[]
{
new LibraryAsset("Dll", "", "System.Collections.dll"),
})
});
context.CompileLibraries.Should().HaveCount(2);
var lib = context.CompileLibraries.Should().Contain(l => l.Name == "Pack.Age").Subject;
lib.Type.Should().Be("package");
lib.Serviceable.Should().BeTrue();
lib.Hash.Should().Be("sha512-Hash");
lib.Version.Should().Be("1.2.3");
lib.Dependencies.Should().OnlyContain(l => l.Name == "System.Collections" && l.Version == "3.3.3");
lib.Assemblies.Should().OnlyContain(a => a == "lib/Pack.Age.dll");
// When ProjectModel supports path and hashPath in the lock file library, this should assert the values
// provided above.
lib.Path.Should().BeNull();
lib.HashPath.Should().BeNull();
var asm = context.CompileLibraries.Should().Contain(l => l.Name == "System.Collections").Subject;
asm.Type.Should().Be("referenceassembly");
asm.Version.Should().Be("3.3.3");
asm.Hash.Should().BeEmpty();
asm.Dependencies.Should().BeEmpty();
asm.Assemblies.Should().OnlyContain(a => a == "System.Collections.dll");
asm.Path.Should().BeNull();
asm.HashPath.Should().BeNull();
}
[Fact]
public void FillsResources()
{
var context = Build(runtimeExports: new[]
{
Export(PackageDescription("Pack.Age", version: new NuGetVersion(1, 2, 3)),
resourceAssemblies: new []
{
new LibraryResourceAssembly(new LibraryAsset("Dll", "resources/en-US/Pack.Age.dll", ""), "en-US")
})
});
context.RuntimeLibraries.Should().HaveCount(1);
var lib = context.RuntimeLibraries.Should().Contain(l => l.Name == "Pack.Age").Subject;
lib.ResourceAssemblies.Should().OnlyContain(l => l.Locale == "en-US" && l.Path == "resources/en-US/Pack.Age.dll");
}
[Fact]
public void ReferenceAssembliesPathRelativeToDefaultRoot()
{
var context = Build(compilationExports: new[]
{
Export(ReferenceAssemblyDescription("System.Collections",
version: new NuGetVersion(3, 3, 3)),
compilationAssemblies: new[]
{
new LibraryAsset("Dll", "", Path.Combine(_referenceAssembliesPath, "sub", "System.Collections.dll"))
})
});
var asm = context.CompileLibraries.Should().Contain(l => l.Name == "System.Collections").Subject;
asm.Assemblies.Should().OnlyContain(a => a == Path.Combine("sub", "System.Collections.dll"));
}
[Fact]
public void SkipsBuildDependencies()
{
var context = Build(compilationExports: new[]
{
Export(PackageDescription("Pack.Age",
dependencies: new[]
{
new LibraryRange("System.Collections",
new VersionRange(new NuGetVersion(2, 1, 2)),
LibraryType.ReferenceAssembly,
LibraryDependencyType.Build)
})
),
Export(ReferenceAssemblyDescription("System.Collections",
version: new NuGetVersion(3, 3, 3)))
});
var lib = context.CompileLibraries.Should().Contain(l => l.Name == "Pack.Age").Subject;
lib.Dependencies.Should().BeEmpty();
}
[Fact]
public void GeneratesRuntimeSignatureOutOfPackageNamesAndVersions()
{
var context = Build(runtimeExports: new[]
{
Export(PackageDescription("Pack.Age", new NuGetVersion(1, 2, 3))),
Export(PackageDescription("Pack.Age", new NuGetVersion(1, 2, 3))),
});
context.Target.RuntimeSignature.Should().Be("d0fc00006ed69e4aae80383dda08599a6892fd31");
}
private LibraryExport Export(
LibraryDescription description,
IEnumerable<LibraryAsset> compilationAssemblies = null,
IEnumerable<LibraryAssetGroup> runtimeAssemblyGroups = null,
IEnumerable<LibraryAssetGroup> nativeLibraryGroups = null,
IEnumerable<LibraryResourceAssembly> resourceAssemblies = null)
{
return LibraryExportBuilder.Create(description)
.WithCompilationAssemblies(compilationAssemblies)
.WithRuntimeAssemblyGroups(runtimeAssemblyGroups)
.WithNativeLibraryGroups(nativeLibraryGroups)
.WithResourceAssemblies(resourceAssemblies)
.Build();
}
private PackageDescription PackageDescription(
string name = null,
NuGetVersion version = null,
string hash = null,
IEnumerable<LibraryRange> dependencies = null,
bool? servicable = null,
string path = null,
string hashPath = null)
{
// The LockFilePackageLibrary type in Microsoft.DotNet.ProjectModel currently does not
// support the "path" property. Therefore, the path property to this method is ignored
// and calling tests should assert that the value is not plumbed through.
return new PackageDescription(
"PATH",
new LockFilePackageLibrary()
{
Files = new string[] { },
IsServiceable = servicable ?? false,
Name = name ?? _defaultName,
Version = version ?? _defaultVersion,
Sha512 = hash ?? _defaultHash
},
new LockFileTargetLibrary(),
dependencies ?? Enumerable.Empty<LibraryRange>(),
true,
true);
}
private ProjectDescription ProjectDescription(
string name = null,
NuGetVersion version = null,
IEnumerable<LibraryRange> dependencies = null)
{
return new ProjectDescription(
new LibraryRange(
name ?? _defaultName,
new VersionRange(version ?? _defaultVersion),
LibraryType.Project,
LibraryDependencyType.Default
),
new Project(),
dependencies ?? Enumerable.Empty<LibraryRange>(),
new TargetFrameworkInformation(),
true);
}
private LibraryDescription ReferenceAssemblyDescription(
string name = null,
NuGetVersion version = null)
{
return new LibraryDescription(
new LibraryIdentity(
name ?? _defaultName,
version ?? _defaultVersion,
LibraryType.ReferenceAssembly),
string.Empty, // Framework assemblies don't have hashes
"PATH",
Enumerable.Empty<LibraryRange>(),
_defaultFramework,
true,
true);
}
}
}

View file

@ -13,8 +13,6 @@
<ItemGroup>
<PackageReference Include="FluentAssertions" Version="$(FluentAssertionsVersion)" />
<PackageReference Include="Microsoft.DotNet.InternalAbstractions" Version="1.0.0" />
<PackageReference Include="Microsoft.DotNet.ProjectModel" Version="1.0.0-rc3-003121" />
<PackageReference Include="Moq" Version="$(MoqVersion)" />
<ProjectReference Include="..\src\Microsoft.Extensions.DependencyModel.csproj" SkipUseReferenceAssembly="true" />
<ProjectReference Include="nonentrypointassembly\nonentrypointassembly.csproj" />

View file

@ -3,6 +3,8 @@
<PropertyGroup>
<AnalyzerRoslynVersion>3.11</AnalyzerRoslynVersion>
<RoslynApiVersion>$(MicrosoftCodeAnalysisVersion_3_11)</RoslynApiVersion>
<!-- this Roslyn version brings in NS1.x dependencies -->
<FlagNetStandard1XDependencies>false</FlagNetStandard1XDependencies>
</PropertyGroup>
<Import Project="Microsoft.Extensions.Logging.Generators.targets" />

View file

@ -4,6 +4,8 @@
<AnalyzerRoslynVersion>4.0</AnalyzerRoslynVersion>
<RoslynApiVersion>$(MicrosoftCodeAnalysisVersion_4_0)</RoslynApiVersion>
<DefineConstants>$(DefineConstants);ROSLYN4_0_OR_GREATER</DefineConstants>
<!-- this Roslyn version brings in NS1.x dependencies -->
<FlagNetStandard1XDependencies>false</FlagNetStandard1XDependencies>
</PropertyGroup>
<Import Project="Microsoft.Extensions.Logging.Generators.targets" />

View file

@ -3,6 +3,8 @@
<PropertyGroup>
<RoslynApiVersion>$(MicrosoftCodeAnalysisVersion_3_11)</RoslynApiVersion>
<IsHighAotMemoryUsageTest>true</IsHighAotMemoryUsageTest>
<!-- this Roslyn version brings in NS1.x dependencies -->
<FlagNetStandard1XDependencies>false</FlagNetStandard1XDependencies>
</PropertyGroup>
<ItemGroup>

View file

@ -6,6 +6,8 @@
<IsHighAotMemoryUsageTest>true</IsHighAotMemoryUsageTest>
<EmccLinkOptimizationFlag Condition="'$(ContinuousIntegrationBuild)' == 'true'">-O1</EmccLinkOptimizationFlag>
<WasmNativeStrip>false</WasmNativeStrip>
<!-- this Roslyn version brings in NS1.x dependencies -->
<FlagNetStandard1XDependencies>false</FlagNetStandard1XDependencies>
</PropertyGroup>
<ItemGroup>

View file

@ -94,6 +94,6 @@
</ItemGroup>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<ProjectReference Include="..\src\System.Collections.Immutable.csproj" />
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
<PackageReference Include="System.ValueTuple" Version="$(SystemValueTupleVersion)" />
</ItemGroup>
</Project>

View file

@ -10,6 +10,11 @@
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Analyzer.Testing" Version="$(CompilerPlatformTestingVersion)" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing" Version="$(CompilerPlatformTestingVersion)" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing" Version="$(CompilerPlatformTestingVersion)" />
<!-- Upgrade transitive references of Microsoft.CodeAnalysis.Analyzer.Testing which bring in NS 1.x deps -->
<PackageReference Include="DiffPlex" Version="$(CompilerPlatformTestingDiffPlexVersion)" />
<PackageReference Include="Microsoft.VisualBasic" Version="$(CompilerPlatformTestingMicrosoftVisualBasicVersion)" />
<PackageReference Include="Microsoft.VisualStudio.Composition" Version="$(CompilerPlatformTestingMicrosoftVisualStudioCompositionVersion)" />
</ItemGroup>
<ItemGroup>

View file

@ -19,6 +19,12 @@
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing" Version="$(CompilerPlatformTestingVersion)" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime.InteropServices\tests\Ancillary.Interop\Ancillary.Interop.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime.InteropServices.JavaScript\gen\JSImportGenerator\JSImportGenerator.csproj" />
<!-- Upgrade transitive references of Microsoft.CodeAnalysis.Analyzer.Testing which bring in NS 1.x deps -->
<PackageReference Include="DiffPlex" Version="$(CompilerPlatformTestingDiffPlexVersion)" />
<PackageReference Include="Microsoft.VisualBasic" Version="$(CompilerPlatformTestingMicrosoftVisualBasicVersion)" />
<PackageReference Include="Microsoft.VisualStudio.Composition" Version="$(CompilerPlatformTestingMicrosoftVisualStudioCompositionVersion)" />
<None Include="$(RepoRoot)/NuGet.config" Link="NuGet.config" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
</Project>

View file

@ -28,6 +28,11 @@
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Analyzer.Testing" Version="$(CompilerPlatformTestingVersion)" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing" Version="$(CompilerPlatformTestingVersion)" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing" Version="$(CompilerPlatformTestingVersion)" />
<!-- Upgrade transitive references of Microsoft.CodeAnalysis.Analyzer.Testing which bring in NS 1.x deps -->
<PackageReference Include="DiffPlex" Version="$(CompilerPlatformTestingDiffPlexVersion)" />
<PackageReference Include="Microsoft.VisualBasic" Version="$(CompilerPlatformTestingMicrosoftVisualBasicVersion)" />
<PackageReference Include="Microsoft.VisualStudio.Composition" Version="$(CompilerPlatformTestingMicrosoftVisualStudioCompositionVersion)" />
</ItemGroup>
<ItemGroup>

View file

@ -43,6 +43,11 @@
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Analyzer.Testing" Version="$(CompilerPlatformTestingVersion)" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing" Version="$(CompilerPlatformTestingVersion)" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing" Version="$(CompilerPlatformTestingVersion)" />
<!-- Upgrade transitive references of Microsoft.CodeAnalysis.Analyzer.Testing which bring in NS 1.x deps -->
<PackageReference Include="DiffPlex" Version="$(CompilerPlatformTestingDiffPlexVersion)" />
<PackageReference Include="Microsoft.VisualBasic" Version="$(CompilerPlatformTestingMicrosoftVisualBasicVersion)" />
<PackageReference Include="Microsoft.VisualStudio.Composition" Version="$(CompilerPlatformTestingMicrosoftVisualStudioCompositionVersion)" />
</ItemGroup>
<ItemGroup>

View file

@ -14,7 +14,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="14.3.0">
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="$(MicrosoftBuildTasksCoreVersion)">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

View file

@ -4,6 +4,8 @@
<TargetFramework>netstandard2.0</TargetFramework>
<AnalyzerRoslynVersion>3.11</AnalyzerRoslynVersion>
<RoslynApiVersion>$(MicrosoftCodeAnalysisVersion_3_11)</RoslynApiVersion>
<!-- this Roslyn version brings in NS1.x dependencies -->
<FlagNetStandard1XDependencies>false</FlagNetStandard1XDependencies>
</PropertyGroup>
<Import Project="System.Text.Json.SourceGeneration.targets" />

View file

@ -5,6 +5,8 @@
<AnalyzerRoslynVersion>4.0</AnalyzerRoslynVersion>
<RoslynApiVersion>$(MicrosoftCodeAnalysisVersion_4_0)</RoslynApiVersion>
<DefineConstants>$(DefineConstants);ROSLYN4_0_OR_GREATER</DefineConstants>
<!-- this Roslyn version brings in NS1.x dependencies -->
<FlagNetStandard1XDependencies>false</FlagNetStandard1XDependencies>
</PropertyGroup>
<Import Project="System.Text.Json.SourceGeneration.targets" />

View file

@ -1,5 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- this Roslyn version brings in NS1.x dependencies -->
<FlagNetStandard1XDependencies>false</FlagNetStandard1XDependencies>
</PropertyGroup>
<Import Project="System.Text.Json.TestLibrary.targets" />
<ItemGroup>

View file

@ -2,6 +2,8 @@
<PropertyGroup>
<RoslynApiVersion>$(MicrosoftCodeAnalysisVersion_3_11)</RoslynApiVersion>
<IsHighAotMemoryUsageTest>true</IsHighAotMemoryUsageTest>
<!-- this Roslyn version brings in NS1.x dependencies -->
<FlagNetStandard1XDependencies>false</FlagNetStandard1XDependencies>
</PropertyGroup>
<ItemGroup>

View file

@ -74,6 +74,12 @@
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="$(MicrosoftCodeAnalysisVersion)" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing" Version="$(CompilerPlatformTestingVersion)" />
<PackageReference Include="Microsoft.CodeAnalysis" Version="$(MicrosoftCodeAnalysisVersion)" />
<!-- Upgrade transitive references of Microsoft.CodeAnalysis.Analyzer.Testing which bring in NS 1.x deps -->
<PackageReference Include="DiffPlex" Version="$(CompilerPlatformTestingDiffPlexVersion)" />
<PackageReference Include="Microsoft.VisualBasic" Version="$(CompilerPlatformTestingMicrosoftVisualBasicVersion)" />
<PackageReference Include="Microsoft.VisualStudio.Composition" Version="$(CompilerPlatformTestingMicrosoftVisualStudioCompositionVersion)" />
<ProjectReference Include="..\..\gen\System.Text.RegularExpressions.Generator.csproj"
SetTargetFramework="TargetFramework=netstandard2.0"
OutputItemType="Analyzer"

View file

@ -16,6 +16,9 @@
<!-- Set RunSettingsFilePath property which is read by VSTest. -->
<RunSettingsFilePath Condition="'$(ContinuousIntegrationBuild)' == 'true'">$(OutputPath).runsettings</RunSettingsFilePath>
<RunSettingsFilePath Condition="'$(ContinuousIntegrationBuild)' != 'true'">$(ArtifactsObjDir)vscode\.runsettings</RunSettingsFilePath>
<!-- Serilog.Extensions.Logging.File brings in NS1.x dependencies -->
<FlagNetStandard1XDependencies>false</FlagNetStandard1XDependencies>
</PropertyGroup>
<Import Project="$(RepositoryEngineeringDir)testing\wasm-provisioning.targets" />

View file

@ -66,7 +66,7 @@
<PackageToInclude Include="Microsoft.DotNet.XUnitAssert" />
<PackageReference Include="Microsoft.CodeAnalysis.Compilers" Version="$(MicrosoftCodeAnalysisVersion_LatestVS)" />
<PackageReference Include="CommandLineParser" Version="2.1.1-beta" />
<PackageReference Include="CommandLineParser" Version="$(CommandLineParserVersion)" />
<PackageReference Include="Microsoft.Diagnostics.Tracing.TraceEvent" Version="$(TraceEventVersion)" />
<PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonVersion)" />
<PackageReference Include="Newtonsoft.Json.Bson" Version="$(NewtonsoftJsonBsonVersion)" />

View file

@ -22,6 +22,11 @@
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing" Version="$(CompilerPlatformTestingVersion)" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="$(MicrosoftCodeAnalysisVersion)" />
<!-- Upgrade transitive references of Microsoft.CodeAnalysis.Analyzer.Testing which bring in NS 1.x deps -->
<PackageReference Include="DiffPlex" Version="$(CompilerPlatformTestingDiffPlexVersion)" />
<PackageReference Include="Microsoft.VisualBasic" Version="$(CompilerPlatformTestingMicrosoftVisualBasicVersion)" />
<PackageReference Include="Microsoft.VisualStudio.Composition" Version="$(CompilerPlatformTestingMicrosoftVisualStudioCompositionVersion)" />
<ProjectReference Include="..\..\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj" />
<ProjectReference Include="..\..\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj" />
<ProjectReference Include="..\Mono.Linker.Tests.Cases\**\*.csproj" />