Hello, today few hours ago we started getting error
System.MissingMethodException: Method not found: 'Void Aspose.Words.Cloud.Sdk.Model.Requests.ConvertDocumentRequest…ctor(System.IO.Stream, System.String, System.String, System.String, System.String, System.String)
We did not change anyting on our side. Could you, please help us to solve this issue?
Issue Overview
You are receiving a System.MissingMethodException when trying to create a ConvertDocumentRequest:
Method not found: 'Void Aspose.Words.Cloud.Sdk.Model.Requests.
ConvertDocumentRequest..ctor(System.IO.Stream, System.String,
System.String, System.String, System.String, System.String)'
This exception usually means that the runtime version of the Aspose.Words Cloud SDK does not contain a constructor with the signature you are calling. In other words, there is a version mismatch between the compiled code and the library that is being loaded at runtime.
Common Causes
| Cause | What to check |
|---|---|
| Out‑of‑date NuGet package | Verify the version of Aspose.Words.Cloud.Sdk referenced in your project. |
| Mixing different SDK versions | Ensure all Aspose‑Words‑Cloud assemblies (and transitive dependencies) come from the same package version. |
| Breaking changes in a newer SDK | The constructor signature may have been changed/obsolete in a newer release. |
| Old binary still in the output folder | A previous version of the DLL may be left in bin\Debug/bin\Release. |
Quick Fix Steps
-
Upgrade to the latest SDK
dotnet add package Aspose.Words.Cloud.Sdk --version 23.12.0 # replace with the newest versionOr use the NuGet Package Manager UI to update the package.
-
Clean and rebuild
- Delete the
binandobjfolders. - Re‑build the solution to make sure the new DLL is the only one present.
- Delete the
-
Verify the constructor signature
Starting from 23.9 theConvertDocumentRequestconstructors were streamlined. The most common overload is:var request = new ConvertDocumentRequest( document: System.IO.File.OpenRead("input.docx"), format: "pdf", outPath: null, // optional – set to null if you want the result as a stream password: null, // optional – document password folder: null, // optional – cloud folder storage: null); // optional – storage nameDo not pass six string parameters; the Stream‑based overload expects only 6 arguments (Stream + 5 optional strings). If you need to pass a file name instead of a stream, use the overload that takes
string nameas the first argument. -
Check for multiple SDK copies
Search your solution for any strayAspose.Words.Cloud.Sdk.dllfiles that might be copied from another project or a locallibsfolder.
Example – Converting a DOCX to PDF (Cloud SDK)
using Aspose.Words.Cloud.Sdk;
using Aspose.Words.Cloud.Sdk.Model.Requests;
using System.IO;
// 1️⃣ Initialise the API client
var config = new Configuration
{
ClientId = "YOUR_CLIENT_ID",
ClientSecret = "YOUR_CLIENT_SECRET"
};
var wordsApi = new WordsApi(config);
// 2️⃣ Prepare the request (stream‑based)
using (var inputStream = File.OpenRead(@"C:\Docs\sample.docx"))
{
var convertRequest = new ConvertDocumentRequest(
document: inputStream, // Stream containing the source document
format: "pdf", // Desired output format
outPath: null, // Return the result as a stream
password: null,
folder: null,
storage: null);
// 3️⃣ Execute the conversion
var response = wordsApi.ConvertDocument(convertRequest);
// 4️⃣ Save the PDF stream to a file
using (var outputFile = File.Create(@"C:\Docs\sample_converted.pdf"))
{
response.Document.CopyTo(outputFile);
}
}
Note: Replace
YOUR_CLIENT_IDandYOUR_CLIENT_SECRETwith the credentials from your Aspose Cloud dashboard.
Further Diagnostics (if the problem persists)
- Provide the exact SDK version you are referencing (check
packages.configor.csproj). - Show the code line where you instantiate
ConvertDocumentRequest. - Confirm the target framework (e.g., .NET 6, .NET 48). Some older SDK versions were built for .NET Standard 2.0 only.
You can also enable assembly binding logging to verify which DLL is being loaded at runtime.
Useful Links
-
Aspose.Words Cloud SDK – .NET Documentation
https://docs.aspose.cloud/words/net/convert-document -
NuGet package page (latest version)
https://www.nuget.org/packages/Aspose.Words.Cloud.Sdk/ -
Release notes – see API changes per version
https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet/blob/master/CHANGELOG.md
TL;DR
- Update
Aspose.Words.Cloud.Sdkto the latest version. - Clean and rebuild the project.
- Use the correct
ConvertDocumentRequestoverload (Stream + up to 5 optional strings).
If you follow these steps and still encounter the exception, please reply with:
- The exact SDK version you are using.
- The snippet that creates
ConvertDocumentRequest.
We’ll dive deeper from there.
Happy coding! ![]()
Please share the version of the SDK you use and the code that is failing on your side
Hello, Yaroslaw.
Update, we stopped getting this errors after 3 am.
It’s good that the error is gone. If you start getting that error again, please share more information.