• Register
0 votes
181 views

Problem :

Facing following C# selenium webdriver error while reading Excel Sheet.

missing compiler required member 'microsoft.csharp.runtimebinder.csharpargumentinfo.create'

And the code for reading excel is as below: 

excel.Application x1Appl = new excel.Application(); excel.Workbook x1WorkBook = x1Appl.Workbooks.Open(@"C:\app\o\SearchBy.xlsx"); excel._Worksheet x1WorkSheet = x1WorkBook.Sheets[1];

Kindly let me know is there anything missing?

6 5 3
6,930 points

2 Answers

0 votes

Solution :

Reference assemblies for Office are exposed via the dynamic return type.To compile you need to add a reference to Microsoft.CSharp.dll.

Also please do the right click on references and check the prompted options.

  1. Click on the add reference and a modal with the left menu assemblies, projects, COM and browse will appear.
  2. now click Assemblies
  3. After that please check Microsoft.CSharp and click Ok.
  4. Finally clean and build your project and the error should disappear.

enter image description here

9 7 4
38,600 points
0 votes

Solution:

After upgrading to XF 3.x, any and all uses of dynamic variables results in a build error of 

CS0656: Missing compiler required member 
'Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create'

The cause of the problem:

The reference assemblies for Office are exposed via the dynamic return type. To be able to compile you need to add a reference to Microsoft.CSharp.dll.

To solve this

1. No dynamic type

2. Add a dll, Microsoft.CSharp, or add Microsoft.CSharp with nuget.

Use the dotnet command as follows:

dotnet add package Microsoft.CSharp --version 4.5.0

 

 
10 6 4
31,120 points

Related questions

0 votes
1 answer 7 views
7 views
How do you convert a numerical number to an Excel column name in C# without using automation getting the value directly from Excel.?
asked Aug 28 Aliza313 720 points
0 votes
1 answer 146 views
146 views
Problem : I am having the following error whenever I am trying to open Excel Online in Chrome, But Excel Online in Safari is working fine for me. Does anyone know how to fix this issue? Sign in Something went wrong and we can't sign you in ... . Please try again later. The Microsoft account login server has detected too many repeated authentication attempts. Please wait a moment and try again.
asked Nov 26, 2019 alecxe 7.5k points
0 votes
1 answer 26 views
26 views
Problem: I am beginner to C#. Please find below my code for your help: public class MySoundManager : MonoBehaviour { public List<AudioSource> audioSounds = new List<AudioSource>(); public double minTime = 0.5; public static void playSound(AudioClip sourceSound, Vector3 objectPosition, int ... to create the object of a class or create a methods as the static one but I don&rsquo;t know how to do it.
asked Jul 22 Raphael Pacheco 4.9k points
1 vote
2 answers 46 views
46 views
Problem: I am beginner to C# with Unity engine. I have already started learning C# with Unity engine. I have tried to write the very basic script as shown below for your reference: using UnityEngine; using System.Collections; public class scriptMyBall : MonoBehaviour { / ... but unable to fix the Unity Engine related error. I need Unity Engine&rsquo;s expert who can guide me in fixing above error.
asked May 23 Martin K 6.6k points