-
Notifications
You must be signed in to change notification settings - Fork 173
/
Copy pathdotnet-format.UnitTests.csproj
53 lines (44 loc) · 2.59 KB
/
dotnet-format.UnitTests.csproj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>$(NetCurrent)</TargetFramework>
<RootNamespace>Microsoft.CodeAnalysis.Tools.Tests</RootNamespace>
<!-- Copy nuget assemblies to build directory so that Microsoft.CodeAnalysis.Features.* can be located when running tests. -->
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<RollForward>LatestMajor</RollForward>
<ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
<DefaultExcludesInProjectFolder>$(DefaultExcludesInProjectFolder);binaries\**;projects\**</DefaultExcludesInProjectFolder>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.Analyzer.Testing" />
<!-- The package "Microsoft.CodeAnalysis.Analyzer.Testing" brings in v5.3 of these NuGet dependencies. In order to
test against the same verion of NuGet as our configured SDK, we must set the version to be the same. -->
<PackageReference Include="NuGet.Common" />
<PackageReference Include="NuGet.Configuration" />
<PackageReference Include="NuGet.Frameworks" />
<PackageReference Include="NuGet.Packaging" />
<PackageReference Include="NuGet.Protocol" />
<PackageReference Include="NuGet.Versioning" />
<!-- Bump the transitive dependencies which are brought in by "Microsoft.CodeAnalysis.Analyzer.Testing".
Using the referenced versions is undesirable as it brings in the entire .NET Standard 1.x dependency graph. -->
<PackageReference Include="Microsoft.VisualBasic" />
<PackageReference Include="NETStandard.Library" />
<PackageReference Include="Microsoft.VisualStudio.Composition" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\src\dotnet-format.csproj" />
</ItemGroup>
<!-- Tests depend on the NetCurrent reference assemblies -->
<Target Name="AddRuntimeConfigurationOptionForNetCurrent" BeforeTargets="GenerateBuildRuntimeConfigurationFiles" DependsOnTargets="ResolveFrameworkReferences">
<ItemGroup>
<RuntimeHostConfigurationOption
Include="ReferenceAssemblies.NetCurrent.TargetingPackVersion"
Value="@(ResolvedTargetingPack->WithMetadataValue('Identity', 'Microsoft.NETCore.App')->WithMetadataValue('TargetFramework', '$(NetCurrent)')->Metadata('NuGetPackageVersion'))" />
<RuntimeHostConfigurationOption
Include="ReferenceAssemblies.NetCurrent.TargetFramework"
Value="$(NetCurrent)" />
<RuntimeHostConfigurationOption
Include="ReferenceAssemblies.NetCurrent.NuGetConfigPath"
Value="$(RepoRoot)NuGet.config" />
</ItemGroup>
</Target>
</Project>