The following forum(s) have migrated to Microsoft Q&A (Preview): Developing Universal Windows apps!
Visit Microsoft Q&A (Preview) to post new questions.

Learn More

 locked
[UWP][C#] error RHB0007: Could not load input file 'Microsoft.Toolkit.Uwp.UI.srclink'. RRS feed

  • Question

  • An app has been working fine for a long time.   After VS update to 15.9.1, and a slew of NuGet package updates, building the release version generates the following error:

    C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\2.2.1\tools\Microsoft.NetNative.targets(792,5): error : RHBIND : error RHB0007: Could not load input file 'Microsoft.Toolkit.Uwp.UI.srclink'.

    I have done every possible cleaning: clean the entire solution, clean projects one by one, deleting bin folders, deleting obj folders, wiping out  user\.nuget folder, restarting VS many times.

    Min version is 16299.

    Target version is 17763.  I also tried 17134.

    I want to emphasize that only .Net native release version has this issue.  The debug version works flawlessly.

    Could anyone offer a tip for the remedy?


    Hong

    Monday, November 19, 2018 6:28 AM

Answers

  • Downgrading Microsoft.NETCore.UniversalWindowsPlatform  from 6.2.2 to 6.1.9 resolves the issues.

    The real issue was from a dependent package of Microsoft.NETCore.UniversalWindowsPlatform 6.2.2 : "Microsoft.Net.Native.Compiler/2.2.1" whereas the Microsoft.NETCore.UniversalWindowsPlatform 6.1.9 depends on "Microsoft.Net.Native.Compiler/2.1.8"



    -Shubhan


    Tuesday, November 20, 2018 4:28 PM

All replies

  • Hi,

    I'm not sure if the problem is related to the new version of NuGet package or the VS. Could you please roll back the version of the NuGet package of Toolkit and made a try again?

    Also there is a new version of VS -15.9.2. You could upgrade the VS and made a try again.

    Best regards,

    Roy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, November 20, 2018 8:30 AM
  • I have just tried again with VS updated to 15.9.2, but the problem remains.

    Hong

    Tuesday, November 20, 2018 1:46 PM
  • I too have the same problem, Could not load input file 'Microsoft.Toolkit.Uwp.UI.srclink'. Running VS 15.8.7, so its not version VS version as it even occurs in 15.9.x

    Min & target verions: 10.0.17134.0

    Nugets:

    Microsoft.NETCore.UniversalWindowsPlatform 6.2.2

    Microsoft.Toolkit.Uwp.UI 5.0.0

    Newtonsoft.Json 11.0.2

    Error Details:

    1>------ Build started: Project: 5InLine, Configuration: Release x86 ------
    1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2110,5): warning MSB3277: Found conflicts between different versions of "System.Numerics.Vectors" that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.
    1>D:\Next Applications\5 in Line\Source Code\UWP\Model\GameAction.cs(36,35,36,52): warning CS0067: The event 'GameAction.CanExecuteChanged' is never used
    1>  5InLine -> D:\Next Applications\5 in Line\Source Code\UWP\bin\x86\Release\5InLine.exe
    1>  Processing application code
    1>  Computing application closure and generating interop code
    1>    Loading 110 modules...
    1>    Generating code...
    1>    Interop code generated.
    1>  Generating serialization code
    1>  Compiling interop code
    1>  Generating System.Reflection.DispatchProxy proxy code.
    1>  Cleaning up unreferenced code
    1>  Generating native code
    1>  Generating fixups for native code
    1>C:\Users\shubh\.nuget\packages\microsoft.net.native.compiler\2.2.1\tools\Microsoft.NetNative.targets(792,5): error : RHBIND : error RHB0007: Could not load input file 'Microsoft.Toolkit.Uwp.UI.srclink'.
    1>C:\Users\shubh\.nuget\packages\microsoft.net.native.compiler\2.2.1\tools\Microsoft.NetNative.targets(792,5): error : ILT0005: 'C:\Users\shubh\.nuget\packages\runtime.win10-x86.microsoft.net.native.compiler\2.2.1\tools\x86\ilc\Tools\rhbind.exe @"D:\My Applications\Source Code\UWP\obj\x86\Release\ilc\intermediate\rhbindargs.5InLine.rsp"' returned exit code 7
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
    ========== Package: 0 succeeded, 3 failed ===========


    -Shubhan

    Tuesday, November 20, 2018 3:36 PM
  • Thank you for the report, Shubhan.  

    I have just done the following to no avail:

    1. Rolling all Microsoft.Toolkit relative NuGet packages from 5.0 to 4.0.
    2. Close VS
    3. Deleting the bin and obj folders and the app, the libraries used by the app.
    4. Deleting .nuget folder.
    5. Start VS to run the release version. 


    Hong

    Tuesday, November 20, 2018 4:12 PM
  • Downgrading Microsoft.NETCore.UniversalWindowsPlatform  from 6.2.2 to 6.1.9 resolves the issues.

    The real issue was from a dependent package of Microsoft.NETCore.UniversalWindowsPlatform 6.2.2 : "Microsoft.Net.Native.Compiler/2.2.1" whereas the Microsoft.NETCore.UniversalWindowsPlatform 6.1.9 depends on "Microsoft.Net.Native.Compiler/2.1.8"



    -Shubhan


    Tuesday, November 20, 2018 4:28 PM
  • Very well done, Shubhan! Amazing job! Thank you for posting your answer here as well as on SO.


    Hong

    Tuesday, November 20, 2018 5:52 PM
  • Just to add that downgrading the toolkit to version 4 does not help, UWP needs to be downgraded to 6.1.9 as accepted answer says...


    Dejan

    Tuesday, November 27, 2018 12:06 AM
  • Just like to add my thanks for the 6.2.2 -> 6.1.9 solution. My problem was similar, namely that everything built and executed fine in Debug but not in Release -- but the unable to load message was for Xamarin.Essentials.srclink. Couldn't hit anything searching for that file name, but luckily this discussion came up on a search for RHB0007. Perhaps my entry will help others searching around the same problem. This really ought to be a big issue for the Microsoft.NETCore.UniversalWindowsPlatform developers.

    Incidentally, the page https://www.nuget.org/packages/Microsoft.NETCore.UniversalWindowsPlatform/6.2.2 now says: " The owner has unlisted this package. This could mean that the package is deprecated or shouldn't be used anymore."  When I check now Visual Studio doesn't offer 6.2.2 any more, which is good!

    • Edited by Pete S Friday, November 30, 2018 7:38 PM
    Friday, November 30, 2018 6:53 PM