How to resolve NuGet "The package integrity check failed" errors? - nuget
My development environment is as follows:
Windows 10 Enterprise 64-bit
Visual Studio 2022 Professional
.NET 6.0
I am new to using NuGet. I am having constant problems with NuGet not being able to install packages with the error "The package integrity check failed."
These steps will reproduce the error consistently on my system:
Start VS, choose "Create a new project"
Filter for C# / Windows / Console and choose Console App (not the .NET Framework one)
Framework: .NET 6 (Long-term support)
Once VS finishes creating the project, right-click the project in Solution Explorer and select "Manage NuGet Packages..."
Click Browse, enter "microsoft.data.sqlclient" in the search box, then choose the Microsoft.Data.SqlClient item. As of today the latest stable version is 4.1.0. Click Install. My package source is "https://api.nuget.org/v3/index.json" if that is important
A lot of NuGet messages show up in the Output window, always ending with a NU3008 error. Apologies for the verbosity, I am not sure how much of this is relevant:
Restoring packages for d:\dev\CoreConsoleTest\CoreConsoleTest.csproj...
GET https://api.nuget.org/v3-flatcontainer/microsoft.data.sqlclient/index.json
OK https://api.nuget.org/v3-flatcontainer/microsoft.data.sqlclient/index.json 122ms
GET https://api.nuget.org/v3-flatcontainer/microsoft.data.sqlclient/4.1.0/microsoft.data.sqlclient.4.1.0.nupkg
OK https://api.nuget.org/v3-flatcontainer/microsoft.data.sqlclient/4.1.0/microsoft.data.sqlclient.4.1.0.nupkg 742ms
GET https://api.nuget.org/v3-flatcontainer/azure.core/index.json
GET https://api.nuget.org/v3-flatcontainer/microsoft.identity.client.extensions.msal/index.json
GET https://api.nuget.org/v3-flatcontainer/system.memory/index.json
GET https://api.nuget.org/v3-flatcontainer/system.text.json/index.json
GET https://api.nuget.org/v3-flatcontainer/microsoft.identity.client/index.json
GET https://api.nuget.org/v3-flatcontainer/microsoft.identitymodel.jsonwebtokens/index.json
GET https://api.nuget.org/v3-flatcontainer/microsoft.win32.registry/index.json
GET https://api.nuget.org/v3-flatcontainer/system.buffers/index.json
GET https://api.nuget.org/v3-flatcontainer/system.configuration.configurationmanager/index.json
GET https://api.nuget.org/v3-flatcontainer/system.diagnostics.diagnosticsource/index.json
GET https://api.nuget.org/v3-flatcontainer/system.runtime.caching/index.json
GET https://api.nuget.org/v3-flatcontainer/system.text.encoding.codepages/index.json
GET https://api.nuget.org/v3-flatcontainer/system.text.encodings.web/index.json
GET https://api.nuget.org/v3-flatcontainer/system.security.cryptography.cng/index.json
GET https://api.nuget.org/v3-flatcontainer/system.security.principal.windows/index.json
OK https://api.nuget.org/v3-flatcontainer/azure.core/index.json 46ms
GET https://api.nuget.org/v3-flatcontainer/azure.core/1.6.0/azure.core.1.6.0.nupkg
OK https://api.nuget.org/v3-flatcontainer/microsoft.identity.client.extensions.msal/index.json 123ms
OK https://api.nuget.org/v3-flatcontainer/system.text.json/index.json 133ms
GET https://api.nuget.org/v3-flatcontainer/microsoft.identity.client.extensions.msal/2.16.5/microsoft.identity.client.extensions.msal.2.16.5.nupkg
GET https://api.nuget.org/v3-flatcontainer/system.text.json/4.6.0/system.text.json.4.6.0.nupkg
OK https://api.nuget.org/v3-flatcontainer/system.memory/index.json 173ms
GET https://api.nuget.org/v3-flatcontainer/system.memory/4.5.3/system.memory.4.5.3.nupkg
OK https://api.nuget.org/v3-flatcontainer/microsoft.identity.client/index.json 190ms
GET https://api.nuget.org/v3-flatcontainer/microsoft.identity.client/4.22.0/microsoft.identity.client.4.22.0.nupkg
OK https://api.nuget.org/v3-flatcontainer/microsoft.win32.registry/index.json 208ms
GET https://api.nuget.org/v3-flatcontainer/microsoft.win32.registry/5.0.0/microsoft.win32.registry.5.0.0.nupkg
OK https://api.nuget.org/v3-flatcontainer/microsoft.identitymodel.jsonwebtokens/index.json 226ms
GET https://api.nuget.org/v3-flatcontainer/microsoft.identitymodel.jsonwebtokens/6.8.0/microsoft.identitymodel.jsonwebtokens.6.8.0.nupkg
OK https://api.nuget.org/v3-flatcontainer/system.buffers/index.json 246ms
GET https://api.nuget.org/v3-flatcontainer/system.buffers/4.5.1/system.buffers.4.5.1.nupkg
OK https://api.nuget.org/v3-flatcontainer/system.diagnostics.diagnosticsource/index.json 271ms
GET https://api.nuget.org/v3-flatcontainer/system.diagnostics.diagnosticsource/5.0.0/system.diagnostics.diagnosticsource.5.0.0.nupkg
OK https://api.nuget.org/v3-flatcontainer/system.text.encoding.codepages/index.json 294ms
OK https://api.nuget.org/v3-flatcontainer/system.configuration.configurationmanager/index.json 310ms
GET https://api.nuget.org/v3-flatcontainer/system.text.encoding.codepages/5.0.0/system.text.encoding.codepages.5.0.0.nupkg
GET https://api.nuget.org/v3-flatcontainer/system.configuration.configurationmanager/5.0.0/system.configuration.configurationmanager.5.0.0.nupkg
OK https://api.nuget.org/v3-flatcontainer/system.security.cryptography.cng/index.json 319ms
OK https://api.nuget.org/v3-flatcontainer/system.runtime.caching/index.json 327ms
GET https://api.nuget.org/v3-flatcontainer/system.security.cryptography.cng/5.0.0/system.security.cryptography.cng.5.0.0.nupkg
GET https://api.nuget.org/v3-flatcontainer/system.runtime.caching/5.0.0/system.runtime.caching.5.0.0.nupkg
OK https://api.nuget.org/v3-flatcontainer/system.text.encodings.web/index.json 357ms
GET https://api.nuget.org/v3-flatcontainer/system.text.encodings.web/4.7.2/system.text.encodings.web.4.7.2.nupkg
OK https://api.nuget.org/v3-flatcontainer/system.security.principal.windows/index.json 381ms
GET https://api.nuget.org/v3-flatcontainer/system.security.principal.windows/5.0.0/system.security.principal.windows.5.0.0.nupkg
OK https://api.nuget.org/v3-flatcontainer/system.memory/4.5.3/system.memory.4.5.3.nupkg 282ms
OK https://api.nuget.org/v3-flatcontainer/microsoft.identity.client/4.22.0/microsoft.identity.client.4.22.0.nupkg 392ms
OK https://api.nuget.org/v3-flatcontainer/azure.core/1.6.0/azure.core.1.6.0.nupkg 790ms
OK https://api.nuget.org/v3-flatcontainer/microsoft.identity.client.extensions.msal/2.16.5/microsoft.identity.client.extensions.msal.2.16.5.nupkg 721ms
OK https://api.nuget.org/v3-flatcontainer/system.text.json/4.6.0/system.text.json.4.6.0.nupkg 713ms
OK https://api.nuget.org/v3-flatcontainer/microsoft.identitymodel.jsonwebtokens/6.8.0/microsoft.identitymodel.jsonwebtokens.6.8.0.nupkg 621ms
OK https://api.nuget.org/v3-flatcontainer/system.buffers/4.5.1/system.buffers.4.5.1.nupkg 601ms
OK https://api.nuget.org/v3-flatcontainer/system.diagnostics.diagnosticsource/5.0.0/system.diagnostics.diagnosticsource.5.0.0.nupkg 713ms
OK https://api.nuget.org/v3-flatcontainer/system.configuration.configurationmanager/5.0.0/system.configuration.configurationmanager.5.0.0.nupkg 684ms
OK https://api.nuget.org/v3-flatcontainer/system.runtime.caching/5.0.0/system.runtime.caching.5.0.0.nupkg 888ms
OK https://api.nuget.org/v3-flatcontainer/microsoft.win32.registry/5.0.0/microsoft.win32.registry.5.0.0.nupkg 3605ms
OK https://api.nuget.org/v3-flatcontainer/system.text.encoding.codepages/5.0.0/system.text.encoding.codepages.5.0.0.nupkg 3521ms
OK https://api.nuget.org/v3-flatcontainer/system.security.cryptography.cng/5.0.0/system.security.cryptography.cng.5.0.0.nupkg 4748ms
OK https://api.nuget.org/v3-flatcontainer/system.text.encodings.web/4.7.2/system.text.encodings.web.4.7.2.nupkg 5143ms
OK https://api.nuget.org/v3-flatcontainer/system.security.principal.windows/5.0.0/system.security.principal.windows.5.0.0.nupkg 5121ms
Installed Microsoft.IdentityModel.JsonWebTokens 6.8.0 from https://api.nuget.org/v3/index.json with content hash +7JIww64PkMt7NWFxoe4Y/joeF7TAtA/fQ0b2GFGcagzB59sKkTt/sMZWR6aSZht5YC7SdHi3W6yM1yylRGJCQ==.
Installed Microsoft.Identity.Client.Extensions.Msal 2.16.5 from https://api.nuget.org/v3/index.json with content hash VlGUZEpF8KP/GCfFI59sdE0WA0o9quqwM1YQY0dSp6jpGy5EOBkureaybLfpwCuYUUjQbLkN2p7neUIcQCfbzA==.
Installed Azure.Core 1.6.0 from https://api.nuget.org/v3/index.json with content hash kI4m2NsODPOrxo0OoKjk6B3ADbdovhDQIEmI4039upjjZKRaewVLx/Uz4DfRa/NtnIRZQPUALe1yvdHWAoRt4w==.
Installed System.Memory 4.5.3 from https://api.nuget.org/v3/index.json with content hash 3oDzvc/zzetpTKWMShs1AADwZjQ/36HnsufHRPcOjyRAAMLDlu2iD33MBI2opxnezcVUtXyqDXXjoFMOU9c7SA==.
Package 'System.Text.Encoding.CodePages 5.0.0' from source 'https://api.nuget.org/v3/index.json': Signature Hash Algorithm: SHA256
Package 'System.Text.Encoding.CodePages 5.0.0' from source 'https://api.nuget.org/v3/index.json': Verifying the author primary signature with certificate:
Package 'System.Text.Encoding.CodePages 5.0.0' from source 'https://api.nuget.org/v3/index.json': SHA1 hash: F404000FB11E61F446529981C7059A76C061631E
Package 'System.Text.Encoding.CodePages 5.0.0' from source 'https://api.nuget.org/v3/index.json': Issued by: CN=DigiCert SHA2 Assured ID Code Signing CA, OU=www.digicert.com, O=DigiCert Inc, C=US
Package 'System.Text.Encoding.CodePages 5.0.0' from source 'https://api.nuget.org/v3/index.json': Timestamp: 10/20/2020 9:29:58 AM
Package 'System.Text.Encoding.CodePages 5.0.0' from source 'https://api.nuget.org/v3/index.json': Verifying author primary signature's timestamp with timestamping service certificate:
Subject Name: CN=Symantec SHA256 TimeStamping Signer - G3, OU=Symantec Trust Network, O=Symantec Corporation, C=US
SHA1 hash: A9A4121063D71D48E8529A4681DE803E3E7954B0
SHA256 hash: C474CE76007D02394E0DA5E4DE7C14C680F9E282013CFEF653EF5DB71FDF61F8
Issued by: CN=Symantec SHA256 TimeStamping CA, OU=Symantec Trust Network, O=Symantec Corporation, C=US
Valid from: 12/22/2017 7:00:00 PM to 3/22/2029 7:59:59 PM
Installed System.Text.Json 4.6.0 from https://api.nuget.org/v3/index.json with content hash 4F8Xe+JIkVoDJ8hDAZ7HqLkjctN/6WItJIzQaifBwClC7wmoLSda/Sv2i6i1kycqDb3hWF4JCVbpAweyOKHEUA==.
Installed System.Runtime.Caching 5.0.0 from https://api.nuget.org/v3/index.json with content hash 30D6MkO8WF9jVGWZIP0hmCN8l9BTY4LCsAzLIe4xFSXzs+AjDotR7DpSmj27pFskDURzUvqYYY0ikModgBTxWw==.
Installed System.Text.Encodings.Web 4.7.2 from https://api.nuget.org/v3/index.json with content hash iTUgB/WtrZ1sWZs84F2hwyQhiRH6QNjQv2DkwrH+WP6RoFga2Q1m3f9/Q7FG8cck8AdHitQkmkXSY8qylcDmuA==.
Installed System.Buffers 4.5.1 from https://api.nuget.org/v3/index.json with content hash Rw7ijyl1qqRS0YQD/WycNst8hUUMgrMH4FCn1nNm27M4VxchZ1js3fVjQaANHO5f3sN4isvP4a+Met9Y4YomAg==.
Installed System.Configuration.ConfigurationManager 5.0.0 from https://api.nuget.org/v3/index.json with content hash aM7cbfEfVNlEEOj3DsZP+2g9NRwbkyiAv2isQEzw7pnkDg9ekCU2m1cdJLM02Uq691OaCS91tooaxcEn8d0q5w==.
Installed System.Diagnostics.DiagnosticSource 5.0.0 from https://api.nuget.org/v3/index.json with content hash tCQTzPsGZh/A9LhhA6zrqCRV4hOHsK90/G7q3Khxmn6tnB1PuNU0cRaKANP2AWcF9bn0zsuOoZOSrHuJk6oNBA==.
Package 'Microsoft.Identity.Client 4.22.0' from source 'https://api.nuget.org/v3/index.json': Signature Hash Algorithm: SHA256
Package 'Microsoft.Identity.Client 4.22.0' from source 'https://api.nuget.org/v3/index.json': Verifying the author primary signature with certificate:
Package 'Microsoft.Identity.Client 4.22.0' from source 'https://api.nuget.org/v3/index.json': SHA1 hash: F404000FB11E61F446529981C7059A76C061631E
Package 'Microsoft.Identity.Client 4.22.0' from source 'https://api.nuget.org/v3/index.json': Issued by: CN=DigiCert SHA2 Assured ID Code Signing CA, OU=www.digicert.com, O=DigiCert Inc, C=US
Package 'Microsoft.Identity.Client 4.22.0' from source 'https://api.nuget.org/v3/index.json': Timestamp: 10/22/2020 1:50:36 PM
Package 'Microsoft.Identity.Client 4.22.0' from source 'https://api.nuget.org/v3/index.json': Verifying author primary signature's timestamp with timestamping service certificate:
Subject Name: CN=Symantec SHA256 TimeStamping Signer - G3, OU=Symantec Trust Network, O=Symantec Corporation, C=US
SHA1 hash: A9A4121063D71D48E8529A4681DE803E3E7954B0
SHA256 hash: C474CE76007D02394E0DA5E4DE7C14C680F9E282013CFEF653EF5DB71FDF61F8
Issued by: CN=Symantec SHA256 TimeStamping CA, OU=Symantec Trust Network, O=Symantec Corporation, C=US
Valid from: 12/22/2017 7:00:00 PM to 3/22/2029 7:59:59 PM
Installed Microsoft.Win32.Registry 5.0.0 from https://api.nuget.org/v3/index.json with content hash dDoKi0PnDz31yAyETfRntsLArTlVAVzUzCIvvEDsDsucrl33Dl8pIJG06ePTJTI3tGpeyHS9Cq7Foc/s4EeKcg==.
Package 'Microsoft.Data.SqlClient 4.1.0' from source 'https://api.nuget.org/v3/index.json': Signature Hash Algorithm: SHA256
Package 'Microsoft.Data.SqlClient 4.1.0' from source 'https://api.nuget.org/v3/index.json': Verifying the author primary signature with certificate:
Package 'Microsoft.Data.SqlClient 4.1.0' from source 'https://api.nuget.org/v3/index.json': SHA1 hash: A6E18D21B507879FC7F9C392A5CE355936E3AD2C
Package 'Microsoft.Data.SqlClient 4.1.0' from source 'https://api.nuget.org/v3/index.json': Issued by: CN=DigiCert SHA2 Assured ID Code Signing CA, OU=www.digicert.com, O=DigiCert Inc, C=US
Package 'Microsoft.Data.SqlClient 4.1.0' from source 'https://api.nuget.org/v3/index.json': Timestamp: 1/31/2022 5:36:44 PM
Package 'Microsoft.Data.SqlClient 4.1.0' from source 'https://api.nuget.org/v3/index.json': Verifying author primary signature's timestamp with timestamping service certificate:
Subject Name: CN=Symantec SHA256 TimeStamping Signer - G3, OU=Symantec Trust Network, O=Symantec Corporation, C=US
SHA1 hash: A9A4121063D71D48E8529A4681DE803E3E7954B0
SHA256 hash: C474CE76007D02394E0DA5E4DE7C14C680F9E282013CFEF653EF5DB71FDF61F8
Issued by: CN=Symantec SHA256 TimeStamping CA, OU=Symantec Trust Network, O=Symantec Corporation, C=US
Valid from: 12/22/2017 7:00:00 PM to 3/22/2029 7:59:59 PM
Installed System.Security.Principal.Windows 5.0.0 from https://api.nuget.org/v3/index.json with content hash t0MGLukB5WAVU9bO3MGzvlGnyJPgUlcwerXn1kzBRjwLKixT96XV0Uza41W49gVd8zEMFu9vQEFlv0IOrytICA==.
Installed System.Security.Cryptography.Cng 5.0.0 from https://api.nuget.org/v3/index.json with content hash jIMXsKn94T9JY7PvPq/tMfqa6GAaHpElRDpmG+SuL+D3+sTw2M8VhnibKnN8Tq+4JqbPJ/f+BwtLeDMEnzAvRg==.
NU3008: Package 'System.Text.Encoding.CodePages 5.0.0' from source 'https://api.nuget.org/v3/index.json': The package integrity check failed. The package has changed since it was signed. Try clearing the local http-cache and run nuget operation again.
NU3008: Package 'Microsoft.Identity.Client 4.22.0' from source 'https://api.nuget.org/v3/index.json': The package integrity check failed. The package has changed since it was signed. Try clearing the local http-cache and run nuget operation again.
NU3008: Package 'Microsoft.Data.SqlClient 4.1.0' from source 'https://api.nuget.org/v3/index.json': The package integrity check failed. The package has changed since it was signed. Try clearing the local http-cache and run nuget operation again.
Time Elapsed: 00:00:14.2400739
What I have tried:
Rebooting
Clearing my local cache (I have tried this many times, both from the command line with the nuget program and VS under Tools, Options, NuGet Package Manager, Clear All NuGet Cache(s))
Installing dependencies individually from NuGet
Repairing the Visual Studio 2022 installation
I have been trying to resolve this for almost 2 days now and I'm starting to see the red mist. I don't understand why this is failing or how to fix it, and I'm beyond frustrated with Microsoft for making the formerly simple process of adding dependencies complicated and opaque. Please, any help?
Update
To clarify, this does not happen for every package, but it does happen every time for Microsoft.Data.SqlClient (and other Microsoft packages).
I am using the latest version of the nuget command line tool (6.2.1.2)
I have tried all the suggestions made by Jingmiao Xu-MSFT below other than uninstalling and reinstalling Visual Studio. Suggestion #2, copying over the failing packages from another machine, did work but I do not accept that as a tenable permanent solution. Am I supposed to pester a coworker whenever I need to install packages from Microsoft?
I came across this issue which is nearly identical to mine, including the package and the package version. Unfortunately it contains no details about the resolution. If there is an issue with our corporate network I will need to take specifics to them. What sorts of network features might tamper with a NuGet package download?
According to your description, the error message said “Try clearing the local http-cache and run nuget operation again.” and this document suggests to run nuget locals http-cache -clear or dotnet nuget locals http-cache --clear command to cleare local http-caches.
If it doesn’t work you can try the following methods:
Close VS, delete nuget.config file from C:\Users\xxx(current user)\AppData\Roaming\NuGet,
delete .vs hidden folder of the solution folder, bin and obj folder of the project,
and then restart VS to regenerate that file to check whether it works.
copy the nuget packages Microsoft.Data.SqlClient from another worked PC into %userprofile%.nuget\packages. And then reinstall your nuget package there to check if this work.
download the latest nuget.exe v6.2.1 from this link and then close VS and restart your project and run this command under CMD:
nuget restore.
Finally, you can try to uninstall your vs and reinstall it. After installation, you can check if the problem exists.
Related
The gradlew signingReport for the SHA-1 key is not yielding any results - VS Code
I've been trying to use ./gradlew signingReport to get the SHA-1 of my signing certificate but with no luck. I get this error: > Task :app:signingReport Variant: debug Config: debug Store: /home/user/.android/debug.keystore Alias: AndroidDebugKey Error: Missing keystore I have created the project in VS Code on Ubuntu. Can someone help please?
Finally got it. Once gradlew is installed on the system. Install the debug.keystore in the system's android directory and then move to the android project in the project and run this script. It works.
UWP Deployment Microsoft.NET.Native.Runtime.1.7 not found error
I have recently installed a few updates to windows / visual studio 2017, and now when I create a package of my UWP app and try deploying it to any of the machine where it used to work just fine - installation fails and there is this error message in windows error log: AppX Deployment operation failed for package 92211ab1-5481-4a1a-9111-a3dd87b81b72_1.0.26.0_neutral_~_n78qa84z3g9aj with error 0x80073CF3. The specific error text for this failure is: Windows cannot install package 92211ab1-5481-4a1a-9111-a3dd87b81b72_1.0.26.0_x86__n78qa84z3g9aj because this package depends on a framework that could not be found. Provide the framework "Microsoft.NET.Native.Runtime.1.7" published by "CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US", with neutral or x86 processor architecture and minimum version 1.7.25531.0, along with this package to install. The frameworks with name "Microsoft.NET.Native.Runtime.1.7" currently installed are: {} I can not find any reference on the web for this package. The package installs just fine on the developement machine. Any help would be greatly appreciated. EDIT 1: Screenshot of my dependencies folder below:
UWP Deployment Microsoft.NET.Native.Runtime.1.7 not found The problem is that there is no Microsoft.NET.Native.Runtime.1.7 dependence in current OS system. And you could install Microsoft.NET.Native.Runtime.1.7 dependence manually. The Microsoft.NET.Native.Runtime.1.7 dependence will be stored in the Dependencies folder where under the appx folder. Update1 I have checked your screenshot. It seems that you generate your package in debug mode and I can reproduce the same dependency in this way. The .NET Native tool chain is checked by default in the release mode. So you could regenerate your package in release mode to get files above.
Looks like these dependencies only appear on a Release build, and not in Debug.
Ask the developer for a new app package. This package may conflict with a package already installed
I have converted an .EXE application using DesktopAppConverter, I have the .appX file. I installed the auto-generated certificate. Now When I try to install the appX file in my computer I get this error Ask the developer for a new app package. This package may conflict with a package already installed, or it depends on things not installed here (package dependencies), or is made for a different architecture (0x80073CF3) How Can I fix this?? the converter at one point says VERBOSE: Added a new framework package dependency based on file 'C:\vfs0\Users\ContainerAdministrator\AppData\Local\Fun Money\msvcp120.dll'. Package name: 'Microsoft.VCLibs.120.00.UWPDesktop' WARNING: DesktopAppConverter : warning 'W_PACKAGE_DEPENDENCY_ADDED': A dependency on framework package 'Microsoft.VCLibs.120.00.UWPDesktop' was added to the AppxManifest.xml. See 'http://go.microsoft.com/fwlink/?LinkId=821959' for guidance on installing the package prior to local deployment. Otherwise, if this is in error, remove the corresponding entry from Dependencies in the AppxManifest.xml before packaging and deploying your application. VERBOSE: -------------------------------------------------- I did visit go.microsoft.com/fwlink/?LinkId=821959 and I installed VC 14, 12 and 11. But Still The same error. Note The appManifest.xml in .appX file (used winrar to open it) have this dependencies <Dependencies> <TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.14393.0" MaxVersionTested="10.0.14393.0" /> <PackageDependency Name="Microsoft.VCLibs.120.00.UWPDesktop" MinVersion="12.0.40652.5" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" /> </Dependencies> Yet when I visit C:\Program Files (x86)\Microsoft SDKs\Windows Kits\10\ExtensionSDKs\Microsoft.VCLibs.Desktop\14.0 I only have the 14.0 version to install no 12.0 folder exists. I'm not sure if this note helps fixing the problem but I added just in case.
When sideloading an .appx package that has dependencies, those dependencies are not downloaded from the Windows Store automatically. You will need to explicitly install them on the target machine. Users who get your app from the Store won't need to do this, the Store will install for them. Here is how you do it in the sideloading scenario: - open a powershell command prompt - locate the .appx package for your dependency (in this case 'Microsoft.VCLibs.x86.12.00.Universal.appx') - run Add-AppxPackage Microsoft.VCLibs.x86.12.00.Universal.appx - now try deploying your app package again Thanks, Stefan Wick - Windows Developer Platform
Building MongoDB C Driver in Windows
What I did so far I read the installation guide. Installed OpenSSL library for Windows after downloading a setup file. Downloaded and extracted a Mongo C Driver directory from GitHub. Installed CMake for Windows after downloading from CMake web site. Went to mongo-c-driver/src/libbson and run cmake -G "Visual Studio 14 2015 Win64" and it prints (maybe) success. D:\works\test\mongo-c-driver\src\libbson>cmake -G "Visual Studio 14 2015 Win64" Current version (from VERSION_CURRENT file): 1.4.0-dev Previous release (from VERSION_RELEASED file): 1.3.5 -- Check if the system is big endian -- Searching 16 bit integer -- Looking for sys/types.h -- Looking for sys/types.h - found -- Looking for stdint.h -- Looking for stdint.h - found -- Looking for stddef.h -- Looking for stddef.h - found -- Check size of unsigned short -- Check size of unsigned short - done -- Using unsigned short -- Check if the system is big endian - little endian -- Looking for snprintf -- Looking for snprintf - found -- Looking for _set_output_format -- Looking for _set_output_format - not found -- Performing Test BSON_HAVE_TIMESPEC -- Performing Test BSON_HAVE_TIMESPEC - Success -- struct timespec found -- Configuring done -- Generating done -- Build files have been written to: D:/works/test/mongo-c-driver/src/libbson Executed msbuild ALL_BUILD.vcxproj and prints the success. The problem Went to mongo-c-driver and run `cmake -G "Visual Studio 14 2015 Win64" and prints errors like this. -- Found BSON: BSON-NOTFOUND;ws2_32 -- Found OpenSSL: optimized;D:/apps/OpenSSL-Win64/lib/VC/ssleay32MD.lib;debug;D:/apps/OpenSSL-Win64/lib/VC/ssleay32MDd.lib;optimized;D:/apps/OpenSSL-Win64/lib/VC/libeay32MD.lib;debug;D:/apps/OpenSSL-Win64/lib/VC/libeay32MDd.lib (found version "1.0.2h") -- Searching for sasl/sasl.h -- Not found (specify -DCMAKE_INCLUDE_PATH=C:/path/to/sasl/include for SASL support) -- Searching for libsasl2 -- Not found (specify -DCMAKE_LIBRARY_PATH=C:/path/to/sasl/lib for SASL support) -- Configuring incomplete, errors occurred! See also "D:/works/test/mongo-c-driver/CMakeFiles/CMakeOutput.log". I looked for sasl.h from my disks but there is none. I also looked for it from OpenSSL GitHub but it does not have sasl.h I downloaded and opened cyrus-sasl from here, but I am stuck with it. I don't know what to do with it. How can I do the successful build of MongoDB C Driver?
It appears that the libsasl2 port to Windows is not complete. Although I did ultimately get libsasl to compile, there was no libsasl2 produced. It appears that SASL is used by MongoDB C Driver for Kerberos. I don't know if they have tried to get Kerberos working with the C Driver on Windows without a port of the libsasl2 library. I was, however, able to get the MongoDB C Driver to ultimately compile. I initially tried to compile using subdirectories of C:\, as opposed to C:\mongo-c-driver etc., but that didn't work well, but when I compiled using the directory structure in the documentation, the compile succeeded. To get it to compile, I disabled the SASL library in the compilation. I don't think it will be needed unless you need to use Kerberos. I initially had to explicitly disable SASL (perhaps because of using 64 bit) -- that can be done with -DENABLE_SASL=no when compiling the mongo-c-driver. Here are the steps: Got driver source from this page: https://github.com/mongodb/mongo-c-driver/releases (1.3.5) Got cmake from https://cmake.org/download/ Installed cmake using the Windows installer, adding cmake to the path for all users. I had to log out and log back in to get the path to update. Then, I copied the mongo-c-driver-1.3.5 source to c:\mongo-c-driver-1.3.5 Then, I used the Visual Studio MSBuild Command Prompt, started with Run As Administrator C:\mongo-c-driver-1.3.5\src\libbson>cmake -DCMAKE_INSTALL_PREFIX=C:\libmongoc -G "Visual Studio 14" -- The C compiler identification is unknown -- The CXX compiler identification is unknown CMake Error at CMakeLists.txt:3 (project): No CMAKE_C_COMPILER could be found. CMake Error at CMakeLists.txt:3 (project): No CMAKE_CXX_COMPILER could be found. -- Configuring incomplete, errors occurred! See also "C:/mongo-c-driver-1.3.5/src/libbson/CMakeFiles/CMakeOutput.log". See also "C:/mongo-c-driver-1.3.5/src/libbson/CMakeFiles/CMakeError.log". Turns out that the C compilers are not installed with a standard installation of Visual Studio, so I had to install C++ component of Visual Studio. I installed C++ Common Tools, but not MFC for C++ nor XP Support. That said it would use 3 GB of disk space (started at 39.5, ended at 37.0, so 2.5 GB used) Once that was installed: cd \mongo-c-driver-1.3.5\src\libbson cmake -DCMAKE_INSTALL_PREFIX=C:\libmongoc -G "Visual Studio 14" . msbuild.exe ALL_BUILD.vcxproj msbuild.exe INSTALL.vcxproj cd ..\.. C:\mongo-c-driver-1.3.5>cmake -DCMAKE_INSTALL_PREFIX=C:\libmongoc -DENABLE_SSL=WINDOWS -DBSON_ROOT_DIR=C:\libmongoc -G "Visual Studio 14" . -- The C compiler identification is MSVC 19.0.23026.0 -- The CXX compiler identification is MSVC 19.0.23026.0 -- Check for working C compiler using: Visual Studio 14 2015 -- Check for working C compiler using: Visual Studio 14 2015 -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler using: Visual Studio 14 2015 -- Check for working CXX compiler using: Visual Studio 14 2015 -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found BSON: C:/libmongoc/lib/bson-1.0.lib;ws2_32 -- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_LIBRARIES OPENSSL_INCLUDE_DIR) -- Searching for sasl/sasl.h -- Not found (specify -DCMAKE_INCLUDE_PATH=C:/path/to/sasl/include for SASL support) -- Searching for libsasl2 -- Not found (specify -DCMAKE_LIBRARY_PATH=C:/path/to/sasl/lib for SASL support) Current version (from VERSION_CURRENT file): 1.3.5 -- Configuring done -- Generating done -- Build files have been written to: C:/mongo-c-driver-1.3.5 OpenSSL was not present, so I obtained 32 bit Win32 OpenSSL v1.0.2h from http://slproweb.com/products/Win32OpenSSL.html Then, I installed OpenSSL. Changed installation directory to C:\work\OpenSSL-Win32, and I allowed the OpenSSL installer to install the binaries into the Windows system directory Now, C:\mongo-c-driver-1.3.5>cmake -DCMAKE_INSTALL_PREFIX=C:\libmongoc -DENABLE_SSL=WINDOWS -DBSON_ROOT_DIR=C:\libmongoc -G "Visual Studio 14" . -- Found OpenSSL: optimized;C:/work/OpenSSL-Win32/lib/VC/ssleay32MD.lib;debug;C:/work/OpenSSL-Win32/lib/VC/ssleay32MDd.lib;optimized;C:/work/OpenSSL-Win32/lib/VC/libeay32MD.lib;debug;C:/work/OpenSSL-Win32/lib/VC/libeay32MDd.lib (found version "1.0.2h") -- Searching for sasl/sasl.h -- Not found (specify -DCMAKE_INCLUDE_PATH=C:/path/to/sasl/include for SASL support) -- Searching for libsasl2 -- Not found (specify -DCMAKE_LIBRARY_PATH=C:/path/to/sasl/lib for SASL support) Current version (from VERSION_CURRENT file): 1.3.5 -- Configuring done -- Generating done -- Build files have been written to: C:/mongo-c-driver-1.3.5 C:\mongo-c-driver-1.3.5> msbuild.exe ALL_BUILD.vcxproj (lots of output, with some yellow warnings, but no red errors) msbuild.exe INSTALL.vcxproj And now the mongo-c-driver has been built. I can use it with Visual C++ to connect to my MongoDB server using ssl. Now, I am trying to figure out how to get Embarcadero RADStudio C++ Builder to use the new mongo-c-driver. Just copying the .dll's into the application's folder results in an abort in the bson dll. The stack trace looks like this:
There are two errors in that output. - libbson must be installed and available - mongoc is configured against cyrus sasl, in which case it must be installed and available Both are easily fixable, and later versions of mongoc will no longer error if cyrus sasl or openssl isn't available, but will instead use the Windows native implementations. The driver can also be configured without them. The available configuration options and values are: -DENABLE_SASL=[CYRUS|SSPI|AUTO|OFF] -DENABLE_SSL=[OPENSSL|WINDOWS|DARWIN|AUTO|OFF] Unfortunately the cmake installation of mongoc will not automatically install the bundled libbson for you, this may be fixed in the future, but for now you need to install it seperately. In short, to install the mongoc driver on Windows: Download & extract mongoc (https://github.com/mongodb/mongo-c-driver/releases). mongoc releases comes with libbson sources so no need to download them seperately. Enter the libbson directory, "src/libbson" and then: cd c:/path/to/mongoc/ cd src/libbson # Configure and install libbson cmake.exe -G "Visual Studio 14 2015 Win64" \ -DCMAKE_INSTALL_PREFIX=c:/mongoc msbuild.exe ALL_BUILD.vcxproj msbuild.exe INSTALL.vcxproj # Installs libbson cd ../.. # Go back to the root folder of the release sources # Configure and install mongoc cmake.exe -G "Visual Studio 14 2015 Win64" \ -DCMAKE_INSTALL_PREFIX=c:/mongoc \ -DCMAKE_PREFIX_PATH=c:/mongoc/lib/cmake \ -DENABLE_AUTOMATIC_INIT_AND_CLEANUP:BOOL=OFF \ -DENABLE_SSL=WINDOWS \ # Use Windows Native TLS, rather then OpenSSL -DENABLE_SASL=SSPI # Use Windows Native SSPI, rather then Cyrus SASL msbuild.exe ALL_BUILD.vcxproj msbuild.exe INSTALL.vcxproj
With a current Visual Studio you can just open the project, build all and get your DLLs. I used Community 2019 Make sure the Desktop development with C++ workload is installed, it includes CMake support Choose Open, CMake, then select CMakeLists.txt from the root of the extracted source archive Now you are already ready to "build all", but since the default debug build is not recommended, you should open CMake settings, use the green "+" button and select x86-Release (or x64, if required). For Delphi users: the default DLL filenames are without the required "lib" prefix (libmongoc-1.0.dll), so edit the BSON_OUTPUT_BASENAME and MONGOC_OUTPUT_BASENAME variables accordingly. Another hint: the Delphi installation contains the files in 2 places: bin & Redist\win32, bin64 & Redist\win64 - good luck!
1.17.0-rc0 x86 release drivers https://gofile.io/d/0wJ4R4
Gradle - Build Error
I am new to Netflix eureka and Gradle, I am trying to build eureka client and server which is a gradle project; I checked out the code from "github.com/Netflix/eureka" and tried to build using "./gradlew clean build", but it is failing, below is the error message - FAILURE: Build failed with an exception. What went wrong: A problem occurred configuring root project 'eureka'. Could not resolve all dependencies for configuration ':classpath'. Could not resolve com.netflix.nebula:nebula-bintray-plugin:2.2.0. Required by: :eureka:unspecified > com.netflix.nebula:gradle-netflixoss-project-plugin:2.2.7 Could not HEAD 'http://plugins.gradle.org/m2/com/netflix/nebula/nebula-bintray-plugin/2.2.0/nebula-bintray-plugin-2.2.0.pom'. peer not authenticated .......... Things I tried 1> I added Proxy details in gradlew DEFAULT_JVM_OPTS="-Dhttps.proxyHost=some.com -Dhttps.proxyPort=8080 -Dhttps.proxyUser=xyz -Dhttps.proxyPassword=123 -Dhttp.proxyHost=some.com -Dhttp.proxyPort=8080 -Dhttp.proxyUser=xyz -Dhttp.proxyPassword=123" 2> Downloaded certificate from plugins.gradle.org and added to java keystore; I added the certificate in the following way 2a. Launched firefox and went to plugins.gradle.org 2b. Viewed PEM file and saved it as pluginsgradleorg.cer (selecting All Files) 2c. Added it to Java Keystore # /usr/lib/jvm/java-1.7.0-openjdk-i386/jre/lib/security using "keytool -import -alias gradleplungin -file pluginsgradleorg.cer -keystore cacerts -storepass changeit" 2d. After "Trust this certificate? [no]: yes" it showed "Certificate was added to keystore". After these two fix also the error remains. I am using Ubuntu 14.04.1 LTS, java version "1.7.0_65" Any help in this regard is welcome and thanks in advance. Let me know if more information is needed.