• Register
0 votes
292 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

Please log in or register to answer this question.

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 19 views
0 votes
1 answer 39 views
39 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, 2020 Raphael Pacheco 4.9k points
1 vote
2 answers 123 views
123 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, 2020 Martin K 6.6k points
0 votes
1 answer 2 views
2 views
Problem I have to open the file in Excel first before I can read it from my C# program. The excel file is on a share on our network. How can I read the file without having to open it first? Thanks
asked 4 days ago neeraj 9.5k points
0 votes
1 answer 1 view
1 view
Problem: how can solve this question... what activity should you use if you want to add data to an existing .xlsx document
asked Apr 1 Ifra 24.4k points
0 votes
1 answer 5 views
5 views
Problem: How to export gridview to excel in asp net. help me to done this.
asked Mar 19 charles mathews 5.5k points
0 votes
1 answer 2 views
2 views
Problem: I need someone&rsquo;s help to fix it that My carrier is EE (If that helps?)
asked Mar 18 Ifra 24.4k points
0 votes
1 answer 13 views
13 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, 2020 Aliza313 720 points
0 votes
1 answer 2 views
2 views
Problem Why Do I Get an Unlicensed Assemblies Error Message at Run Time When Using Measurement Studio .NET Controls in a Visual C# Project?
asked 2 days ago neeraj 9.5k points
0 votes
1 answer 7 views
7 views
Problem: Can anyone help me ? My compiler is not working for long time and i have tried but fail to fix it?
asked Mar 26 nabin shrestha 2.6k points