Questions tagged [vbcodeprovider]

A .NET Framework Class that provides access to instances of the Visual Basic code generator and code compiler.

The VBCodeProvider class in .NET can be used to compile Visual Basic.Net source code from an in-memory string or a file on disk into a .NET executable assembly in memory or in a DLL file on disk.

20 questions
25
votes
1 answer

Instruct CodeDomProvider compiler to show errors and warning messages in English language?

I'm using the System.CodeDom features to compile code at run time and I wonder if I could specify a compiler parameter or other workaround to display the compiler errors in English language instead of using the system's default language. However, in…
ElektroStudios
  • 19,105
  • 33
  • 200
  • 417
3
votes
0 answers

Why does Imports System not give access to Windows namespace in vbc.exe?

I manage an application that allows the users to automate tasks by writing their own VB code. The user code is compiled using the VBCodeProvider and invoked against the running instance of the application. We've been doing this for a few years now…
3
votes
1 answer

Is there any code provider for C++ in Visual Studio 2012

I used below codes as code provider for C# and VB.net var codeProvider = new VBCodeProvider(); var codeProvider = new CSharpCodeProvider(); Like that, Is there any code provider available for C++ in visual studio 2012
Balaji Kondalrayal
  • 1,743
  • 3
  • 19
  • 38
3
votes
1 answer

'TestString' is not declared. It may be inaccessible due to its protection level. (BC30451)

I am trying out some on the fly code compilation using the VBCodeProvider class. What I want to be able to do is modify a public variable in my assembly in the code. I have a Public TestString As String = "" in my application. This is the code I am…
Matt Wilko
  • 26,994
  • 10
  • 93
  • 143
2
votes
1 answer

react-native app error Unknown option: .name (?)

I recently installed files that caused a previous error these two files were not found so I installed them "metro-react-native-babel-preset": "^0.64.0", "react-native-dotenv": "^2.4.3", Now I get this error: Any feedback to repair and be able to…
martin
  • 45
  • 6
1
vote
0 answers

VB Code - Multiple Remote SSH connections to same server

Is it possible to connect several users via openSSH to the same VM so that everyone can access VB Code on the same VM machine and run scripts? thrue the local VB Code If so, how do I do this?
1
vote
2 answers

How can I compile dynamic code at runtime in the current assembly?

I use VBCodeProvider to compile code, but it generates a new assembly, and also I need to add all references to assemblies I need to use. Is there a way to compile code in the current assembly?
Aram Gevorgyan
  • 2,175
  • 7
  • 37
  • 57
1
vote
1 answer

How can I get ByRef Arguments to work in a dynamically created assembly with Method.Invoke

I have a text file that I am compiling into an assembly use the VBCodeProvider class The file looks like this: Imports System Imports System.Data Imports System.Windows.Forms Class Script Public Sub AfterClockIn(ByVal clockNo As Integer, ByRef…
Matt Wilko
  • 26,994
  • 10
  • 93
  • 143
1
vote
1 answer

How to create optional arguments in Visual Basic generated through CodeDom?

This is a cousin of the question "Can CodeDom create optional arguments when generating a c# method?" And I tried the answer given there. Still, when I attempt to compile, I get the following error: error BC30455: Argument not specified for…
devrelm
  • 326
  • 1
  • 13
1
vote
1 answer

How to enable implicit line continuation in VBCodeProvider?

The following VB.NET code works when compiled from the Visual Studio: Sub Main() Dim source As Dictionary(Of String, Integer) = New Dictionary(Of String, Integer) Dim result = From i In source Where…
Regent
  • 5,502
  • 3
  • 33
  • 59
1
vote
1 answer

Need Help Compiling DLL for Silverlight 3.0 With VBCodeProvider

I am having difficulty dynamically compiling a DLL for use with Silverlight 3.0. My goal is to take some rules provided by my users and compile them into a DLL for custom editing purposes. I created a Silverlight class library project in Visual…
jlo
  • 1,121
  • 1
  • 11
  • 16
1
vote
1 answer

How to convert string to code in vb.net and to view static or public variables of main project

Possible Duplicate: How to expose current assembly to CodeProvider I wrote a code which converts a string from a textbox in vb.net like in this exemple: how to convert string to code in c# But In this class I can't call any static variables and…
wertyk
  • 410
  • 10
  • 30
1
vote
1 answer

VBCodeProvider not honoring OptionInfer in providerOptions?

I'm trying to dynamically compile some VB code in my C# project and I'm running into an issue with the VBCodeProvider. It doesn't seem to be honoring the OptionInfer flag that I'm putting in the providerOptions Dictionary. My code looks like…
micahtan
  • 18,530
  • 1
  • 38
  • 33
0
votes
0 answers

Excel error 1004 "Unable to get SumIfs property of WorksheetFunction class" appearing inconsistently

Option Explicit Sub UpdateWeeklySummary() Dim dailyCountSheet As Worksheet Dim weeklySummarySheet As Worksheet Dim processRange As Range Dim processCell As Range Dim weekRange As Range Dim weekCell As Range Dim currentWeek As Integer Dim weeklyCount…
0
votes
0 answers

VBCodeProvider - Securing execution of user-generated code

I'm working on an application that supports running code written by users using VBCodeProvider. I would like to limit the things they can do, for example: Block reflection Block access to the file system from the script level (referenced assemblies…
DrJekyll
  • 125
  • 1
  • 8
1
2