Questions tagged [vbc]

Microsoft's Visual Basic .NET (VB.NET) compiler

Microsoft's Visual Basic .NET (VB.NET) compiler

39 questions
73
votes
3 answers

Is there a way to get the build command line used by Visual Studio?

I want to do a build from the command line, but I'd like to get the exact command line syntax from Visual Studio (2012), so that I don't have to manually figure out all of the flags, imports, and other parameters. Is there a way to get Visual Studio…
Joshua Frank
  • 13,120
  • 11
  • 46
  • 95
9
votes
1 answer

Escape Catch-22 with extension attributes in .NET 2.0

How can a single .NET assembly, targeting 2.0, 3.0, 3.5, 4.0, and 4.5 concurrently, support extension methods for both C# and VB.NET consumers? The standard suggestion is to add this: namespace System.Runtime.CompilerServices { public sealed class…
Lilith River
  • 16,204
  • 2
  • 44
  • 76
8
votes
4 answers

Does anyone know of a way to view all compiler warnings for a VB.NET project?

VB.NET has this rather annoying limitation which caps compiler warnings reported at 100. vbc : warning BC42206: Maximum number of warnings has been exceeded. This makes things rather frustrating when trying to size up the amount of effort that…
Technobabble
  • 996
  • 9
  • 25
7
votes
12 answers

vbc.exe exited with code -2146232797

I am moving a solution with multiple projects to VS 2015. The base project builds just fine in VS 2013. But when I try to build in VS 2015 I get the error below. C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.VisualBasic.Core.targets(56,5):…
Mike Murphy
  • 910
  • 2
  • 11
  • 27
4
votes
1 answer

Dynamic code execution: String -> Runtime code VB.net

I'm trying to execute some code inside a string in runtime. I.E. Dim code As String = "IIf(1 = 2, True, False)" How do i run the code inside code string ?
Developer
  • 41
  • 1
  • 3
3
votes
1 answer

What is the correct way to escape DisabledWarnings when calling MSBuild from the command-line?

I tried escaping the semicolons like this in the…
travis
  • 35,751
  • 21
  • 71
  • 94
3
votes
3 answers

VB.net program with no UI

I'm making a VB.net program via a text file and I'm compiling it using vbc.exe via command line. I'm trying to get just a simple program to run in the background of my computer. Problem is, it displays the annoying console window. How do I get…
Freesnöw
  • 30,619
  • 30
  • 89
  • 138
3
votes
3 answers

Convert a .NET Framework VB project to .NET Core

For some reasons, I have to convert some projects (VB.NET and C#) to .NET Core. I've followed info from various sources, from Convert .Net Core to .Net Framework and the Assembly Portability preventively to be conscious about the work to do. Visual…
michele74c
  • 63
  • 11
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

Strong Naming an assembly using command line compile

I am trying to use NAnt in order to compile and sign an assembly using the vbc compiler. I have a project set up and am able to successfully sign the assembly compiling with VS2010. When I try to sign it using the command line I get this…
BlackICE
  • 8,816
  • 3
  • 53
  • 91
3
votes
1 answer

How to reference COM lib like shdocvw using vbc commandline compiler (no IDE)?

The basis of this question comes from this tutorial on support.microsoft.com: http://support.microsoft.com/kb/176792 To run the following code, it is necessary to add a reference to "Microsoft Internet Controls" (Shdocvw.dll) and "Microsoft HTML…
amonroejj
  • 573
  • 4
  • 16
2
votes
1 answer

VBC Fatal error BC2000: Project already has a reference to assembly

I've researched this issue for a few days with no answer. There are references to the error code but I believe that BC2000 is used for all "compiler initialization" errors, regardless of the underlying issue. I have a VS solution that compiles just…
Diego Luces
  • 141
  • 2
  • 7
2
votes
0 answers

Ambiguity issue with Vb.Net and MySql Connector

I'm running into a weird issue with a VB.Net project using the MySql ADO.Net connector. I have the following code: Dim param As New MySqlParameter("@val29", MySqlDbType.DateTime) And I'm getting the following error message: Ambiguous invocation: …
Icemanind
  • 47,519
  • 50
  • 171
  • 296
2
votes
1 answer

Compile VB.NET project with different #Const by running a single compile.bat file?

I can manually do this (without a single problem) to compile my VB.NET code into my stand-alone WindowsForms executable. But is there a way to do this all from a command-line script? I've checked into Vbc, MsBuild, and DevEnv but they all seem to…
Bakchod Guru
  • 51
  • 1
  • 6
2
votes
0 answers

VBC.exe in Windows 2003 SP1 not able to compile Silverlight 5 code

I have a software product that calls vbc.exe directly to compile Silverlight code. This compilation of Silverlight VB.Net code has been working in Windows 2003/XP through Windows 2012/8 environments, except for one Windows 2003 SP2 (32-bit)…
Piv Chan
  • 21
  • 2
1
2 3