Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Paul M Cohen
    @paul1956
    I has frustrated with note being able to get a code fix VSIX working to fix up code after the port so I am adding an As Clause whenever possible and that has broken some code.
    I have seen that something I usually I just exit and reload and it goes away
    I know 0 about project file so I don't know what your recommendations do or where to put them but I will give them a try.
    Cory Smith
    @DualBrain

    OK... that is completely silly stupid (talking about VS).

    • Open project.
    • Click on first error.
    • CTRL period on error.

    Suggests to add a reference to Microsoft.VisualBasic

    Can't do that (errors out) since it already is referenced. Removed the reference. Repeated process.

    • Removed sign file.
    • Updated setting to reflect no longer signing.

    Compiles and runs in VS2019 Preview.

    Paul M Cohen
    @paul1956
    What I did was create a new project in Preview 6 for each or my Framework project of the same type and then just copy the file structure.
    Cory Smith
    @DualBrain
    image.png
    This is from another project... where I was playing with My, End, etc. Before adding the changes... wasn't working... after... magic.
    Paul M Cohen
    @paul1956
    I sign it because I use it a lot and didn't want to have to keep run under VS.
    Cory Smith
    @DualBrain
    I'm guessing there has to be some way to set things up so that you can sign it locally but not have that as part of what is in the github repo; however, I have no idea how that would be done (or if it is really possible - just guessing that it seems like it would be).
    Paul M Cohen
    @paul1956
    I can add that and see what happens maybe it will fix the few uses of #If
    I have see the issue on GitHub many times and I think they are working on a fix or have one.
    Cory Smith
    @DualBrain
    There's been a lot of progress with the runtime; so I'd definately give it a go. I'd also like to see what your doing with MsgBox; so I'll keep an eye out for when you update the repo. At this point, I now have a working local copy and can begin exploring.
    Paul M Cohen
    @paul1956
    Interesting that you need the "Magic" and I don't. You can select Convert/Folder and point at Roslyn and it will convert the whole thing to VB (it doesn't actually run because of Unsafe and a few other missing features in VB but you get very close) It will create a parallel directory called Roslyn.VB and not touch the original files.
    Paul M Cohen
    @paul1956
    Also I don't know how to create a project, I can convert all the files starting with the project but I don't know how to actually create the project file or find the references that would help with the conversion.
    Cory Smith
    @DualBrain
    For .NET Core 3 (especially during preview), you might want to take a look at dotnet/sdk#2793
    The "magic" is more about certain features not working as expected. End, Chr() as a constant value, My, etc. In other words, if you called the methods directly, everything is fine. It's more about what the compiler does with your code for optimizations and such that fail because there are effectively two different instances of the "runtime" in .NET Core 2+.
    Paul M Cohen
    @paul1956
    Ran into lots of runtime issues but not around the documented issues and more about assumptions I made in Framework that were not actually true.
    Paul M Cohen
    @paul1956
    BYW output folder is _vb not .VB
    Paul M Cohen
    @paul1956
    @DualBrain Adding the extra lines to the project file cause Error BC30002 Type 'Global.Microsoft.VisualBasic.MyServices.Internal.ContextValue' is not defined.
    Adam Speight
    @AdamSpeight2008
    I've published a small vbnet analyser. Number Suffix Analyser and Codefix
    Paul M Cohen
    @paul1956
    I just update my C# converter app to work on .Net Core 3.0 and added a readme. https://github.com/paul1956/CSharpToVB/tree/Core3.0 the converted code requires VS2019.
    Cory Smith
    @DualBrain
    @AdamSpeight2008 The link doesn't appear to work; also, is this available on github?
    Paul M Cohen
    @paul1956
    @DualBrain The reason the app may have crashed when you first installed it was an incorrect assumption about how VS creates folders during install. I can fix it in master if I can figure out how to get a single file from a branch into Master. The file "FileSupport.vb" needs to be updated.
    Adam Speight
    @AdamSpeight2008
    @DualBrain I hadn't made it public.
    Cory Smith
    @DualBrain
    So who else here is utilizing .NET Core 3.x?
    I do want to share how AWESOME!!!!! it is that you can combine three different options to have a small (relatively), "native" single executable that requires no installation. After the first start, having the application start pretty much instantly is also pretty incredible.
    Paul M Cohen
    @paul1956
    @corySmith Yes but something I am missing is how do I find file resources. I have language dictionaries and when I make it a single executable those don’t come along or if they do I don’t know how to read them.
    Aaron Glover
    @aarondglover
    I only recently discovered this fitter for VB.
    Aaron Glover
    @aarondglover
    Let me try that again without the interruption...
    I only just discovered the gitter for VB... Very hard to discover and unfortunately it seems to have lost momentum already 😩
    Paul M Cohen
    @paul1956
    @aarondglover what are you looking for?
    Cory Smith
    @DualBrain
    @aarondglover Welcome! It's not that it's "lost momentum"; we are still working on gaining momentum. ;-) With that said, is there something in particular you are looking for, want to share, etc.? If not, welcome and hope to hear more from you! Also, help spread the word. ;-)
    Cory Smith
    @DualBrain
    I'm so excited to share, with the latest version of the VS2019 preview build that I'm able to build a WinForms application in VB. To do so, I had to start with a default C# application converted to VB by hand; but now that it's converted... it's working (so far) as desired. We aren't 100% of the way there; meaning that there are a lot of VB'isms that aren't available... but I'll be honest... I'll take what I can take. ;-)
    Cory Smith
    @DualBrain
    For discussion: Why do you think it is important for VB to be on .NET Core?
    Paul M Cohen
    @paul1956
    Performance, x-platform, a future and dealing with project files is simple vs. guru only.
    Paul M Cohen
    @paul1956
    What was frustrating about the link was the lack of 2 letters in the entire document. I tripped on the fact that VB sort of works (about as well as C#) so no issue. Looking forward to next update for support of menu which at least shows up. Please provide a way to do new VB project with settings soon. I am still having big issues changing settings in designer. My settings files came with the port from framework and need changes to be edited and I have no examples.
    Cory Smith
    @DualBrain
    There are still many hurdles to getting things working. With that said, I just finished getting a utility project to the same functional stage as the .NET version. There does appear to be a rendering bug though in the "buttons" in a DataGridView - whether it's a bug or not... it DOES NOT look like the .NET counterpart. Additionally, NAudio (not a Microsoft project) "sort of" works with .NET Core - it provides excellent ability to playback audio... as for recording... not available. ????? With that said, I just spent several hours porting 8 classes out of that project (converting them to VB in the process) so that I can mix/match both NAudio in .NET Core (for what does work) with an internal replacement to the missing WaveIn functionality (that does exist - and works - in the .NET version of NAudio). It's a "simple" utility that serves to assist in recording over 7,000 audio recordings for a project that I'm working on.
    Paul M Cohen
    @paul1956
    @DualBrain The default font is different between Framework and Core, it causes all controls in Core that don't specify a font and size to render larger and in my case not fit. I changed the Framework Font to match the Core default font (I agree with the change it looks better), adjusted everything then ported to Core. My VB converter is a very large project and runs significantly faster under core, plus starts faster if I prebuild it (but some features that depend on accessing files break, likely my issue). I wanted to add some UI elements to specify some defaults and preserve compile time Constants plus allow setting of user defined constants but anything that touches Settings.Designer breaks my application at runtime and I get VS errors while modifying settings, also the runtime VB Setting savings on close don't work out of the box. I had to write my own MsgBox which I hosted on NuGet if anyone needs it, with source on GitHub and its close but not perfect due to lack of some functionality on Core.
    I have used TryConvert and it works reasonably well now on VB projects.
    Cory Smith
    @DualBrain
    Yeah, I'm definately experiencing the "rough around the edges" aspects; I just keep reminding myself that VB isn't officially supported at this point. ;-) (That doesn't mean that it doesn't/can't work, just that it's not super easy to make the transition at this early stage.)
    Also, what is the Core default font?
    As for MsgBox, I too was using that... switched to using MessageBox.Show to get around the issue.
    Cory Smith
    @DualBrain
    Answered my own question: Segoe UI 9pt
    It looks like the default behavior of the DataGridView regarding the column headers has changed. Actually setting it in Form.Load produces the same result in both projects: EnableHeadersVisualStyles = False (I want the column headers to be all the same color - not different based on the "column" that is currently selected as I am also doing fullrowselect.)
    Paul M Cohen
    @paul1956
    I use MsgBox way too often to change it. I ported the Open Source version of MsgBox and wrote all the tests to verify compatibility so it is a direct replacement. Even though the tests pass the semantics are not exact because VBHost is not implemented and I can't find its source. I hope someone is collecting all the behavior changes. I could not ever find out the new Font since I have not dealt with it since January.
    You can search for MsgBox on NuGet and you will get mine or the source is available on my GitHub page. I just updated it to 3.1 not that it matters.
    Jay Asbury
    @vbjay
    I stopped using msgbox years ago. Make the switch and it makes things a lot easier.
    Cory Smith
    @DualBrain
    @paul1956 I'll take a look at MsgBox... I value "muscle memory". ;-) Speaking of muscle memory, one of the annoyances with the "core" WinForms experience is that the toolbar item to "view code" is gone. You now have to either right click on the item and choose to view code or edit the form... or use keyboard to do so. However, when using the keyboard... I had it open the winforms designer in the .NET Framework version when highlighting the source file in the "core" version. If I unload the .NET Framework version, it seems to work as expected. So still very rough around the edges. ;-)
    @vbjay I ran an (unofficial) survey regarding the usage of MsgBox; as it turns out more than 2/3rds of the people that took the survey either use it as their primary and/or mixed. In other words, less than 1/3rd stated that they never use it in their WinForms development. So it being removed will potentially impact (good or bad) the majority of those who are developing in VB... that's a pretty big impact. We still haven't recovered from the last time things significantly changed in the spirit of "course correcting" existing VB behaviors back in 2001/2002. I'm not saying changes are bad, just that the problem isn't really all that simple (it's not binary).