Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

[release/3.1] Fix netstandard problem with new ACL changes - #42501

Merged
wtgodbe merged 2 commits into
dotnet:release/3.1from
carlossanlop:NetstandardFSACL
Nov 12, 2019
Merged

wtgodbe merged 2 commits into
dotnet:release/3.1from
carlossanlop:NetstandardFSACL

Conversation

@carlossanlop

@carlossanlop carlossanlop commented Nov 9, 2019 •

Copy link
Copy Markdown

Fixes: https://github.com/dotnet/corefx/issues/42483
Fixes: dotnet/coreclr#27742

The build passed in all configurations.
I addressed this by following @ericstj 's suggestions in the commit shared in the issue he opened.

Related change for 5.0: #42546

@jkotas

jkotas commented Nov 9, 2019

Copy link
Copy Markdown
Member

Could you please make this in master first and then back port it?

@carlossanlop

Copy link
Copy Markdown
Author

@jkotas this one was the urgent change.
I could submit a 5.0 PR and have them both up for review at the same time. Would that be an acceptable option?

@ericstj

ericstj commented Nov 11, 2019

Copy link
Copy Markdown
Member

I believe a lot of the UAP tests are failing when run under app-container. Can you reproduce these locally?

@carlossanlop

Copy link
Copy Markdown
Author

I believe a lot of the UAP tests are failing when run under app-container. Can you reproduce these locally?

@ericstj I'm getting a strange failure, but I am not sure if it's the same problem as in the CI (example):

  1. I built using build.cmd -framework uap, which succeeded.

  2. Then I ran the unit tests, and this is the output:

PS D:\corefx> dotnet.exe msbuild /t:rebuildandtest D:\corefx\src\System.IO.FileSystem.AccessControl\tests\System.IO.FileSystem.AccessControl.Tests.csproj /p:TargetGroup=uap

Microsoft (R) Build Engine version 16.3.0+0f4c62fea for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  CoreFx.Private.TestUtilities -> D:\corefx\artifacts\bin\CoreFx.Private.TestUtilities\uap-Debug\CoreFx.Private.TestUtilities.dll
  System.IO.FileSystem.AccessControl.Tests -> D:\corefx\artifacts\bin\System.IO.FileSystem.AccessControl.Tests\uap-Windows_NT-Debug\System.IO.FileSystem.Access                          Control.Tests.dll
  ----- start 2019-11-11 12:38:17.04 ===============  To repro directly: =====================================================
  pushd D:\corefx\artifacts\bin\System.IO.FileSystem.AccessControl.Tests\uap-Windows_NT-Debug\
  for /F %f in ('dir /b /s "D:\corefx\artifacts\bin\testhost\uap-Windows_NT-Debug-x64\Runner\"|find /i /v ".pri"') do @(set relPath=%f& set relPath=D:\corefx\a                          rtifacts\bin\testhost\uap-Windows_NT-Debug-x64\Runner\=relPathrelPathrelPathrelPath %f 1>NUL))
  for /R "D:\corefx\artifacts\bin\testhost\uap-Windows_NT-Debug-x64\UAPLayout\" %I in (*) do @if not exist "%~nxI" (mklink /H "%~nxI" "%I" 1>NUL)
  copy /y "D:\corefx\artifacts\bin\testhost\uap-Windows_NT-Debug-x64\UAPLayout\System.Private.CoreLib.dll" System.Private.CoreLib.ni.dll
  call "D:\corefx\artifacts\bin\testhost\uap-Windows_NT-Debug-x64\Launcher\WindowsStoreAppLauncher.exe" -install appxmanifest.xml System.IO.FileSystem.AccessControl.Tests.dll
  XUnitRunnerUap System.IO.FileSystem.AccessControl.Tests.dll -xml "C:\Users\calope\AppData\Local\Packages\5cd54353-3ed7-4a6e-a72f-db349f28867c_v52bfwc2c21ha\LocalState\System.IO.FileSystem.AccessControl.Tests.xml" -nologo -notrait category=nonuaptests -notrait category=nonwindowstests -notrait category=OuterLoop -notrait category=failing
  set ERRORLEVEL=0
  move /Y "C:\Users\calope\AppData\Local\Packages\5cd54353-3ed7-4a6e-a72f-db349f28867c_v52bfwc2c21ha\LocalState\System.IO.FileSystem.AccessControl.Tests.xml" .\testResults.xml
  call "D:\corefx\artifacts\bin\testhost\uap-Windows_NT-Debug-x64\Launcher\WindowsStoreAppLauncher.exe" -uninstall appxmanifest.xml System.IO.FileSystem.AccessControl.Tests.dll
  popd
  ===========================================================================================================
          1 file(s) copied.
  Got manifest file appxmanifest.xml
  Removing any previous installation...
  Installing the application...
  Package Full Name is 5cd54353-3ed7-4a6e-a72f-db349f28867c_1.0.0.0_x64__v52bfwc2c21ha

  SUCCESS
  ExitCode 100
  Unhandled exception. System.IO.FileLoadException: Could not load file or assembly 'System.Linq, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The located assembly's manifest definition does not match the assembly reference. (0x80131040)
  File name: 'System.Linq, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
     at Xunit.ConsoleClient.Program.Main(String[] args)


  The system cannot find the file specified.
  Got manifest file appxmanifest.xml
  Removing the application...

  SUCCESS
  ExitCode 100
  ----- end 2019-11-11 12:38:22.73 ----- exit code -532462766 ----------------------------------------------------------
C:\Users\calope\.nuget\packages\microsoft.dotnet.corefxtesting\1.0.0-beta.19474.3\build\core\Core.targets(153,5): warning MSB3073: The command ""D:\corefx\artifacts\bin\System.IO.FileSystem.AccessControl.Tests\uap-Windows_NT-Debug\RunTests.cmd" --runtime-path "D:\corefx\artifacts\bin\testhost\uap-Windows_NT-Debug-x64"" exited with code -532462766. [D:\corefx\src\System.IO.FileSystem.AccessControl\tests\System.IO.FileSystem.AccessControl.Tests.csproj]
C:\Users\calope\.nuget\packages\microsoft.dotnet.corefxtesting\1.0.0-beta.19474.3\build\core\Core.targets(164,5): error : One or more tests failed while running tests from 'System.IO.FileSystem.AccessControl.Tests'. [D:\corefx\src\System.IO.FileSystem.AccessControl\tests\System.IO.FileSystem.AccessControl.Tests.csproj]
PS D:\corefx>

@ericstj

ericstj commented Nov 11, 2019 •

Copy link
Copy Markdown
Member

That's close, something in your process is preventing you from running UAP locally.

System.IO.FileLoadException: Could not load file or assembly 'System.Linq, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The located assembly's manifest definition does not match the assembly reference. (0x80131040)

This indicates the System.Linq being loaded is lower than 4.2.1.0. You might want to check the system.linq dll here:
D:\corefx\artifacts\bin\testhost\uap-Windows_NT-Debug-x64
D:\corefx\artifacts\bin\System.IO.FileSystem.AccessControl.Tests\uap-Windows_NT-Debug\

Just a guess. I don't expect any of these errors will go away on rerun.

@ericstj

ericstj commented Nov 11, 2019

Copy link
Copy Markdown
Member

For me I'm able to repro. Checkout out your branch, removed artifacts, build -framework uap from root, then dotnet msbuild /t:rebuildandtest /p:targetgroup=uap from src\System.IO.FileSystem.AccessControl\tests.

I see the following errors:
https://gist.github.com/ericstj/c1bc585478c08385ce4ad74beb770a52

@carlossanlop
carlossanlop requested a review from Pilchie November 11, 2019 23:58
@Pilchie Pilchie added the Servicing-approved Approved for servicing release label Nov 12, 2019
@Pilchie

Pilchie commented Nov 12, 2019

Copy link
Copy Markdown
Member

Approved for 3.1 GA, pending CI completion.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-System.IO Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants