Skip to content

Commit 2cc6cf5

Browse files
committed
Moved projects to use PackageReference.
1 parent 0b95a26 commit 2cc6cf5

File tree

46 files changed

+363
-740
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+363
-740
lines changed

scripts/build/TestFx.Loc.targets

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,16 @@
4242
<CreateItem Include="@(ResxResources)" AdditionalMetadata="Language=%(ResxLang.Identity)">
4343
<Output ItemName="LocResourceFile" TaskParameter="Include"/>
4444
</CreateItem>
45-
<Exec Command="$(TestFxPackagesRoot)fmdev.xlftool.0.1.3\tools\xlftool.exe update -Resx %(LocResourceFile.Identity) -Xlf $(SharedResourceDirectory)\xlf\%(LocResourceFile.Filename).%(LocResourceFile.Language).xlf" />
46-
<Exec Command="$(TestFxPackagesRoot)fmdev.xlftool.0.1.3\tools\xlftool.exe update -Resx %(ResxResources.Identity) -Xlf $(SharedResourceDirectory)\xlf\%(ResxResources.Filename).xlf" />
45+
<Exec Command="$(TestFxPackagesRoot)fmdev.xlftool\0.1.3\tools\xlftool.exe update -Resx %(LocResourceFile.Identity) -Xlf $(SharedResourceDirectory)\xlf\%(LocResourceFile.Filename).%(LocResourceFile.Language).xlf" />
46+
<Exec Command="$(TestFxPackagesRoot)fmdev.xlftool\0.1.3\tools\xlftool.exe update -Resx %(ResxResources.Identity) -Xlf $(SharedResourceDirectory)\xlf\%(ResxResources.Filename).xlf" />
4747
</Target>
4848

4949
<!-- Generate language specific resx files from the xlf files -->
5050
<Target Name="CreateLocalizeResx" Condition="'$(IsLocalizedBuild)' == 'true'">
5151
<CreateItem Include="@(ResxResources)" AdditionalMetadata="Language=%(ResxLang.Identity)">
5252
<Output ItemName="LocResourceFile" TaskParameter="Include"/>
5353
</CreateItem>
54-
<Exec Command="$(TestFxPackagesRoot)fmdev.xlftool.0.1.3\tools\xlftool.exe writeTarget -Xlf $(ResourceDirectory)\xlf\%(LocResourceFile.Filename).%(LocResourceFile.Language).xlf -Resx $(ResourceDirectory)\%(LocResourceFile.Filename).%(LocResourceFile.Language).resx -verbose" />
54+
<Exec Command="$(TestFxPackagesRoot)fmdev.xlftool\0.1.3\tools\xlftool.exe writeTarget -Xlf $(ResourceDirectory)\xlf\%(LocResourceFile.Filename).%(LocResourceFile.Language).xlf -Resx $(ResourceDirectory)\%(LocResourceFile.Filename).%(LocResourceFile.Language).resx -verbose" />
5555
<ItemGroup>
5656
<EmbeddedResource Include="$(ResourceDirectory)\%(LocResourceFile.Filename).%(LocResourceFile.Language).resx" />
5757
</ItemGroup>
@@ -62,7 +62,7 @@
6262
<CreateItem Include="@(ResxResources)" AdditionalMetadata="Language=%(ResxLang.Identity)">
6363
<Output ItemName="LocResourceFile" TaskParameter="Include"/>
6464
</CreateItem>
65-
<Exec Command="$(TestFxPackagesRoot)fmdev.xlftool.0.1.3\tools\xlftool.exe writeTarget -Xlf $(SharedResourceDirectory)\xlf\%(LocResourceFile.Filename).%(LocResourceFile.Language).xlf -Resx $(ResourceDirectory)\%(LocResourceFile.Filename).%(LocResourceFile.Language).resx -verbose" />
65+
<Exec Command="$(TestFxPackagesRoot)fmdev.xlftool\0.1.3\tools\xlftool.exe writeTarget -Xlf $(SharedResourceDirectory)\xlf\%(LocResourceFile.Filename).%(LocResourceFile.Language).xlf -Resx $(ResourceDirectory)\%(LocResourceFile.Filename).%(LocResourceFile.Language).resx -verbose" />
6666
<ItemGroup>
6767
<EmbeddedResource Include="$(ResourceDirectory)\%(LocResourceFile.Filename).%(LocResourceFile.Language).resx" />
6868
</ItemGroup>
@@ -71,7 +71,7 @@
7171
<!-- Localization for documentation files. -->
7272
<Target Name="CopyLocalizedXmls" BeforeTargets="BeforeBuild" Condition="$(LocDocumentationSubPath) != ''">
7373
<PropertyGroup>
74-
<_SourcePath>$(TestFxPackagesRoot)MSTest.Internal.TestFx.Localized.Documentation.1.0.0-build-20170420-1\contentFiles\any\any\$(LocDocumentationSubPath)</_SourcePath>
74+
<_SourcePath>$(TestFxPackagesRoot)MSTest.Internal.TestFx.Localized.Documentation\1.0.0-build-20170420-1\contentFiles\any\any\$(LocDocumentationSubPath)</_SourcePath>
7575
</PropertyGroup>
7676
<ItemGroup>
7777
<_LocalizedFiles Include="$(_SourcePath)\**\*.*" />

scripts/build/TestFx.Settings.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props') and $(FrameworkIdentifier) != 'NetCore' and $(IncludeMicrosoftCommon) == 'true'" />
1010
<!-- Import props/targets with $(RepoRoot) since msbuild takes the relative path based on settings.targets and not with respect to the project. -->
11-
<Import Project="$(RepoRoot)packages\MicroBuild.Core.0.2.0\build\MicroBuild.Core.props" Condition="Exists('$(RepoRoot)packages\MicroBuild.Core.0.2.0\build\MicroBuild.Core.props')" />
11+
<Import Project="$(RepoRoot)packages\MicroBuild.Core\0.2.0\build\MicroBuild.Core.props" Condition="Exists('$(RepoRoot)packages\MicroBuild.Core\0.2.0\build\MicroBuild.Core.props')" />
1212
<Import Project="TestFx.Versions.targets" />
1313

1414
<PropertyGroup>

scripts/build/TestFx.targets

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030
<Link>stylecop.json</Link>
3131
</AdditionalFiles>
3232

33-
<Analyzer Include="$(TestFxPackagesRoot)StyleCop.Analyzers.1.0.0\analyzers\dotnet\cs\Newtonsoft.Json.dll" />
34-
<Analyzer Include="$(TestFxPackagesRoot)StyleCop.Analyzers.1.0.0\analyzers\dotnet\cs\StyleCop.Analyzers.CodeFixes.dll" />
35-
<Analyzer Include="$(TestFxPackagesRoot)StyleCop.Analyzers.1.0.0\analyzers\dotnet\cs\StyleCop.Analyzers.dll" />
33+
<Analyzer Include="$(TestFxPackagesRoot)StyleCop.Analyzers\1.0.0\analyzers\dotnet\cs\Newtonsoft.Json.dll" />
34+
<Analyzer Include="$(TestFxPackagesRoot)StyleCop.Analyzers\1.0.0\analyzers\dotnet\cs\StyleCop.Analyzers.CodeFixes.dll" />
35+
<Analyzer Include="$(TestFxPackagesRoot)StyleCop.Analyzers\1.0.0\analyzers\dotnet\cs\StyleCop.Analyzers.dll" />
3636
</ItemGroup>
3737

3838
<!-- Signing and Localization. -->
@@ -48,14 +48,6 @@
4848
</SignFilesDependsOn>
4949
</ItemGroup>
5050

51-
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
52-
<PropertyGroup>
53-
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
54-
</PropertyGroup>
55-
<Error Condition="!Exists('$(TestFxPackagesRoot)MicroBuild.Core.0.2.0\build\MicroBuild.Core.props')" Text="$([System.String]::Format('$(ErrorText)', '$(TestFxPackagesRoot)MicroBuild.Core.0.2.0\build\MicroBuild.Core.props'))" />
56-
<Error Condition="!Exists('$(TestFxPackagesRoot)MicroBuild.Core.0.2.0\build\MicroBuild.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(TestFxPackagesRoot)MicroBuild.Core.0.2.0\build\MicroBuild.Core.targets'))" />
57-
</Target>
58-
5951
<Target Name="GatherLocalizedOutputsForSigning" DependsOnTargets="TestFxLocalization">
6052
<ItemGroup>
6153
<FilesToSign Include="$(OutDir)\**\$(AssemblyName).resources.dll">

scripts/test.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,10 @@ function Get-VSTestPath
197197
$TestPlatformVersion = (([XML](Get-Content $versionsFile)).Project.PropertyGroup.TestPlatformVersion).InnerText
198198

199199
$vsInstallPath = "$PSScriptRoot\..\packages\Microsoft.TestPlatform.$TestPlatformVersion\"
200+
if(-not (Test-Path $vsInstallPath)) {
201+
$vsInstallPath = "$PSScriptRoot\..\packages\Microsoft.TestPlatform\$TestPlatformVersion\"
202+
}
203+
200204
$vstestPath = Join-Path -path $vsInstallPath "tools\net451\Common7\IDE\Extensions\TestPlatform\vstest.console.exe"
201205
return Resolve-Path -path $vstestPath
202206
}

src/Adapter/PlatformServices.Desktop/PlatformServices.Desktop.csproj

Lines changed: 19 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -29,35 +29,30 @@
2929
<WarningLevel>4</WarningLevel>
3030
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
3131
</PropertyGroup>
32+
33+
<ItemGroup>
34+
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="$(TestPlatformVersion)" />
35+
<PackageReference Include="System.ComponentModel.EventBasedAsync" Version="4.3.0" />
36+
<PackageReference Include="System.ComponentModel.TypeConverter" Version="4.3.0" />
37+
<PackageReference Include="System.Runtime" Version="4.3.0" />
38+
<PackageReference Include="System.Runtime.Serialization.Json" Version="4.3.0" />
39+
<PackageReference Include="System.Runtime.Serialization.Primitives" Version="4.3.0" />
40+
41+
<PackageReference Include="MicroBuild.Core" Version="0.2.0" PrivateAssets="all">
42+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
43+
</PackageReference>
44+
<PackageReference Include="StyleCop.Analyzers">
45+
<Version>1.0.0</Version>
46+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
47+
<PrivateAssets>all</PrivateAssets>
48+
</PackageReference>
49+
</ItemGroup>
50+
3251
<ItemGroup>
33-
<Reference Include="Microsoft.TestPlatform.CoreUtilities, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
34-
<HintPath>..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatformVersion)\lib\net45\Microsoft.TestPlatform.CoreUtilities.dll</HintPath>
35-
</Reference>
36-
<Reference Include="Microsoft.TestPlatform.PlatformAbstractions, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
37-
<HintPath>..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatformVersion)\lib\net45\Microsoft.TestPlatform.PlatformAbstractions.dll</HintPath>
38-
</Reference>
39-
<Reference Include="Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
40-
<HintPath>..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatformVersion)\lib\net45\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll</HintPath>
41-
</Reference>
42-
<Reference Include="NuGet.Frameworks, Version=5.0.0.6, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
43-
<HintPath>..\..\..\packages\NuGet.Frameworks.5.0.0\lib\net40\NuGet.Frameworks.dll</HintPath>
44-
</Reference>
4552
<Reference Include="System" />
46-
<Reference Include="System.Collections.Immutable, Version=1.2.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
47-
<HintPath>..\..\..\packages\System.Collections.Immutable.1.5.0\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll</HintPath>
48-
</Reference>
4953
<Reference Include="System.ComponentModel.Composition" />
50-
<Reference Include="System.ComponentModel.Primitives, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
51-
<HintPath>..\..\..\packages\System.ComponentModel.Primitives.4.3.0\lib\net45\System.ComponentModel.Primitives.dll</HintPath>
52-
</Reference>
53-
<Reference Include="System.ComponentModel.TypeConverter, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
54-
<HintPath>..\..\..\packages\System.ComponentModel.TypeConverter.4.3.0\lib\net45\System.ComponentModel.TypeConverter.dll</HintPath>
55-
</Reference>
5654
<Reference Include="System.Configuration" />
5755
<Reference Include="System.Core" />
58-
<Reference Include="System.Reflection.Metadata, Version=1.4.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
59-
<HintPath>..\..\..\packages\System.Reflection.Metadata.1.6.0\lib\portable-net45+win8\System.Reflection.Metadata.dll</HintPath>
60-
</Reference>
6156
<Reference Include="System.Runtime.Serialization" />
6257
<Reference Include="System.Xml.Linq" />
6358
<Reference Include="System.Data.DataSetExtensions" />
@@ -165,7 +160,6 @@
165160
</ItemGroup>
166161
<ItemGroup>
167162
<None Include="app.config" />
168-
<None Include="packages.config" />
169163
</ItemGroup>
170164
<ItemGroup>
171165
<EmbeddedResource Include="..\PlatformServices.Shared\netstandard1.3\Resources\Resource.resx">
@@ -176,6 +170,5 @@
176170
<CustomToolNamespace>Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices</CustomToolNamespace>
177171
</EmbeddedResource>
178172
</ItemGroup>
179-
<ItemGroup />
180173
<Import Project="$(TestFxRoot)scripts\build\TestFx.targets" />
181174
</Project>

src/Adapter/PlatformServices.Desktop/packages.config

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/Adapter/PlatformServices.Interface/PlatformServices.Interface.csproj

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,20 @@
3030
<WarningLevel>4</WarningLevel>
3131
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
3232
</PropertyGroup>
33+
34+
<ItemGroup>
35+
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="$(TestPlatformVersion)" />
36+
37+
<PackageReference Include="MicroBuild.Core" Version="0.2.0" PrivateAssets="all">
38+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
39+
</PackageReference>
40+
<PackageReference Include="StyleCop.Analyzers">
41+
<Version>1.0.0</Version>
42+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
43+
<PrivateAssets>all</PrivateAssets>
44+
</PackageReference>
45+
</ItemGroup>
46+
3347
<ItemGroup>
3448
<Compile Include="IReflectionOperations.cs" />
3549
<Compile Include="IThreadOperations.cs" />
@@ -48,7 +62,6 @@
4862
</ItemGroup>
4963
<ItemGroup>
5064
<None Include="app.config" />
51-
<None Include="packages.config" />
5265
</ItemGroup>
5366
<ItemGroup>
5467
<ProjectReference Include="..\..\TestFramework\Extension.Core\Extension.Core.csproj">
@@ -62,22 +75,5 @@
6275
<Private>False</Private>
6376
</ProjectReference>
6477
</ItemGroup>
65-
<ItemGroup>
66-
<Reference Include="Microsoft.TestPlatform.CoreUtilities, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
67-
<HintPath>..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatformVersion)\lib\netstandard1.0\Microsoft.TestPlatform.CoreUtilities.dll</HintPath>
68-
</Reference>
69-
<Reference Include="Microsoft.TestPlatform.PlatformAbstractions, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
70-
<HintPath>..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatformVersion)\lib\netstandard1.0\Microsoft.TestPlatform.PlatformAbstractions.dll</HintPath>
71-
</Reference>
72-
<Reference Include="Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
73-
<HintPath>..\..\..\packages\Microsoft.TestPlatform.ObjectModel.$(TestPlatformVersion)\lib\netstandard1.0\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll</HintPath>
74-
</Reference>
75-
<Reference Include="System.ComponentModel.Primitives, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
76-
<HintPath>..\..\..\packages\System.ComponentModel.Primitives.4.3.0\lib\netstandard1.0\System.ComponentModel.Primitives.dll</HintPath>
77-
</Reference>
78-
<Reference Include="System.ComponentModel.TypeConverter, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
79-
<HintPath>..\..\..\packages\System.ComponentModel.TypeConverter.4.3.0\lib\netstandard1.0\System.ComponentModel.TypeConverter.dll</HintPath>
80-
</Reference>
81-
</ItemGroup>
8278
<Import Project="$(TestFxRoot)scripts\build\TestFx.targets" />
8379
</Project>

src/Adapter/PlatformServices.Interface/packages.config

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)