Couple o' things. I'm following the MLE instructions by attempting to just open the project code in VS2015. I can't. I can't open it in later versions either. So, I'm following the instructions here: How to run C# Sample Code for MLE - Visa Developer Community
I can use nuget to pull in newtonsoft.json and portable.bouncycastle just fine. But, every time I attempt to pull in jose-jwt, I get this error "Part URI is not valid per rules defined in the Open Packaging Conventions specification." It doesn't matter which version of jose-jwt I use.
What can I do to solve this, please?
Hi @QRTIT, Thank you for reaching out. An agent will get back to you as soon as possible. Until then, if any community member has information that may be helpful, feel free to reply in this thread.
Hey @QRTIT,
This error typically arises when there is an issue with the project file or the environment setup. Here are the steps you can follow to resolve the error "Part URI is not valid per rules defined in the Open Packaging Conventions specification" when trying to pull in the `jose-jwt` package:
1. Check Project File for Invalid Characters:
Ensure that your project file (`.csproj`) does not contain any invalid characters or paths. Sometimes, characters or spaces in the file paths can cause issues.
2. Update NuGet Package Manager:
Make sure you are using the latest version of the NuGet Package Manager. You can update the NuGet Package Manager in Visual Studio by navigating to `Tools` -> `Extensions and Updates` -> `Updates` -> `Visual Studio Gallery`.
3. Manually Edit `.csproj` File:
If the issue persists, you can try manually editing the project file to add the `jose-jwt` package:
```xml
<!-- START -->
<ItemGroup>
<PackageReference Include="jose-jwt" Version="2.5.0" />
</ItemGroup>
<!-- END -->
```
Replace `2.5.0` with the version you need. Save the file and then restore the NuGet packages by right-clicking the solution and selecting `Restore NuGet Packages`.
4. Clear NuGet Cache:
Clearing the NuGet cache can also help resolve issues with package installations. You can clear the cache using the following command in the Package Manager Console:
```powershell
nuget locals all -clear
```
5. Check Visual Studio Version:
Ensure that you are using a supported version of Visual Studio. The sample code provided by Visa Developer might have specific requirements for the Visual Studio version. If possible, try using Visual Studio 2019 or later.
6. Use Command Line for NuGet:
If you are still encountering issues in Visual Studio, try using the command line to install the `jose-jwt` package. Open a command prompt in your project directory and run:
```powershell
dotnet add package jose-jwt --version 2.5.0
```
Replace `2.5.0` with the version you need.
7. Consult Visa Developer Documentation:
Refer to the Visa Developer Community documentation at https://developer.visa.com/pages/community for specific instructions on setting up the environment for MLE (Message Level Encryption) and troubleshooting tips.