Error in building .net source code with msbuild or visual studio with proxy

2024-03-06T06:08:12.9066667+00:00

I am having issue in building a source code . It uses nuget public repo and private . both of them fails to build and gives error of certificate . i have tried adding config in nuget.config file but unable to find path to solution . Here is msbuild version - 17.9.5.7608 and dotnet version 8.0.200

Package 'System.Security.Cryptography.Csp 4.3.0' from source 'https://api.nuget.org/v3/index.json': SHA256 hash: 0E 5F38F57DC1BCC806D8494F4F90FBCEDD988B46760709CBEEC6F4219AA6157D Package 'System.Diagnostics.DiagnosticSource 4.3.0' from source 'https://api.nuget.org/v3/index.json': Subject Name : CN=NuGet.org Repository by Microsoft, O=NuGet.org Repository by Microsoft, L=Redmond, S=Washington, C=US Package 'System.Security.Cryptography.Csp 4.3.0' from source 'https://api.nuget.org/v3/index.json': Valid from: 4/9 /2018 7:00:00 PM to 4/14/2021 7:00:00 AM Package 'System.Security.Cryptography.Cng 4.3.0' from source 'https://api.nuget.org/v3/index.json': SHA256 hash: 0E 5F38F57DC1BCC806D8494F4F90FBCEDD988B46760709CBEEC6F4219AA6157D Package 'System.Diagnostics.DiagnosticSource 4.3.0' from source 'https://api.nuget.org/v3/index.json': SHA256 hash: 0E5F38F57DC1BCC806D8494F4F90FBCEDD988B46760709CBEEC6F4219AA6157D Package 'System.Security.Cryptography.Cng 4.3.0' from source 'https://api.nuget.org/v3/index.json': Valid from: 4/9 /2018 7:00:00 PM to 4/14/2021 7:00:00 AM Package 'System.Diagnostics.DiagnosticSource 4.3.0' from source 'https://api.nuget.org/v3/index.json': Valid from: 4/9/2018 7:00:00 PM to 4/14/2021 7:00:00 AM D:\workspace\mode\CIDev\core\TrialModeCore\ModeCore.csproj : error NU3037: Pac kage 'System.Security.Cryptography.Cng 4.3.0' from source 'https://api.nuget.org/v3/index.json': The repository primary signature validity period has expired. [D:\workspace\mode\CIDev\core\Mode.sln] D:\workspace\mode\CIDev\core\ModeCore.csproj : error NU3037: Pac kage 'System.Security.Cryptography.Csp 4.3.0' from source 'https://api.nuget.org/v3/index.json': The repository primary signature validity period has expired. [D:\workspace\mode\core\Mode.sln]

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,624 questions
.NET CLI
.NET CLI
A cross-platform toolchain for developing, building, running, and publishing .NET applications.
323 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. Anna Xiu-MSFT 25,801 Reputation points Microsoft Vendor
    2024-03-06T10:56:42.17+00:00

    Hi @Pandey Khajan Chandra (BGSW/EBS4-SX)

    Welcome to Microsoft Q&A! 

    Please update the NuGet packages to the latest version and build it again. 

    You can also try to clear NuGet Caches and delete the hidden .vs folder in the project folder.

    Then, re-launch the Visual Studio and rebuild the project.  

    Sincerely,

    Anna


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".  Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.