|
Microsoft samples are basically useless.
I've recently attempted to get some UWP samples working which will no longer build in current versions of Visual Studio -- because they change things so quickly. Studio doesn't even recognize the projects properly and things are missing that the project will not download, etc.
Now I was attempting to examine a DotNet Core sample.
1. They forced me to download over 500Mb to get to the one sample -- because their github repo is only at the very top of all of the samples, instead of allowing me to download the one sample I wanted.
2. Once I downloaded the sample the App (web app won't start) because the DotNet Core stuff has changes so much that the Program.cs is completely different that the app wouldn't run, just gave me a 502.5 error and said the app can't start.
As I was writing up this rant I guessed at what the problem might be...
I checked the CSPROJ file and found:
<PropertyGroup>
<TargetFramework>netcoreapp1.1</TargetFramework>
</PropertyGroup>
<PropertyGroup>
<PackageTargetFallback>$(PackageTargetFallback);portable-net45+win8+wp8+wpa81;</PackageTargetFallback>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore" Version="1.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.2" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.1.1" />
<PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="1.1.0" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="1.0.0" />
</ItemGroup>
I copied my working project's CSPROJ over the top of this one to update to dotnetcore 2.0
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<ApplicationIcon />
<Win32Resource />
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.5" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.0.2" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.2" />
</ItemGroup>
After I did that I went to the command-line under the project and ran :
c:/> dotnet restore
I built and ran and it worked.
sheesh.
The Internet is cluttered up and needs a good spring cleaning.
|
|
|
|
|
Sorry can not confirm that! You found one of thousends which maybe fails. But usually I'm very happy with MSDN examples...
It does not solve my Problem, but it answers my question
modified 19-Jan-21 21:04pm.
|
|
|
|
|
Yes, but the UWP and the dotnet core ones -- the recent ones are problematic.
Studio has changed so quickly some project types have come and gone and the samples haven't been updated.
|
|
|
|
|
Well it appears then that I found all of the other ones...seriously - I'm with the OP here, both the docs and the samples are almost all broken for anything outside of the most basic stuff, cos, y'know, make changes quickly and don't document is how we all work now right....right? Bloody kids lol
C# has already designed away most of the tedium of C++.
|
|
|
|
|
|
Hear hear!
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Pah, that is nothing!
Yesterday I realised I lost the source code for a cool and finished home project I had!
|
|
|
|
|
That is unfortunate. I hate when that happens.
|
|
|
|
|
My latest work is on GitHub and BitBucket, should be fine!
|
|
|
|
|
Super Lloyd wrote: My latest work is on GitHub and BitBucket, should be fine
I've begun putting stuff up on GitHub for the same reason.
|
|
|
|
|
On BitBucket you can have a private repo for free!
|
|
|
|
|
Console.WriteLine("Hello World");
Should be enough sample for anyone.
If you can keep your head while those about you are losing theirs, perhaps you don't understand the situation.
|
|
|
|
|
theoldfool wrote: Console.WriteLine("Hello World");
It's all fluff after that.
|
|
|
|
|
What I can't stand is all the needless boiler plate code just to get to that part.
|
|
|
|
|
THIS is why we can't have nice code!
Honestly, it has been my biggest complaint with MSFT since they went 32bit with C++ and refused to support 16bit causing me to write a thunking layer, and ultimately rewrite the code in ANOTHER LANGUAGE.
This concept that you never rebuild an old application to fix an issue is insane. ZERO backwards compatibility. If gcc was built like this, we would still be using punch cards!
|
|
|
|
|
Thank you sincerely for ranting along with me.
The zero backwards compatibility is crazy. Or, even with so many hoops to jump thru to get to backwards compat, it is crazy.
|
|
|
|
|
You hit a nerve. We are having to maintain machines on VMs nowadays as we wrap up projects. We snapshot them, in case we have to go back and make changes in 5 years...
We are bidding on a project just completed 4 years ago, and the developer won't support it, because MSFT no longer supports his technology choices, and he can't afford to support that environment. They will pay us to rebuild it... Wow...
I came from older technology that ran stable for 30 years. Heck I had an Oracle 6 DB that we have continuously imported straight into a new oracle. Cleanly without having to change our code. All the way to version 12... the biggest impact was that we had to start creating ACLs for security reasons, but all the code still works just fine. Supporting the client was and is quite easy.
==
And the end result is that it aint worth our time to do anything other than build a VM. to the point that I have started doing ALL development on VMs... Pretty soon I may start putting them in the cloud and snapshotting them up there. Use a VPN + RDP to code against it.
I remember when I couldn't afford a COLOR Graphics card for my first PC... Now I throw SSDs out because they are too small... LOL.
|
|
|
|
|
Kirk 10389821 wrote: and the developer won't support it, because MSFT no longer supports his technology choices
Oh, wow. Really terrible.
I am from old school also. Been developing software since Win3.1.
Your explanation reminded me of how long we could run a piece of software vs these days.
Honestly there are Project Templates in Visual Studio 2015 that are unsupported now that VStudio 2017 is out. They targeted Win8 / Win8.1 and now Microsoft acts like Win8 was never a thing.
That is crazy.
|
|
|
|
|
|
Friends of us are on their way to Toronto for a holiday, does not sound like a good begin of their vacation
|
|
|
|
|
Crap, some of the victims were from some IT company
throughout my life, my two greatest assets have been mental stability and being, like, really smart.
modified 20-Oct-19 21:02pm.
|
|
|
|
|
Holy S***. That's horrible.
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
Happened outside my house, 15 minutes before I crossed the street to meet with my accountant. Yonge St. (Toronto's major thoroughfare) between Sheppard and Finch is closed, restaurants and bars shuttered, and the area is swarming with cops. No thru traffic permitted. 15 injured, 10 fatalities.
The suspect is a 25-year old student - This[^] is his LinkedIn profile. Looks like a pretty clean-cut guy. Who knows what lurks beneath the surface...
/ravi
|
|
|
|
|
Either your link is faulty, or his profile has been taken down - probably the later so they can look at his associates.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|