Skip to content

Commit

Permalink
Code cleanup (microsoft#518)
Browse files Browse the repository at this point in the history
* Code cleanup: Moving vsix related stuff in package folder

* Fix reference of project

* move nuspec and props file in package directory

* Fix reference in package.csproj
  • Loading branch information
Faizan2304 authored Feb 24, 2017
1 parent ea46dcd commit 85390d1
Show file tree
Hide file tree
Showing 20 changed files with 41 additions and 43 deletions.
32 changes: 16 additions & 16 deletions TestPlatform.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26127.0
VisualStudioVersion = 15.0.26205.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{ED0C35EB-7F31-4841-A24F-8EB708FFA959}"
EndProject
Expand Down Expand Up @@ -86,7 +86,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
Nuget.config = Nuget.config
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "package", "src\package\package.csproj", "{D496D1A0-BC41-48C2-808B-34D8935BE96D}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "package", "src\package\package\package.csproj", "{56FFCC75-400B-4258-B414-AED7AC7DA20B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.TestPlatform.AcceptanceTests", "test\Microsoft.TestPlatform.AcceptanceTests\Microsoft.TestPlatform.AcceptanceTests.csproj", "{DD9382B5-5EC4-4B3D-BEB7-95423731AE29}"
EndProject
Expand Down Expand Up @@ -116,7 +116,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.TestPlatform.Prot
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.TestPlatform.Build.UnitTests", "test\Microsoft.TestPlatform.Build.UnitTests\Microsoft.TestPlatform.Build.UnitTests.csproj", "{EFA38DEF-C2BB-42AE-8B68-B31D79F3107E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleClassLibrary", "test\TestAssets\SimpleClassLibrary\SimpleClassLibrary.csproj", "{0D85D957-6FF2-4620-B766-B708801D97F3}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SimpleClassLibrary", "test\TestAssets\SimpleClassLibrary\SimpleClassLibrary.csproj", "{0D85D957-6FF2-4620-B766-B708801D97F3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SimpleTestProject3", "test\TestAssets\SimpleTestProject3\SimpleTestProject3.csproj", "{9549C1A4-CB57-4689-B3EB-F752F65F863F}"
EndProject
Expand Down Expand Up @@ -488,18 +488,18 @@ Global
{4514113D-07C0-4062-A673-04F188A79B7D}.Release|x64.Build.0 = Release|x64
{4514113D-07C0-4062-A673-04F188A79B7D}.Release|x86.ActiveCfg = Release|x86
{4514113D-07C0-4062-A673-04F188A79B7D}.Release|x86.Build.0 = Release|x86
{D496D1A0-BC41-48C2-808B-34D8935BE96D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D496D1A0-BC41-48C2-808B-34D8935BE96D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D496D1A0-BC41-48C2-808B-34D8935BE96D}.Debug|x64.ActiveCfg = Debug|x64
{D496D1A0-BC41-48C2-808B-34D8935BE96D}.Debug|x64.Build.0 = Debug|x64
{D496D1A0-BC41-48C2-808B-34D8935BE96D}.Debug|x86.ActiveCfg = Debug|x86
{D496D1A0-BC41-48C2-808B-34D8935BE96D}.Debug|x86.Build.0 = Debug|x86
{D496D1A0-BC41-48C2-808B-34D8935BE96D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D496D1A0-BC41-48C2-808B-34D8935BE96D}.Release|Any CPU.Build.0 = Release|Any CPU
{D496D1A0-BC41-48C2-808B-34D8935BE96D}.Release|x64.ActiveCfg = Release|x64
{D496D1A0-BC41-48C2-808B-34D8935BE96D}.Release|x64.Build.0 = Release|x64
{D496D1A0-BC41-48C2-808B-34D8935BE96D}.Release|x86.ActiveCfg = Release|x86
{D496D1A0-BC41-48C2-808B-34D8935BE96D}.Release|x86.Build.0 = Release|x86
{56FFCC75-400B-4258-B414-AED7AC7DA20B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{56FFCC75-400B-4258-B414-AED7AC7DA20B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{56FFCC75-400B-4258-B414-AED7AC7DA20B}.Debug|x64.ActiveCfg = Debug|x64
{56FFCC75-400B-4258-B414-AED7AC7DA20B}.Debug|x64.Build.0 = Debug|x64
{56FFCC75-400B-4258-B414-AED7AC7DA20B}.Debug|x86.ActiveCfg = Debug|x86
{56FFCC75-400B-4258-B414-AED7AC7DA20B}.Debug|x86.Build.0 = Debug|x86
{56FFCC75-400B-4258-B414-AED7AC7DA20B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{56FFCC75-400B-4258-B414-AED7AC7DA20B}.Release|Any CPU.Build.0 = Release|Any CPU
{56FFCC75-400B-4258-B414-AED7AC7DA20B}.Release|x64.ActiveCfg = Release|x64
{56FFCC75-400B-4258-B414-AED7AC7DA20B}.Release|x64.Build.0 = Release|x64
{56FFCC75-400B-4258-B414-AED7AC7DA20B}.Release|x86.ActiveCfg = Release|x86
{56FFCC75-400B-4258-B414-AED7AC7DA20B}.Release|x86.Build.0 = Release|x86
{DD9382B5-5EC4-4B3D-BEB7-95423731AE29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DD9382B5-5EC4-4B3D-BEB7-95423731AE29}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DD9382B5-5EC4-4B3D-BEB7-95423731AE29}.Debug|x64.ActiveCfg = Debug|x64
Expand Down Expand Up @@ -754,7 +754,7 @@ Global
{B2C2FFD5-3C7D-42A3-B9B6-DEF63DE969AD} = {B9AB7A3D-4F63-48D2-86C0-70F52F6509AB}
{0DD55440-38DC-4580-879C-70B043F77B1C} = {B9AB7A3D-4F63-48D2-86C0-70F52F6509AB}
{4514113D-07C0-4062-A673-04F188A79B7D} = {B9AB7A3D-4F63-48D2-86C0-70F52F6509AB}
{D496D1A0-BC41-48C2-808B-34D8935BE96D} = {D27E1CB4-C641-4C6C-A140-EF5F6215AE29}
{56FFCC75-400B-4258-B414-AED7AC7DA20B} = {D27E1CB4-C641-4C6C-A140-EF5F6215AE29}
{DD9382B5-5EC4-4B3D-BEB7-95423731AE29} = {46250E12-4CF1-4051-B4A7-80C8C06E0068}
{156F8811-28BB-4EC7-87D9-434F10FB7DBE} = {46250E12-4CF1-4051-B4A7-80C8C06E0068}
{A5B167ED-873A-4762-9326-5F43B8D3AFF6} = {595BE9C1-E10F-4E50-938A-E6C248D3F950}
Expand Down
20 changes: 9 additions & 11 deletions scripts/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ $TPB_Version = $Version
$TPB_VersionSuffix = $VersionSuffix
$TPB_CIBuild = $CIBuild
$TPB_LocalizedBuild = !$DisableLocalizedBuild
$TPB_VSIX_DIR = Join-Path $env:TP_ROOT_DIR "src\VSIXProject"
$TPB_VSIX_DIR = Join-Path $env:TP_ROOT_DIR "src\package\VSIXProject"

# Capture error state in any step globally to modify return code
$Script:ScriptFailed = $false
Expand Down Expand Up @@ -188,15 +188,15 @@ function Publish-Package
$dotnetExe = Get-DotNetPath
$fullCLRPackageDir = Get-FullCLRPackageDirectory
$coreCLRPackageDir = Get-CoreCLRPackageDirectory
$packageProject = Join-Path $env:TP_PACKAGE_PROJ_DIR "package.csproj"
$packageProject = Join-Path $env:TP_PACKAGE_PROJ_DIR "package\package.csproj"
$testHostProject = Join-Path $env:TP_ROOT_DIR "src\testhost\testhost.csproj"
$testHostx86Project = Join-Path $env:TP_ROOT_DIR "src\testhost.x86\testhost.x86.csproj"
$testhostFullPackageDir = $(Join-Path $env:TP_OUT_DIR "$TPB_Configuration\Microsoft.TestPlatform.TestHost\$TPB_TargetFramework\$TPB_TargetRuntime")
$testhostCorePackageDir = $(Join-Path $env:TP_OUT_DIR "$TPB_Configuration\Microsoft.TestPlatform.TestHost\$TPB_TargetFrameworkCore")
$vstestConsoleProject = Join-Path $env:TP_ROOT_DIR "src\vstest.console\vstest.console.csproj"
$dataCollectorProject = Join-Path $env:TP_ROOT_DIR "src\datacollector\datacollector.csproj"

Write-Log "Package: Publish package\*.csproj"
Write-Log "Package: Publish src\package\package\package.csproj"


Publish-PackageInternal $packageProject $TPB_TargetFramework $fullCLRPackageDir
Expand Down Expand Up @@ -317,23 +317,21 @@ function Create-NugetPackages

Write-Log "Create-NugetPackages: Started."
$stagingDir = Join-Path $env:TP_OUT_DIR $TPB_Configuration
$tpSrcDir = Join-Path $env:TP_ROOT_DIR "src"
$tpNuspecDir = Join-Path $env:TP_PACKAGE_PROJ_DIR "nuspec"

# Copy over the nuspecs to the staging directory
$nuspecFiles = @("TestPlatform.TranslationLayer.nuspec", "TestPlatform.ObjectModel.nuspec", "TestPlatform.TestHost.nuspec", "TestPlatform.nuspec", "TestPlatform.CLI.nuspec", "TestPlatform.Build.nuspec", "Microsoft.Net.Test.Sdk.nuspec")
$targetFiles = @("Microsoft.Net.Test.Sdk.targets")
# Nuget pack analysis emits warnings if binaries are packaged as content. It is intentional for the below packages.
$skipAnalysis = @("TestPlatform.CLI.nuspec")
foreach ($file in $nuspecFiles + $targetFiles) {
Copy-Item $tpSrcDir\$file $stagingDir -Force
Copy-Item $tpNuspecDir\$file $stagingDir -Force
}

# Copy props file.
Copy-Item $tpSrcDir\"Microsoft.Net.Test.Sdk.props" $stagingDir\"Microsoft.Net.Test.Sdk.props" -Force

# Copy over empty and third patry notice file.
Copy-Item $tpSrcDir\package\"_._" $stagingDir -Force
Copy-Item $tpSrcDir\package\"ThirdPartyNotices.txt" $stagingDir -Force
# Copy over props, empty and third patry notice file
Copy-Item $tpNuspecDir\"Microsoft.Net.Test.Sdk.props" $stagingDir -Force
Copy-Item $tpNuspecDir\"_._" $stagingDir -Force
Copy-Item $tpNuspecDir\..\"ThirdPartyNotices.txt" $stagingDir -Force

# Call nuget pack on these components.
$nugetExe = Join-Path $env:TP_PACKAGES_DIR -ChildPath "Nuget.CommandLine" | Join-Path -ChildPath $env:NUGET_EXE_Version | Join-Path -ChildPath "tools\NuGet.exe"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TestPlatformRoot>..\..\</TestPlatformRoot>
<TestPlatformRoot>..\..\..\</TestPlatformRoot>
<MinimumVisualStudioVersion>15.0</MinimumVisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
Expand All @@ -26,8 +26,8 @@
<CopyOutputSymbolsToOutputDirectory>false</CopyOutputSymbolsToOutputDirectory>
<DeployExtension>False</DeployExtension>
<IsProductComponent>true</IsProductComponent>
<VsixInputFileLocation>$(TestPlatformRoot)\artifacts\$(Configuration)\net46\win7-x64</VsixInputFileLocation>
<OutputPath>$(TestPlatformRoot)\artifacts\$(Configuration)\VSIX</OutputPath>
<VsixInputFileLocation>$(TestPlatformRoot)artifacts\$(Configuration)\net46\win7-x64</VsixInputFileLocation>
<OutputPath>$(TestPlatformRoot)artifacts\$(Configuration)\VSIX</OutputPath>
<ExtensionInstallationFolder>TestPlatform</ExtensionInstallationFolder>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
22 changes: 11 additions & 11 deletions src/package/package.csproj → src/package/package/package.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TestPlatformRoot Condition="$(TestPlatformRoot) == ''">..\..\</TestPlatformRoot>
<TestPlatformRoot Condition="$(TestPlatformRoot) == ''">..\..\..\</TestPlatformRoot>
</PropertyGroup>
<Import Project="$(TestPlatformRoot)scripts/build/TestPlatform.Settings.targets" />
<PropertyGroup>
Expand Down Expand Up @@ -32,16 +32,16 @@
</Content>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Microsoft.TestPlatform.Client\Microsoft.TestPlatform.Client.csproj" />
<ProjectReference Include="..\Microsoft.TestPlatform.Common\Microsoft.TestPlatform.Common.csproj" />
<ProjectReference Include="..\Microsoft.TestPlatform.CommunicationUtilities\Microsoft.TestPlatform.CommunicationUtilities.csproj" />
<ProjectReference Include="..\Microsoft.TestPlatform.CoreUtilities\Microsoft.TestPlatform.CoreUtilities.csproj" />
<ProjectReference Include="..\Microsoft.TestPlatform.CrossPlatEngine\Microsoft.TestPlatform.CrossPlatEngine.csproj" />
<ProjectReference Include="..\Microsoft.TestPlatform.ObjectModel\Microsoft.TestPlatform.ObjectModel.csproj" />
<ProjectReference Include="..\vstest.console\vstest.console.csproj" />
<ProjectReference Include="..\Microsoft.TestPlatform.VsTestConsole.TranslationLayer\Microsoft.TestPlatform.VsTestConsole.TranslationLayer.csproj" />
<ProjectReference Include="..\Microsoft.TestPlatform.Extensions.TrxLogger\Microsoft.TestPlatform.Extensions.TrxLogger.csproj" />
<ProjectReference Include="..\Microsoft.TestPlatform.Utilities\Microsoft.TestPlatform.Utilities.csproj">
<ProjectReference Include="$(TestPlatformRoot)src\Microsoft.TestPlatform.Client\Microsoft.TestPlatform.Client.csproj" />
<ProjectReference Include="$(TestPlatformRoot)src\Microsoft.TestPlatform.Common\Microsoft.TestPlatform.Common.csproj" />
<ProjectReference Include="$(TestPlatformRoot)src\Microsoft.TestPlatform.CommunicationUtilities\Microsoft.TestPlatform.CommunicationUtilities.csproj" />
<ProjectReference Include="$(TestPlatformRoot)src\Microsoft.TestPlatform.CoreUtilities\Microsoft.TestPlatform.CoreUtilities.csproj" />
<ProjectReference Include="$(TestPlatformRoot)src\Microsoft.TestPlatform.CrossPlatEngine\Microsoft.TestPlatform.CrossPlatEngine.csproj" />
<ProjectReference Include="$(TestPlatformRoot)src\Microsoft.TestPlatform.ObjectModel\Microsoft.TestPlatform.ObjectModel.csproj" />
<ProjectReference Include="$(TestPlatformRoot)src\vstest.console\vstest.console.csproj" />
<ProjectReference Include="$(TestPlatformRoot)src\Microsoft.TestPlatform.VsTestConsole.TranslationLayer\Microsoft.TestPlatform.VsTestConsole.TranslationLayer.csproj" />
<ProjectReference Include="$(TestPlatformRoot)src\Microsoft.TestPlatform.Extensions.TrxLogger\Microsoft.TestPlatform.Extensions.TrxLogger.csproj" />
<ProjectReference Include="$(TestPlatformRoot)src\Microsoft.TestPlatform.Utilities\Microsoft.TestPlatform.Utilities.csproj">
<FromP2P>true</FromP2P>
</ProjectReference>
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
<PackageReference Include="Microsoft.Internal.Dia" Version="14.0.0" />
</ItemGroup>
<ItemGroup>
<Content Include="..\..\src\package\TestPlatform.ObjectModel.manifest">
<Content Include="..\..\src\package\package\TestPlatform.ObjectModel.manifest">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\..\src\package\TestPlatform.ObjectModel.x86.manifest">
<Content Include="..\..\src\package\package\TestPlatform.ObjectModel.x86.manifest">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
Expand Down

0 comments on commit 85390d1

Please sign in to comment.