Skip to content
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

[UWP] F# code usage fails Azure DevOps build #54765

Closed
xperiandri opened this issue Jun 21, 2021 · 5 comments
Closed

[UWP] F# code usage fails Azure DevOps build #54765

xperiandri opened this issue Jun 21, 2021 · 5 comments
Labels
area-UWP untriaged New issue has not been triaged by the area owner

Comments

@xperiandri
Copy link

According to dotnet/corert#6055 UWP apps referencing F# library must build.
But they are not.

Unless I execute

foreach ($file in gci -Recurse 'C:\Users\*\.nuget\packages\*.net.native.compiler\**\GatekeeperConfig.xml')
{
    (gc $file.FullName) -replace '<FSharpRule on="true">','<FSharpRule on="false">' | sc $file.FullName
}

build fails.
But this hack works only for Microsoft.NETCore.UniversalWindowsPlatform with version less than current, i.e. less than 6.2.12

And for current it fails

BuildNativePackage:
  Creating ilc response file "obj\x64\Release\ilc.SuperCharge.Mobile.UWP.rsp" with the following content: /in:"D:\a\1\s\Mobile\SuperCharge.Mobile.UWP\obj\x64\Release\ilc\in" /out:"D:\a\1\b\AppStore\x64\ilc" /intermediatespath:"D:\a\1\s\Mobile\SuperCharge.Mobile.UWP\obj\x64\Release\ilc\intermediate" /v:normal /keepintermediates:true /buildtype:ret /exename:"SuperCharge.Mobile.UWP.exe" /rcpath:"C:\Program Files %28x86%29\Windows Kits\10\bin\10.0.19041.0\x64\rc.exe" /targetplatformsdklibpath:"C:\Program Files %28x86%29\Windows Kits\10\lib\10.0.19041.0\um" /WindowsSdkApiXml:"C:\Program Files %28x86%29\Windows Kits\10\bin\10.0.19041.0\x64\PInvoke\SupportedAPIs.xml" /targetplatformsdkmetadatapath:"D:\a\1\s\Mobile\SuperCharge.Mobile.UWP\obj\x64\Release\ilc\in\WinMetadata" /RdXmlPath:"C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\2.2.10-rel-29722-00\tools\LibraryXML" /CscPath:"C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\2.2.10-rel-29722-00\tools\csc\csc.exe" /suppressPDBWarnings:true /AllowNoManagedCode /frameworkDependency:"Name = Microsoft.UI.Xaml.2.5, MinVersion = 2.52012.2002.0, Publisher = 'CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US'" /frameworkDependency:"Name = Microsoft.NET.Native.Framework.2.2, MinVersion = 2.2.29512.0, Publisher = 'CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US'" /frameworkDependency:"Name = Microsoft.NET.Native.Runtime.2.2, MinVersion = 2.2.28604.0, Publisher = 'CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US'"  /UseSharedAssemblies /InSharedAssemblyPath:"C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\runtime.win10-x64.microsoft.net.native.sharedlibrary\2.2.8-rel-29722-00\build\..\tools\SharedLibrary" /TargetPlatform:x64
  C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\runtime.win10-x64.microsoft.net.native.compiler\2.2.10-rel-29722-00\build\..\tools\\x64\ilc\ilc.exe @"obj\x64\Release\ilc.SuperCharge.Mobile.UWP.rsp" "/logger:CsvLogger;2584;2308" 
  Launching 'C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\runtime.win10-x64.microsoft.net.native.compiler\2.2.10-rel-29722-00\tools\x64\ilc\ilc.exe --gatekeeper @"D:\a\1\s\Mobile\SuperCharge.Mobile.UWP\obj\x64\Release\ilc\intermediate\gkargs.rsp"'
##[error]C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\2.2.10-rel-29722-00\tools\Microsoft.NetNative.targets(805,5): Error : ILT0005: 'C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\runtime.win10-x64.microsoft.net.native.compiler\2.2.10-rel-29722-00\tools\x64\ilc\ilc.exe --gatekeeper @"D:\a\1\s\Mobile\SuperCharge.Mobile.UWP\obj\x64\Release\ilc\intermediate\gkargs.rsp"' returned exit code 1
C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\2.2.10-rel-29722-00\tools\Microsoft.NetNative.targets(805,5): error : ILT0005: 'C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\runtime.win10-x64.microsoft.net.native.compiler\2.2.10-rel-29722-00\tools\x64\ilc\ilc.exe --gatekeeper @"D:\a\1\s\Mobile\SuperCharge.Mobile.UWP\obj\x64\Release\ilc\intermediate\gkargs.rsp"' returned exit code 1 [D:\a\1\s\Mobile\SuperCharge.Mobile.UWP\SuperCharge.Mobile.UWP.csproj]
Done Building Project "D:\a\1\s\Mobile\SuperCharge.Mobile.UWP\SuperCharge.Mobile.UWP.csproj" (Build target(s)) -- FAILED.
Done Building Project "D:\a\1\s\Mobile\SuperCharge.Mobile.UWP\SuperCharge.Mobile.UWP.csproj" (default targets) -- FAILED.

Because I have not write access to C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\

@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@sfoslund sfoslund removed their assignment Jun 25, 2021
@sfoslund sfoslund transferred this issue from dotnet/sdk Jun 25, 2021
@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Jun 25, 2021
@tommcdon
Copy link
Member

Hi @xperiandri, thanks for posting this issue. .NET Native ships as a Nuget package. It seems that the AzDO script assumed it was restored to the local nuget package folder. As a performance optimization VS ships the latest .NET native package in the off-line nuget cache. This enables the project creation scenario with File->New C# UWP without needing to download the .NET native toolchain. Unfortunately Program Files is read-only, and unless the script has write access to that folder, it will not be able to update the gatekeeper xml. As I am sure you aware, F# is not an officially supported scenario hence it is disabled by default.

@xperiandri
Copy link
Author

So what is next? What does closing this issue mean?

@tommcdon
Copy link
Member

So what is next? What does closing this issue mean?

.NET native does not officially support F# scenarios

@dotnet dotnet locked as resolved and limited conversation to collaborators Jul 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-UWP untriaged New issue has not been triaged by the area owner
Projects
None yet
Development

No branches or pull requests

4 participants