Organizing your code into src and tests folders on GitHub seems to be getting more and more popular. However, in Visual Studio 2019, it’s not very easy to accomplish. Here is how I do it.
Firstly, let me show you the final outcome:
To get there requires some Command line. First open a Command window and change to your local root folder for your application. In my case it’s C:\Code\NameOfCoolApp.
Once in the root folder of your application, type this in:
dotnet new sln
You should get something similar to The template “Solution File” was created successfully.
Next, we’re going to stub out one of your projects in the solution, so use whatever your naming convention is here. In my case, we’re going to stub out the Domain project. So from that same command window, type:
dotnet new classlib -o src/NameOfCoolApp.Domain
You should then see something like The template “Class Library” was created successfully and ending with Restore succeeded.
Next, I add a stubbed Unit Test:
dotnet new mstest -o tests/Domain.UnitTests
Following the successful message, we’re then going to add the above two items to the Solution by starting with:
dotnet sln add src/NameOfCoolApp.Domain
dotnet sln add tests/Domain.UnitTests
From here you should be able to open the Solution file with VS2019 and be good to move on with the rest of your project within Visual Studio.
Public-apis.io is one of the greatest lists of public APIs that I’ve come across.
I cloned a repository that was targeting .NET Core 3.1. Trying to run it in VS 2019 ended with this error:
The current .NET SDK does not support targeting .NET Core 2.1. Either target .NET Core 2.0 or lower, or use a version of the .NET SDK that supports .NET Core 2.1.
I looked at the properties of the project and I couldn’t see anything higher than .NET Core 2.2 in my Target frameworks list.
I spent more hours that I care to admit to here. I checked that .NET Core 3.1 both x64 and x32 were installed. They were.
I checked that C:\Program Files\dotnet was in my Path. It was.
It turned out that I had a global.json file in my root C:\Code folder, where I have all my local code projects, that was limiting my targeting of any child folders to 2.2.
I removed that global.json file and viola! I can now see .NET Core 3.1.
When doing any kind of validation on your aspx pages, you must go back and set the CausesValidation property of most of your controls to “false”. My RadComboBox wasn’t firing any postbacks until I did that. I also had to set the same property on all my RadTabStrips because by default, they want to validate when you click on other tabs.
My online bud Jeremiah and fellow digger, has landed a paying gig as a Netscape Navigator! Congratulations and kudos to him. Say what you will about getting paid to post but you should already know my feelings about it. I know as a fellow tech geek that Jeremiah writes well and loves technology, especially Linux, and that this paying gig will allow him to feed his addiction to tech. Way to go bro!
When I first read about this in one of my many RSS feeds, I figured it was a hoax or it came from The Onion. I quickly moved on because after all, I have more important stuff to do than laugh…right? It wasn’t until I read a few more similar titles about a merit badge in copyright, that I started thinking, is this for real? It turns out it is!
Does the movie industry really think that piracy is what’s keeping us from going to the movies? Let’s see. The last time I went to an actual movie theater (about 3 years ago), it was approximately $10 a person just to get in. This didn’t include the tub o’ butter popcorn that will stop your heart and the gallon size soda with enough sugar in it to fuel a nuclear reactor. What did I get for my money? A floor sticky enough to keep me on it if they turned the movie theater upside down, a chair that looked like it used to belong to Archie Bunker, a screen that was slightly out of focus, a screen that had black marks in it that distracted from the movie, neighbors that insisted on talking all through the movie, a cellphone that apparently didn’t have an off button, a persistant cougher (I can empathize with this since I’m actually in the throes of a coughing spell), and no guarantee that I would actually like the movie. (note: I was actually going to go on, but I remember learning about run-on sentences in high school)…
All this and movie *star* salaries continue to rise. I’ve been on this older movie kick, Casablanca, The Maltese Falcon, Citizen Cane. You know, when it was about the acting. It was those actors that deserved the mutlibazillion dollar salaries….Orson Welles, Bogart, Bacall.
Come to think of it, except for screen size, I can’t think of a compelling reason to actually go to a movie theater and it’s not because I pirate movies either. I actually can’t think of any movies that I would take the time to pirate because most aren’t really all that good….
It turns out a fellow blogger and computer book author needs some help. Her California license plate was stolen off her car in Healdsburg. If anyone has seen it:
let me know or if you have it, you can mail it back to her….no questions asked.
Granted all of the mp3’s will have an extension of mp3x and you’ll need their proprietary player with an always-on internet connection to play them, but damned if this isn’t good news…
read more | digg story