|
The first versions of 2022 didn't support net8, but I assume your colleague has a version that does. Unlike your colleague I can select net8, everything in the solution is net8.
TGIF
There are no solutions, only trade-offs. - Thomas Sowell
A day can really slip by when you're deliberately avoiding what you're supposed to do. - Calvin (Bill Watterson, Calvin & Hobbes)
|
|
|
|
|
I'm sure he has the newest version of VS, he's always (too) keen to update to a new version. I don't know where exactly the problem lies, but I suspect it's in one or more of the 3rd party libraries he uses for video.
|
|
|
|
|
Hmm, try deleting the bin and obj folders, then rebuilding. Fixes a lot of 'incompatibility' issues that occur when switching frameworks.
|
|
|
|
|
Thanks, unfortunately that didn't work this time.
Clicking into the error brings up a window that looks like a build configuration file for Microsoft.Azure.Functions.Worker.Sdk.targets and points me to this line inside a <Target Name="_FunctionsPreBuild" BeforeTargets="Build"> block:
<Error Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp' Or ('$(TargetFrameworkVersion)' != 'v6.0' And '$(TargetFrameworkVersion)' != 'v5.0')" Text="TargetFramework is invalid. Change the TargetFramework to net5.0 or net6.0" /> I can find no direct reference to this configuration, where it comes from or how to change it. Things like this shouldn't be hard.
There are no solutions, only trade-offs. - Thomas Sowell
A day can really slip by when you're deliberately avoiding what you're supposed to do. - Calvin (Bill Watterson, Calvin & Hobbes)
|
|
|
|
|
Edit: I accepted solution 5 just because it was the most detailed. Thank you all who answered and gave me some ideas for moving forward.
I didn't want to get hassled for posting this question in the lounge:
Winforms is dying and using XAML and the designers for it is like pulling teeth. What now?[^]
So I made a programming question.
They told me I should have put it in the lounge.
New Rule Proposal: Recognize that you, as an average commenter, have no better grasp on where to post things than anyone else, and just accept where the questions lie if there is any room for interpretation. Is that too difficult? Really? It is? Do I need to hand out hobbies?
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
modified 8-Feb-24 15:09pm.
|
|
|
|
|
To answer your question, if I were still using XAML, I would use Blend with it. It takes a little bit of getting used to, but it's far superior to working with the layout designers in VS.
|
|
|
|
|
Thanks! That's that "Blend for Visual Studio" I've heard referenced in the docs eh?
Is it already installed with visual studio?
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
That's the one, and it is installed with VS.
|
|
|
|
|
Pete O'Hanlon wrote: if I were still using XAML, I would use Blend with it.
Okay wait, you've intrigued me.
What are you doing *now?* for UI stuff?
I am not invested in UWP or any of that. I'd be fine with MAUI or whatever.
As long as it's modern. Cross platform a huge bonus. Particularly if it will run on phones and use C#.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
So, when I do have to write a pure desktop app, I use AvaloniaUI. It's waaay better than Maui. Most of the time, now, I'm using Blazor. The ability to run both in the browser, and as a PWA for those who want to run it on the desktop.
|
|
|
|
|
It didn't occur to me to use Blazor on the desktop. I've heard of AvaloniaUI before, but only just. I'll give it a look.
Not sure Blazor fits the bill for me, as most of my applications are either utilities, or small companion apps for IoT devices, so there are some considerations. Like for example, In EspMon I had to embed a manifest to make it require elevated privileges on launch so i could collect hardware statistics from the PC. Blazor *might* not be appropriate for such a situation.
I'm thinking you answered with a combination of things for a reason, so I'll give each of these things a look.
You just threw me a lifeline. I was so at a loss as to where to move on this, and the longer I waited to move away from .NET Framework, the more behind I was going to be by the time I finally took the plunge.
You've been a great help. Thank you again.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
I absolutely agree with you: I first discovered this when I considered moving from WinForms to WPF - but the designer tools in VS were so piss-poor that I just gave up and stuck to WinForms.
Hand coding XAML after the drag'n'drop excellence I was used to? Why? It just made WPF feel "unfinished" and turned me right off the whole idea. It's the 21st Century: we shouldn't have to put up with crap like that.*
* Reposted here so I can get ranted at in two places as well ...
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
OriginalGriff wrote: WinForms to WPF
Most of the tools I write must run in a pure Win32/WinPE environment (I can't even rely on .NET). The UI design tools available for this are bad to non-existent, by today's standards.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
Daniel Pfeffer wrote: The UI design tools available for this are bad to non-existent
I feel your pain. I ended up writing some FL Studio plugins where I was in a similar boat and ended up being sort of corralled into using MFC. I wanted to cry.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
This is just pretty sad. MFC actually just sits in the corner and gets the job done. It's not flashy. But at the time, it was the only thing Microsoft had above win32 (and coding at that level for a UI was just stupid). I was coming from XWindows/Motif, etc and those were finished UI libraries, UIL (father to XAML).
Then someone let the marketing people and project managers and senior people at MS have a free supply of heroin, meth, crack, cocaine, etc. and the entire elephanting organization just went off the rails. I've looked at Winforms (I think maybe a path from mfc) but Wpf and xaml just no. It's simply incomplete, too complicated and unfinished. I lived in the CE world as was about to migrate to .net - because universal and all that - then MS tossed us under the bus. They've never recovered. I would challenge any MS senior person to put together a 1 page strategy to explain what MS intends to do in the UI space.
This is why the rise of the html interface exists.
Charlie Gilley
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Has never been more appropriate.
|
|
|
|
|
Wasn't really an appropriate laughcry emoji to respond with.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
charlieg wrote: then MS tossed us under the bus. They've never recovered. I would challenge any MS senior person to put together a 1 page strategy to explain what MS intends to do in the UI space.
This is why the rise of the html interface exists.
So much this. I feel the same way. MS lost interest in WinForms, but it's still, to this day, the quickest way to get things done, IMO. And they've never offered a decent, just-as-simple, alternative ever since. If not WinForms, what UI library is one supposed to rely on in 2024? I still don't feel confident any of their current offerings won't get abandoned and replaced with something completely different yet again, a year from now. As a desktop developer, I very much feel ignored by MS.
I get what you're saying about the rise of the HTML interface, but if you need to interact with Win32 or "the system" as a whole in any way, shape or form (which I do rather extensively), there's nothing in there to help you out...in fact, you're intentionally getting blocked every step of the way, 'cuz hey, browser means device independence...
|
|
|
|
|
I have two environments I need to support. The primary one is on the embedded device side. My customer will never go back to anything Microsoft. There are crumbs for legacy products. All it takes is for one big customer to call a VP, and ... you know the drill.
I also have to support utilities that support stuff... I see Winforms as useful, but my goto is a lean Mfc. because it works.
I just wish Microsoft would get "omfg customers need us to be predictable" in their soul.
Charlie Gilley
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Has never been more appropriate.
|
|
|
|
|
Daniel Pfeffer wrote: Most of the tools I write must run in a pure Win32/WinPE environment (I can't even rely on .NET). The UI design tools available for this are bad to non-existent, by today's standards.
You just made me realize I hadn't even thought about this for a very, very long time. Win32 is still a thing. Last time I wrote against it directly, there pretty much weren't any tools to build UIs interactively (at least not from MS); the closest, from MS, might have been the MFC designer, but then...MFC.
So, writing straight to Win32, in 2024, still doesn't have any viable options, huh? I guess that's an indicator it's really not the way to go...
|
|
|
|
|
I guess my experience of the appallingly-bad HTML produced by the WebForms designer must make me strange: I actually prefer hand-crafting XAML to using the WPF or WinForms designers.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
From a workflow perspective, i find i'm fastest when I can use the designer to rough out everything in broad strokes, and then switch to "code" to fine tune it.
That to me, is RADable workflow.
Otherwise things are just too cumbersome. Maybe I got spoiled by WinForms (and VB6 before it i guess) but I kind of expect that I can use a designer to come up with a reasonable mock of what I intend to develop, and if it can't do that, then the job is not done. I'm looking at you, Microsoft.
I just need a way to move forward that isn't terrible. Whether it's UWP, MAUI, AvaloniaUI, or whatever.
If it involves hand crafting overly annotated XML or otherwise too much fiddling I'm moving on to the next option, until I run out of options, at which point I'll pick the one I hate the least.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
I must be strange, too. I like hand-crafting the XAML. I feel I get better control of layout that way than with designers.
|
|
|
|
|
I preferred the roundtrippable code editing of winforms days.
I'd use drag and drop to get all of the basics in place, and then drop to code to hand tweak and fine tune everything.
I don't like the xaml because it's more verbose, and Microsoft puts a lot more eyes and hands on their "code-time" tools and features than their "xml time" tools and features, meaning i can drop whole lines of code often just by smashing tab a few times.
All in all it's just faster, and I get as much control as I would using other mechanisms. Exactly as automatic as I want it at any given point, but at no point is it REQURIED to be.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
Windows Forms (drag and drop) and XAML require different mental models. I felt Windows Forms "was it" until I needed "more". The WPF (XAML) "pain" went away with use and it became "perfect". UWP is more, and has even more to teach. Which is an attraction in itself. 60 FPS animations when you don't want to commit to Unity or Unreal Engine. And that's in XAML; or hand coded (me).
I can XAML faster than I can drag or drop ... want 24 pixel padding all around? Padding="24" (on the parent) ... no dragging or positioning of child elements. Change your mind? I don't have to "see it" to see it.
One can flip between XAML or "design view" if you need to see what you're crafting, but I rarely do. Usually only to see if any images I'm using are being "picked" up. And then, there's the (live) "visual tree inspector", etc.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
If you don't know where to post it, post it in the lounge. Someone will reply and point you towards the right section of the forum
|
|
|
|