' Licensed to the .NET Foundation under one or more agreements. ' The .NET Foundation licenses this file to you under the MIT license. ' See the LICENSE file in the project root for more information. #If Not netcoreapp5_0 Then Imports System.Collections.ObjectModel Imports System.Reflection Imports CSharpToVBApp.Microsoft.VisualBasic.CompilerServices Namespace Microsoft.VisualBasic.ApplicationServices ''' <summary> ''' A class that contains the information about an Application. This information can be ''' specified using the assembly attributes (contained in AssemblyInfo.vb file in case of ''' a VB project in Visual Studio .NET). ''' </summary> ''' <remarks>This class is based on the FileVersionInfo class of the framework, but ''' reduced to a number of relevant properties.</remarks> Public Class AssemblyInfo ''' <summary> ''' Creates an AssemblyInfo from an assembly ''' </summary> ''' <param name="CurrentAssembly">The assembly for which we want to obtain the information.</param> Public Sub New(ByVal currentAssembly As Assembly) If currentAssembly Is Nothing Then Throw ExceptionUtils.GetArgumentNullException("CurrentAssembly") End If _assembly = currentAssembly End Sub ''' <summary> ''' Gets the description associated with the assembly. ''' </summary> ''' <value>A String containing the AssemblyDescriptionAttribute associated with the assembly.</value> ''' <exception cref="InvalidOperationException">if the AssemblyDescriptionAttribute is not defined.</exception> Public ReadOnly Property Description() As String Get If _description Is Nothing Then Dim Attribute As AssemblyDescriptionAttribute = CType(GetAttribute(GetType(AssemblyDescriptionAttribute)), AssemblyDescriptionAttribute) _description = If(Attribute Is Nothing, "", Attribute.Description) End If Return _description End Get End Property ''' <summary> ''' Gets the company name associated with the assembly. ''' </summary> ''' <value>A String containing the AssemblyCompanyAttribute associated with the assembly.</value> ''' <exception cref="InvalidOperationException">if the AssemblyCompanyAttribute is not defined.</exception> Public ReadOnly Property CompanyName() As String Get If _companyName Is Nothing Then Dim Attribute As AssemblyCompanyAttribute = CType(GetAttribute(GetType(AssemblyCompanyAttribute)), AssemblyCompanyAttribute) _companyName = If(Attribute Is Nothing, "", Attribute.Company) End If Return _companyName End Get End Property ''' <summary> ''' Gets the title associated with the assembly. ''' </summary> ''' <value>A String containing the AssemblyTitleAttribute associated with the assembly.</value> ''' <exception cref="InvalidOperationException">if the AssemblyTitleAttribute is not defined.</exception> Public ReadOnly Property Title() As String Get If _title Is Nothing Then Dim Attribute As AssemblyTitleAttribute = CType(GetAttribute(GetType(AssemblyTitleAttribute)), AssemblyTitleAttribute) _title = If(Attribute Is Nothing, "", Attribute.Title) End If Return _title End Get End Property
@DualBrain my C#ToVB application on GitHub is completely core 3.1 if you look at the source of the WinForms app you will find most of the workarounds are under MyProgram and in Form1 under
#If Not netcoreapp5_0 Then
Another issue is in Frameworks apps some of the stuff built-in to VB depends on Windows so it is easy to write a "portable" Class library that in fact depends on Windows. The split being done will make it explicate when you depend on WinForms.
I agree that the lack of updates on the VB blog are disheartening; however, I also see that it is kind of a double-edged sword. Any comments regarding what is going on in the world of VB are met with a lot of hate and discontent; so, I somewhat understand why people are a bit reserved in offering up content. With that said, that kind of fuels the fire; basically, it's kind of a no-win situation. I know that sounds like I'm saying there isn't any hope; please don't take it that way. What I'm saying this that we need to rethink and come up with a new set of strategies. One of those is what we are using right now. We need to find a way to bring together those that are in favor of championing the merits of VB, those willing to speak publicly that they are all about VB and those willing to help in whatever capacity to ensure that things continue to march forward. In other words, those that aren't ashamed to be VB. We also need to come together as a community to find ways that we can enhance / augment what we do have instead of constantly beating the me too drum with regards about some other language(s). The blog you mention; unfortunately, is a target for much of this self-loathing... I've seen, repeatedly, the comments centered around either questioning the underlying meaning (which must be nefarious) or in the category of “this is great, but” where it becomes about something that isn’t related / doesn’t exist. With all of that out of the way, one thing we can definitely do here is come up with ideas that could potentially be on the blog, possibly write some of this content and submit it to be published. We just have to be prepared for the comments where we develop a bit of a thick-skin allowing us to let the negative wash on by.
One (recent) area that I’d like to see right away on the blog is the inclusion of IntelliCode in VB (currently in the preview), how it works and how it helps us (from a VB dev point of view). I literally was working on a live-coding session in the preview and stumbled across it – didn’t even know anything about it until then. And, yes, I typically review the release notes… and, thinking that I missed something, I went to https://docs.microsoft.com/en-us/visualstudio/releases/2019/release-notes-preview and there is no results for searching for “VB” or “basic”. This suggests that there are things happening, they just aren’t being discussed (see my previous comments). Maybe the blog isn’t the right place; however, I’d love to find a way that we could get some sort of stream of consciousness updates regarding were something being done benefits VB (even if it is in 160 characters or less – I’m not asking for much… a spark of a hint so we can investigate further).
Microsoft.VisualBasicnamespace. More info here. Is anyone else experiencing this?