Error In example code

When trying to compile the examples project I get this error

Error 1 No overload for method ‘Save’ takes 4 arguments C:\Projects\Aspose_Words_NET-master\Examples\CSharp\Loading-and-Saving\SendToClientBrowser.cs 23 13 CSharp
Error 5 No overload for method ‘Save’ takes 4 arguments C:\Projects\Aspose_Words_NET-master\Examples\CSharp\Mail-Merge\SimpleMailMerge.cs 35 13 CSharp
Error 7 No overload for method ‘Save’ takes 4 arguments C:\Projects\Aspose_Words_NET-master\Examples\CSharp\Mail-Merge\ExecuteArray.cs 36 13 CSharp

I saw a not about .NET 2.0 and changed the version of the AsposeWords dll to the 2.0 version. Now I get this runtime error:

System.ArgumentNullException was unhandled
_HResult=-2147467261
_message=Value cannot be null.
HResult=-2147467261
IsTransient=false
Message=Value cannot be null.
Parameter name: response
Source=Aspose.Words
ParamName=response
StackTrace:
at Aspose.Words.Document.Save(HttpResponse response, String fileName, ContentDisposition contentDisposition, SaveOptions saveOptions)
at CSharp.Mail_Merge.SimpleMailMerge.Run() in c:\Projects\Aspose_Words_NET-master\Examples\CSharp\Mail-Merge\SimpleMailMerge.cs:line 35
at CSharp.RunExamples.Main() in c:\Projects\Aspose_Words_NET-master\Examples\CSharp\RunExamples.cs:line 280
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: 

My project is a 4.0 project nd that cannot be changed

Re: Error In example code .NET
Related Reply Quote Delete Edit
Favorites Contact
I saw a note about .NET 2.0 and changed the version of the AsposeWords dll to the 2.0 version. Now I get this runtime error:

System.ArgumentNullException was unhandled
_HResult=-2147467261
_message=Value cannot be null.
HResult=-2147467261
IsTransient=false
Message=Value cannot be null.
Parameter name: response
Source=Aspose.Words
ParamName=response
StackTrace:
at Aspose.Words.Document.Save(HttpResponse response, String fileName, ContentDisposition contentDisposition, SaveOptions saveOptions)
at CSharp.Mail_Merge.SimpleMailMerge.Run() in c:\Projects\Aspose_Words_NET-master\Examples\CSharp\Mail-Merge\SimpleMailMerge.cs:line 35
at CSharp.RunExamples.Main() in c:\Projects\Aspose_Words_NET-master\Examples\CSharp\RunExamples.cs:line 280
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:

My project is a 4.0 project nd that cannot be changed I need to finish this proof of concept to get the purchase approved!!!

Hi there,

Thanks for your inquiry.

steveschmalfeld:
When trying to compile the examples project I get this error
Error 1 No overload for method ‘Save’ takes 4 arguments

We suggest you please read the following documentation link for your kind reference.
How to Run the Examples

If overload method of Document.Save is causing a compile time error then you are using the Client Profile DLL. Please use Aspose.Words .NET DLL from net2.0 folder.

*steveschmalfeld:
I saw a not about .NET 2.0 and changed the version of the AsposeWords dll to the 2.0 version. Now I get this runtime error:

System.ArgumentNullException was unhandled*

We suggest you please read following documentation links for your kind reference.
Sending to a Client Browser
Saving to a File

Please replace doc.Save(Response, dataDir, ContentDisposition.Inline, null);
with doc.Save(dataDir + “Out.docx”); to fix this issue. We will update the examples soon.