vbc

.NET: Resgen Tutorial

↘锁芯ラ 提交于 2020-01-15 11:57:29
问题 First off I have RFM and RFM and I have tried to follow a few sites but I cannot grasp the concept of the Resource Manager. Can someone please explain to me how to generate a resource manager similar to that of the VS IDE. For example if I compile with VBC from the commandline I can see all my resource files. vbc /t:exe myfile.vb /res:res1 /res:res2 Dim a as Assembly = Assembly.GetExecutingAssembly() For Each i as string in a.GetManifestResourceNames() Console.writeline(i) Next i res1 res2 If

Command Line Compiling Settings.settings using VBC

耗尽温柔 提交于 2019-12-24 22:03:59
问题 To an earlier question of mine, invovling VBC and NAnt with WinForms, I have since come up with a better way of stating this. Within vbproj file, you have the following: <ItemGroup> <None Include="My Project\Settings.settings"> <Generator>SettingsSingleFileGenerator</Generator> <CustomToolNamespace>My</CustomToolNamespace> <LastGenOutput>Settings.Designer.vb</LastGenOutput> </None> </ItemGroup> <ItemGroup> <Content Include="My Project\Application.myapp"> <Generator>MyApplicationCodeGenerator<

VBC + NAnt. Error compiling WinForm

∥☆過路亽.° 提交于 2019-12-24 18:54:20
问题 It should first be noted that I am trying to avoid rewriting all my scripts to use msbuild. I have noticed that there are several problems when using NAnt with the VBC task and compiling a WinForms application. The main problem seems to be that VBC can't find Sub Main. This is odd, since from within VS, there is no indication that there is any sort of difference between my call to vbc and msbuild's call to vbc. Does anyone have any insight into a solution to this problem or a way to force the

Escape Catch-22 with extension attributes in .NET 2.0

好久不见. 提交于 2019-12-17 19:38:54
问题 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 ExtensionAttribute : Attribute { } } This the approach suggested by more than one Microsoft employee and was even featured in MSDN magazine. It's widely hailed by many bloggers as having 'no ill effects'. Oh, except it will cause a compiler error

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

时间秒杀一切 提交于 2019-12-12 18:06:14
问题 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 fine in our dev environment with MSBuild 12.0. However, when trying to compile in our Win 2008 R2 SP1 build machine using MSBuild 12.0, we get a fatal error. The command being executed for MSBuild is: "C:\Program Files (x86)\MSBuild\12.0\Bin

VB.net program with no UI

拈花ヽ惹草 提交于 2019-12-12 13:23:06
问题 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 nothing to show? No form, no console? 回答1: I think you need a form of some kind to keep the message loop going. Maybe a NotifyIcon type program. It would keep it away from the task bar and desktop areas. And then customize the NotifyIcon to "Only Show

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

混江龙づ霸主 提交于 2019-12-07 13:51:06
问题 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 ? 回答1: As @ElektroStudios said - the proper way to do this is to use the CodeDom compiler, but this is a bit overkill for something as simple as this. You can sort of cheat and harness the power of a DataColumn Expression So for example: Dim formula = "IIF(Condition = 'Yes', 'Go', 'Stop')" Dim value As String = "Yes" Dim result As String 'add

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

▼魔方 西西 提交于 2019-12-05 19:13:04
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 ? As @ElektroStudios said - the proper way to do this is to use the CodeDom compiler , but this is a bit overkill for something as simple as this. You can sort of cheat and harness the power of a DataColumn Expression So for example: Dim formula = "IIF(Condition = 'Yes', 'Go', 'Stop')" Dim value As String = "Yes" Dim result As String 'add a columns to hold the value Dim colStatus As New DataColumn With colStatus .DataType = System.Type.GetType

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

最后都变了- 提交于 2019-11-30 15:07:41
问题 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 would be required to comply with VB.NET best practices, such as enabling Option Strict. Is there any way where this limitation could either be removed, adjusted, or could warnings be gathered by some other means (such as through a 3rd party code

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

与世无争的帅哥 提交于 2019-11-30 13:41:28
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 would be required to comply with VB.NET best practices, such as enabling Option Strict. Is there any way where this limitation could either be removed, adjusted, or could warnings be gathered by some other means (such as through a 3rd party code-analysis tool)? Mark Hurd As of VB11, in VS2012, vbc no longer has a maximum error limit when called from the