Skip to content

not copy nuget package to build output to save disk space #4854

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 19, 2020

Conversation

frank-dong-ms-zz
Copy link
Contributor

@frank-dong-ms-zz frank-dong-ms-zz commented Feb 19, 2020

dotnet core 3.0 build use too much disk space (more than 16GB) and cause build failure on CI, this is caused by below line of code from build tools (\Tools\dotnetcli\sdk\3.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets):

<CopyLocalLockFileAssemblies Condition="'$(CopyLocalLockFileAssemblies)' == '' and
                                        '$(TargetFrameworkIdentifier)' == '.NETStandard'">false</CopyLocalLockFileAssemblies>

<!-- Don't copy local for netcoreapp projects before 3.0 or non-exe and non-component projects. -->
<CopyLocalLockFileAssemblies Condition="'$(CopyLocalLockFileAssemblies)' == '' and
                                        '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and
                                        ('$(_TargetFrameworkVersionWithoutV)' &lt; '3.0' or
                                         ('$(HasRuntimeOutput)' != 'true' and '$(EnableDynamicLoading)' != 'true'))">false</CopyLocalLockFileAssemblies>

<!-- All other project types should copy local. -->
<CopyLocalLockFileAssemblies Condition="'$(CopyLocalLockFileAssemblies)' == ''">true</CopyLocalLockFileAssemblies>

Override CopyLocalLockFileAssemblies setting to false to save disk space.

Also, change windows netcore 3.0 build to use hosted test agent.

@frank-dong-ms-zz frank-dong-ms-zz requested a review from a team as a code owner February 19, 2020 02:04
@frank-dong-ms-zz frank-dong-ms-zz changed the title not copy nuget package to build ouput inorder to save disk space not copy nuget package to build output to save disk space Feb 19, 2020
@harishsk harishsk merged commit 9f27612 into dotnet:master Feb 19, 2020
@frank-dong-ms-zz frank-dong-ms-zz deleted the disk-space branch April 15, 2020 20:36
@ghost ghost locked as resolved and limited conversation to collaborators Mar 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants