Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • curtismccaw 27 posts 87 karma points
    Oct 13, 2023 @ 11:27


    Have ran dotnet publish and now getting the following error.

    Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'BouncyCastle.Crypto, Version=, Culture=neutral, PublicKeyToken=0e99375e54769942'. The system cannot find the file specified.

    Any advice? Just upgraded from v11 to v12.

    Many thanks

  • Wilmar Acosta 1 post 71 karma points
    Oct 25, 2023 @ 02:25
    Wilmar Acosta

    Same here from v10 to 12. Any solution to this issue?

  • curtismccaw 27 posts 87 karma points
    Oct 25, 2023 @ 07:30

    Hi Wilmar,

    Yes, I managed to get it working.

    This video: helped a lot.

    Command to run is:

    dotnet publish --configuration Release

    Code will be published to folder: project-name > bin > Release > net7.0 > publish. These will be the new files to use on the live server. Before you copy these new files, ensure you copy web.config, appsettings and take a backup of your media folder inside www. You'll need to add these back in again.

    Copy all files from the publish folder and add them onto the live server. Then add the files above back in.

    Hope this helps. It took a bit of time to suss out. Hopefully Umbraco will update the documentation for this.

  • curtismccaw 27 posts 87 karma points
    Oct 25, 2023 @ 07:45

    Should also say, you can run the command

    dotnet publish --configuration Debug 

    If you wish to see errors and it's not a production environment.

  • ewuski 88 posts 234 karma points
    Feb 22, 2024 @ 19:37

    We had this error after deploying to staging environment.

    Deleted the BouncyCastle.Crypto.dll, restarted the site and the website came back on staging.

    However, when we tried the same on production, be got a Boot failure. So we deleted all production files and deployed a fresh build. It worked.

Please Sign in or register to post replies

Write your reply to: