Questions tagged [csharpcodeprovider]

.NET class that provides access to the C# compiler for compiling code.

CSharpCodeProvider can be used by applications to compile C# source code from in-memory strings or from files on disk, producing in-memory compiled assemblies or DLL files on disk.

153 questions
0
votes
0 answers

problems sending email in C# MVC by sendinblue

I'm trying to email the sendinblue documentation. The application returns the shipping ID, but it does not arrive in the recipient's inbox.
0
votes
2 answers

Adding attachments using url in mail with C sharp

I can send attachments with URLs, But, looking for support to send a file with an attachment. that too should download from url and attach with mail. MailMessage mail = new MailMessage(); mail.From = new MailAddress("mymail@email.com"); //to mail…
Gokul Raghu
  • 55
  • 2
  • 11
0
votes
1 answer

Unload Assembly or AppDomain after Use (like in Object Browser)

I am trying to load external Assembly to list out all Types, Methods and Properties during run time, just like Object Browser in Visual Studio. My requirement is, I want to Load external Assembly list out its Members in a treeview and Unload the…
0
votes
0 answers

C# Chromedriver options in whole program

Refer to the following code: public partial class Form1 : Form { ChromeOptions options = new ChromeOptions(); //this not working ChromeDriver driver = new ChromeDriver(options); // but this is working ChromeDriver…
0
votes
1 answer

Reference Embedded Resource from Codedom Compiled Exe

I am using CodeDom Compiler and Microsoft.CSharp, I am trying to embed a resource and call it. The reason I don't try to call properties is because I always get an error saying Properties does not exist in the current context. So I want to know if…
0
votes
1 answer

.NET Core 5 RawRabbit Serializer/Dependency Injection Issue

I have microservice based on .NET Core 2.2. I am using RawRabbit (version 2.0.0-beta9) as the service bus. The following packages were installed with it:
0
votes
1 answer

How do I save user settings of combobox in C#?

I can't save User Setting of ComboBox like the TextBox or CheckBox? How to do that?
0
votes
0 answers

GetTypes of a dinamically compiled class could not load assembly

I'm trying to dynamically compile a .cs file. This .cs file has some custom .dll references that I also need to reference dynamically. All works good, but when I try to get all the properties of the .cs file by reflection, I obtain {"Could not load…
Ferra
  • 91
  • 9
0
votes
0 answers

This code block takes too much time to execute C#

OleDbConnection connection; OleDbCommand command; string commandText = "SELECT pali,sinhala FROM [Sheet3$]"; string oledbConnectString = "Provider=Microsoft.ACE.OLEDB.12.0;" + @"Data…
Hashan
  • 178
  • 8
0
votes
1 answer

C# Casting Array and getting information out of an array of objects

I am trying to see if I can cast a menu object as food. I will be putting in the interface as I have been advised. In my buffet code where my Food method is called after adding all the stuff to the menu object, my goal is to pick a random food to…
user14437744
0
votes
2 answers

JSON TO C# Deserializing

Can someone help me deserialize JSON from this api https://www.freeforexapi.com/api/live?pairs=EURUSD,GBPUSD to a C# Object? I have tried many ways and examples I found online, non seems to be working
Ithra
  • 45
  • 6
0
votes
1 answer

CompileAssemblyFromSource returns error "Compiling Expression: cannot open c:\Users\*" for reading 'c:\Users\* is not a valid Win32 resource file

My application generates and compiles code runtime: CompilerParameters m_cp = new CompilerParameters(); m_cp.ReferencedAssemblies.Add("system.dll"); m_cp.GenerateExecutable = false; m_cp.GenerateInMemory = true; m_cp.CompilerOptions =…
Slavik Y
  • 103
  • 1
  • 7
0
votes
1 answer

Csharp : Load Checked Item List based on the Value in Combo Box

I am unable to get the expected results in the below code. I am trying to select one item from the combo box and I need to get the corresponding values for the the selected item in the Checked List Box. Example is the Manager and Reportees, So if I…
Ruchi
  • 146
  • 1
  • 8
0
votes
1 answer

CSharpCodeProvider compiler not recognizing parent class in script

I've set up a simple console application In Program.cs I'm trying to get script to compile while inheriting a base class using Microsoft.CSharp; using System; using System.CodeDom.Compiler; using System.Data; namespace TestingInConsole { …
Monset
  • 648
  • 5
  • 25
0
votes
0 answers

close button not closing the whole application in c# with Paddle SDK

Actually I integrated the paddle sdk with C# with all configuration and everything working fine but the problem is that when anyone click on close control of Form then whole application in Windows Form should be close and here another thing is that…
user7185114