Use shorter output paths to avoid max path issues on Windows

For example, "out/2" instead of "artifacts/stage2"
This commit is contained in:
Daniel Plaisted 2017-08-28 16:38:55 -07:00
parent fc6f2f3bfa
commit dcb3a7ade7
5 changed files with 9 additions and 5 deletions

1
.gitignore vendored
View file

@ -96,6 +96,7 @@ dlldata.c
# DNX # DNX
project.lock.json project.lock.json
artifacts/ artifacts/
out/
*_i.c *_i.c
*_p.c *_p.c

View file

@ -1,6 +1,6 @@
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<GeneratedPropsDir>$(RepoRoot)/artifacts/obj</GeneratedPropsDir> <GeneratedPropsDir>$(RepoRoot)/out/obj</GeneratedPropsDir>
<GitCommitInfoProps>$(GeneratedPropsDir)/GitCommitInfo.props</GitCommitInfoProps> <GitCommitInfoProps>$(GeneratedPropsDir)/GitCommitInfo.props</GitCommitInfoProps>
<HostInfoProps>$(GeneratedPropsDir)/HostInfo.props</HostInfoProps> <HostInfoProps>$(GeneratedPropsDir)/HostInfo.props</HostInfoProps>
<BuildInfoProps>$(GeneratedPropsDir)/BuildInfo.props</BuildInfoProps> <BuildInfoProps>$(GeneratedPropsDir)/BuildInfo.props</BuildInfoProps>

View file

@ -6,7 +6,7 @@
<!-- BaseOutputDirectory is the root output path for this stage and RID <!-- BaseOutputDirectory is the root output path for this stage and RID
BaseOutputPath is the project-specific output folder that each project builds into. BaseOutputPath is the project-specific output folder that each project builds into.
This is not confusing at all. --> This is not confusing at all. -->
<BaseOutputDirectory>$(RepoRoot)/artifacts/stage$(CliBuildStage)/$(Rid)</BaseOutputDirectory> <BaseOutputDirectory>$(RepoRoot)/out/$(CliBuildStage)/$(Rid)</BaseOutputDirectory>
<BaseOutputPath>$([System.IO.Path]::GetFullPath('$(BaseOutputDirectory)/bin/$(MSBuildProjectName)'))</BaseOutputPath> <BaseOutputPath>$([System.IO.Path]::GetFullPath('$(BaseOutputDirectory)/bin/$(MSBuildProjectName)'))</BaseOutputPath>
<BaseIntermediateOutputPath>$([System.IO.Path]::GetFullPath('$(BaseOutputDirectory)/obj/$(MSBuildProjectName)'))</BaseIntermediateOutputPath> <BaseIntermediateOutputPath>$([System.IO.Path]::GetFullPath('$(BaseOutputDirectory)/obj/$(MSBuildProjectName)'))</BaseIntermediateOutputPath>

View file

@ -100,7 +100,7 @@
<Target Name="IsolateArtifactsFromDirectoryBuildFiles"> <Target Name="IsolateArtifactsFromDirectoryBuildFiles">
<Copy SourceFiles="$(RepoRoot)TestAssets\Directory.Build.props" <Copy SourceFiles="$(RepoRoot)TestAssets\Directory.Build.props"
DestinationFolder ="$(RepoRoot)artifacts" DestinationFolder ="$(RepoRoot)out"
SkipUnchangedFiles="true" /> SkipUnchangedFiles="true" />
</Target> </Target>

View file

@ -63,7 +63,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
{ {
if (string.IsNullOrEmpty(s_buildRid)) if (string.IsNullOrEmpty(s_buildRid))
{ {
var buildInfoPath = Path.Combine(RepoRoot, "artifacts", "obj", "BuildInfo.props"); var buildInfoPath = Path.Combine(RepoRoot, "out", "obj", "BuildInfo.props");
var root = XDocument.Load(buildInfoPath).Root; var root = XDocument.Load(buildInfoPath).Root;
var ns = root.Name.Namespace; var ns = root.Name.Namespace;
@ -99,7 +99,10 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
string corehostDummyPackages = null, string corehostDummyPackages = null,
string pjDotnet = null) string pjDotnet = null)
{ {
_artifacts = artifacts ?? Path.Combine(RepoRoot, "artifacts", "stage2", BuildRid); _artifacts = artifacts ?? Path.Combine(RepoRoot,
"out",
"2", // Stage - ideally this would come from the "previous stage"
BuildRid);
_builtDotnet = builtDotnet ?? Path.Combine(_artifacts, "intermediate", "sharedFrameworkPublish"); _builtDotnet = builtDotnet ?? Path.Combine(_artifacts, "intermediate", "sharedFrameworkPublish");
_nugetPackages = nugetPackages ?? Path.Combine(RepoRoot, ".nuget", "packages"); _nugetPackages = nugetPackages ?? Path.Combine(RepoRoot, ".nuget", "packages");
_pjDotnet = pjDotnet ?? GetPjDotnetPath(); _pjDotnet = pjDotnet ?? GetPjDotnetPath();