Skip to content

Commit

Permalink
Use shorter output paths to avoid max path issues on Windows
Browse files Browse the repository at this point in the history
For example, "out/2" instead of "artifacts/stage2"
  • Loading branch information
dsplaisted committed Aug 29, 2017
1 parent fc6f2f3 commit dcb3a7a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ dlldata.c
# DNX
project.lock.json
artifacts/
out/

*_i.c
*_p.c
Expand Down
2 changes: 1 addition & 1 deletion build/InitRepo.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<GeneratedPropsDir>$(RepoRoot)/artifacts/obj</GeneratedPropsDir>
<GeneratedPropsDir>$(RepoRoot)/out/obj</GeneratedPropsDir>
<GitCommitInfoProps>$(GeneratedPropsDir)/GitCommitInfo.props</GitCommitInfoProps>
<HostInfoProps>$(GeneratedPropsDir)/HostInfo.props</HostInfoProps>
<BuildInfoProps>$(GeneratedPropsDir)/BuildInfo.props</BuildInfoProps>
Expand Down
2 changes: 1 addition & 1 deletion build/OutputDirectories.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<!-- BaseOutputDirectory is the root output path for this stage and RID
BaseOutputPath is the project-specific output folder that each project builds into.
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>

<BaseIntermediateOutputPath>$([System.IO.Path]::GetFullPath('$(BaseOutputDirectory)/obj/$(MSBuildProjectName)'))</BaseIntermediateOutputPath>
Expand Down
2 changes: 1 addition & 1 deletion build/Prepare.targets
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public static string 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 ns = root.Name.Namespace;

Expand Down Expand Up @@ -99,7 +99,10 @@ public RepoDirectoriesProvider(
string corehostDummyPackages = 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");
_nugetPackages = nugetPackages ?? Path.Combine(RepoRoot, ".nuget", "packages");
_pjDotnet = pjDotnet ?? GetPjDotnetPath();
Expand Down

0 comments on commit dcb3a7a

Please sign in to comment.