Skip to content

Not created folder runtimes NET 5.0.5 #17527

Open

Description

@nurbat

dotnet build -c Release
dotnet publish --no-build -c Release -f net5.0 --self-contained true -o BuildRelease

изображение

And when I try to run through the console with the command ./MyProject.exe returns an error that the file was not found at the path runtimes/etc...

And if you just try to launch it with a double click, nothing happens at all

Activity

  1. vitek-karas commented on May 7, 2021

    @vitek-karas
    Member

    Can you please post the error message you get when you run it from command line?

    What kind of app is this? ASP.NET, Win UI, console... ?

  2. nurbat commented on May 7, 2021

    @nurbat
    Author

    What kind of app is this? ASP.NET, Win UI, console... ?
    Console

    Can you please post the error message you get when you run it from command line?
    Later, The error was standard that a specific manifest, and that a certain dll is missing in the runtimes folder

  3. SingleAccretion commented on May 7, 2021

    @SingleAccretion

    Is this dll clrcompression.dll by any chance?

  4. nurbat commented on May 8, 2021

    @nurbat
    Author

    there is no such dll in the folder

    I use steamcmd to upload to the steam store, after which this problem occurs. If you just copy it to another location, even on another PC. It works, and when I upload files via steamcmd, it starts swearing.

    I tried to upload the files to a zip archive, upload to steam after unpacking, the program works, but if you try to download the files without unpacking, the program stops working and swears that there is no folder runtimes

  5. SingleAccretion commented on May 8, 2021

    @SingleAccretion

    there is no such dll in the folder

    That's quite interesting. But my question was specifically about the message. What does it say exactly?

  6. nurbat commented on May 8, 2021

    @nurbat
    Author

    изображение

  7. agocke commented on May 8, 2021

    @agocke
    Member

    Could you also provide a binary log (gathered using msbuild /bl or dotnet -bl)?

  8. nurbat commented on May 8, 2021

    @nurbat
    Author

    --self-contained false
    dotnet publish -c Release -f net5.0 -r win-x64 --self-contained false -o PublishRelease -bl
    msbuild.zip

  9. nurbat commented on May 8, 2021

    @nurbat
    Author

    --self-contained true
    dotnet publish -c Release -f net5.0 -r win-x64 --self-contained true -o PublishRelease -bl
    msbuild.zip

  10. vitek-karas commented on May 10, 2021

    @vitek-karas
    Member

    I'm guessing that the upload to steam removes .pdb files - but in this case the file is listed as required by the app, so it fails without it. As a workaround you could upgrade to Microsoft.Data.SqlClient.SNI.runtime version 2.1.1 which doesn't seem to have this problem (it doesn't ship the pdb in the package).

  11. transferred this issue fromdotnet/runtimeon May 10, 2021
  12. ghost added
    untriaged
    on May 10, 2021
  13. vitek-karas commented on May 10, 2021

    @vitek-karas
    Member

    Moving this to SDK since this seems to be an SDK problem (if there is even one). I don't know if SDK should include pdb files in .deps.json in this case.

  14. nurbat commented on May 10, 2021

    @nurbat
    Author

    the pdb is in place, apparently that's not the problem. This problem should be solved, but this SNI file does not have a pdb even in the assembly

  15. vitek-karas commented on May 10, 2021

    @vitek-karas
    Member

    As far as I can tell the SNI is a native library.

  16. nurbat commented on May 10, 2021

    @nurbat
    Author

    Used the Microsoft.* library

  17. added and removed
    untriaged
    on May 13, 2021
  18. removed their assignment
    on May 13, 2021
  19. added this to the Discussion milestone on May 13, 2021
  20. michaelosthege commented on Jan 18, 2023

    @michaelosthege

    This bug appears to directly contradict what is stated in the documentation:

    If the app uses a NuGet package that has platform-specific implementations, dependencies for all platforms are copied to the publish\runtimes{platform} folder.

    I may have found a workaround but will need to test this further:
    Running

    dotnet publish -c Release -o myPublishDir -r linux
    dotnet publish -c Release -o myPublishDir -r osx
    dotnet publish -c Release -o myPublishDir -r win
    dotnet publish -c Release -o myPublishDir                 (not sure if this is needed)
    

    copies the native libraries that should end up in runtimes/**/* to myPublishDir and as long as their names don't collide, this should work?
    At least my very basic CI test passed, but I'll have to run more thorough testing to determine if I can trust this workaround.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions