Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Minor cleanup after moving to 2.0 toolset #18181

Merged
merged 2 commits into from
Apr 25, 2017
Merged

Conversation

mellinoe
Copy link
Contributor

Includes two minor improvements based on PR feedback in #18035.

  • There is now an init-tools.msbuild file, which is used to restore the buildtools package. This has the same content as the file we used to be automatically generating in init-tools.cmd/sh. Since we're using an MSBuild project now, we can just parameterize the version of the package by using an MSBuild property, and then pass that into dotnet restore.
  • I've added comments to the new usages of chmod, with a link to this nuget issue: Executables restored from NuGet packages are no longer executable with .NET Core "2.0" NuGet/Home#4424

@weshaggard

__PROJECT_JSON_FILE=$__PROJECT_JSON_PATH/project.json
__PROJECT_JSON_CONTENTS="<Project Sdk=\"Microsoft.NET.Sdk\"><PropertyGroup><TargetFramework>netcoreapp1.0</TargetFramework><DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences></PropertyGroup><ItemGroup><PackageReference Include=\"Microsoft.DotNet.BuildTools\" Version=\"$__BUILD_TOOLS_PACKAGE_VERSION\" /></ItemGroup></Project>"
__INIT_TOOLS_DONE_MARKER=$__PROJECT_JSON_PATH/done
__INIT_TOOLS_RESTORE_PROJECT=$__scriptpath/init-tools.msbuild
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this give use even more flexibility to reduce this script now? I suspect we can do any custom copying and what not directly in that project file now. It even gives us the ability to remove BuildToolsVersion.txt file completely and just have it in that project file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can get rid of some of it, but I think there will still be quite a bit left over. Most of the script is locating and downloading the CLI archive, or running crossgen, etc. All we really do with init-tools.msbuild is restore it and then call the "inner init-tools" script inside the packages directory.

@danmoseley
Copy link
Member

@mellinoe can we move this old one along

This file is used in init-tools.cmd/sh, and replaces the "generated"
project file used previously. Because we are using MSBuild projects for
nuget restore now, we are able to "parameterize" the version of
Microsoft.DotNet.BuildTools based on an MSBuild property which is passed
in to the "dotnet restore" command in init-tools.
@mellinoe mellinoe merged commit e3931d2 into dotnet:master Apr 25, 2017
@karelz karelz modified the milestone: 2.0.0 Apr 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants