Visual Studio 2019
The Next generation of the tool to use.
-
Dot Net 5 is Here… Check it out.
Wow… some most excellent videos on what is what in .Net 5! Check it out on
[visual-link-preview encoded=”eyJ0eXBlIjoiZXh0ZXJuYWwiLCJwb3N0IjowLCJwb3N0X2xhYmVsIjoiIiwidXJsIjoiaHR0cHM6Ly93d3cuZG90bmV0Y29uZi5uZXQvIiwiaW1hZ2VfaWQiOjAsImltYWdlX3VybCI6IiIsInRpdGxlIjoiLk5FVCBDb25mIDIwMjAiLCJzdW1tYXJ5IjoiSm9pbiB0aGUgLk5FVCBDb25mIDIwMjAgZnJlZSB2aXJ0dWFsIGV2ZW50IE5vdmVtYmVyIDEwLTEyIHRvIGxlYXJuIGFib3V0IHRoZSBuZXdlc3QgZGV2ZWxvcG1lbnRzIGFjcm9zcyB0aGUgLk5FVCBwbGF0Zm9ybSwgb3BlbiBzb3VyY2UsIGFuZCBkZXYgdG9vbHMuIE1hcmsgeW91ciBjYWxlbmRhciEiLCJ0ZW1wbGF0ZSI6InVzZV9kZWZhdWx0X2Zyb21fc2V0dGluZ3MifQ==”]
You can also find these on You Tube… search on .Net 5. The Conf 2020 Days 1-3 will be there…
~ScottGeek.
-
Dot Net Hell by any other name?
Just when I think Dot Net Hell days are coming behind us… I run across the reality of the fact that those that created this in the first place are… well… still doing it?
Take this little gem:
public static async IAsyncEnumerable<string> GetContent(string[] urls) { }
Yes, we now have IAsyncEnumerable… or do we. In my little experiment, I have a .Net 4.8 console app with C#8.0 language stuff turned on. So, I wanted to mess about with the Async Enumerable…. But in my console app that IAsyncEnumerble goes all red line of crap on me.
So what’s the deal? Well it’s simple once you do the digging. .Net 4.8 does not implement .Net Standard 2.1… Yeah, you guessed it… where the Async Enumerable lives!
So yeah, I could use .Net Core 3.0 which works with C# 8.0 and .Net Standard 2.1. Or here’s a thought why not just do a .Net Standard 2.1 console app? Well, the latest version of VS 2019 does not have a .Net Standard 2.1 template listed… Ummm, I’m sensing something missing there.
Welcome to the “New” Hell!
~ScottGeek….
-
Program Challenge using CSV and NetMQ Part 1.
I did a recent program challenge. The requirements were not too complicated.
Basically I was given a simple csv formatted file (csv, of course, being a comma delimited text file). The challenge was to take this csv and parse it into a POCO- POCO being Plain Old Class Object. I’m not sure why we need a acronym for that. POCO is just a data structure in the form of a Class Object. But I digress.
Once the csv is parsed into a Class Object, I was then to make it available in a Request/Response using NetMQ. Now on the surface this might seem a lot to do. But not really. The key, as always, is to break down the problem into the workable bits.
We start with what we know some tasks:
A) Input is a csv and it must be read into a Class Object.
B) Using Request/Response pattern the csv must output using NetMQ (this part relies on getting A done correctly).
C) The Request and Response should be in two separate applications. Task A will need to expose the Class Object as the Response, this is Application 1. Application 2 will be the Request that will output the Class Object.So let’s look at the first part of task A.
Now as much as I like writing yet another file parser- not really- I opted in this case to use one that is already available. It’s call CsvHelper bu Josh Close. It’s available on NuGet of course. The nice thing about this one is it’s simple and it works with POCO’s. You wire it up based on your class object.
Let’s start with my POCO (this was given by looking at the csv that just happens to have the first row with column names):
public class People { public string Id { get; set; } public string FirstName { get; set; } public string LastName { get; set; } public string City { get; set; } public string State { get; set; } public string Country { get; set; } }
Now wiring this into the csv parser is a simple matter of having a text reader and creating a new csvreader with the helper:
static List<People> giveMeData(TextReader textReader) { var csvReader = new CsvReader(textReader); var theData = csvReader.GetRecords<People>(); return (theData.ToList()); }
Here I’ve method that parses the csv and makes a list of People.
And that’s it for the first part of task A. The second part of task A has to do with exposing this List of People through NetMQ.
We will do this in next part of this blog.
-
SSIS (SSDT) and Visual Studio 2019 Oh my
On my way to moving pass… yes! Visual Studio 2012 (VS 2010 Shell!) to VS 2019, I’ve discovered one really annoying thing. SSIS, or as we call now- SSDT projects, really is not mostly ready for Visual Studio 2019?
But there is a preview extension that seems to “mostly” work. Go to the marketplace or in VS Manage Extensions and look for SQL Server Integration Services Projects – not the Reporting Server or Analysis server- those are there too, but the Integration Services.
You add this extension and restart VS…. and you are almost there. 😉 Make sure you actually read the “Known Issues” section on the Overview page page for the extension. Make Special note of Item number 6! (as of the version 3.1). And I will quote:
Variable window and SSIS toolbox may not be displayed properly if .NET 4.8 is installed (Windows 10 1903 installs .NET 4.8 by default). To work around this: 1) open Tools->Options window; 2) navigate to Environment->General; 3) uncheck “Optimize rendering for screens with different pixel densities”; 4) restart VS. For more details of this issue, please see: https://developercommunity.visualstudio.com/content/problem/638322/vs-2019-regression-transparent-toolwindowpane-with.html
Yeaper… all is fine until you start looking or creating a package and discover the black-hole that is the SSIS Toolbox.
Oh My Goodness… so sad… Anyway, the tool box does come back after you change the pixel bah bah and restart VS.
~ScottGeek
-
It’s Always the Little stuff
How many times over the years of using Visual Studio have I’ve added the two lines of code to my console apps (mostly quick simple or testing console apps):
Console.WriteLine("**Press"); Console.ReadLine();
I know it’s been there since sometime in Visual Studio 2017 … Yes the setting that removes the need for those two lines of code…
Tools => Options => Debugging => General… The magic check box labelled:
‘Automatically close the console when debugging stops’
The simple sweetness of that single setting! A Millionth of a Penny for every time I had to go back in put those two lines of code in my console apps…
I humbly submit this as proof positive… that it is the simple things that make the difference! 😎
ScottGeek
-
Azure Logic App Development in Portal vs Visual Studio
A funny thing happens when you move away from doing Prototype Azure Logic App all in the Portal to doing them in Visual Studio (where you are supposed to do Production develop). What’s funny… or is it annoying? Well, development life turns out is not the same.
In the next few days I will be adding a small trip thought some things I notice between the two modes of development.
-
Visual Studio 2019 Launch Event
Looking forward to the newest version:
Visual StudioLaunch eventLocal eventsSponsorsDownload Visual Studio 2019 RC Visual Studio 2019 Launch Event Tuesday April 2, 2019 | 9:00am PT until the Visual Studio 2019 launch Calendar.AddEvent(); Your ideas deserve great tools -
Getting Ready for Visual Studio 2019? We are at Preview 2
Looking at what is coming for Visual Studio 2019… It’s time to start looking and trying….
The official source of product insight from the Visual Studio Engineering Team -
Studio 2019 Preview 2 and Xamarin
Looking over the preview and I see some nice UI tweaks a coming. Check it out:
What’s New in Visual Studio 2019 Preview 2 for Xamarin