C Sharp

1532 readers
2 users here now

A community about the C# programming language

Getting started

Useful resources

IDEs and code editors

Tools

Rules

Related communities

founded 1 year ago
MODERATORS
26
27
28
29
30
31
32
33
34
35
36
37
 
 

Hi all. I've been wanting to get into programming for a while now, specifically C#. However, I am not good at self-study or self-guided learning. Are there any good textbooks/workbooks that you'd recommend to learners of C# as a first programming language? I have some experience with coding, but not much more than simple command-line calculators (due to aforementioned lack of self-teaching skills).

To clarify, I'm looking for a straightforward textbook where I could read a chapter and do the associated "exercises" (for lack of a better word)

38
12
submitted 7 months ago* (last edited 7 months ago) by notnotmike to c/csharp
 
 

My favorite way to develop applications is microservices, or at least smaller services that can separate concerns a little bit. In our current application, there is an API we've created with an OAS document and an auto-generated .NET SDK based on the document. We then have a web console that makes calls to the backend API using the SDK and, ideally, customers would also use the SDK.

So my question to everyone is: what is the best "flow" to develop a NuGet package?

Currently, we have pipelines which publish the NuGet package of the SDK to our internal NuGet repository on every commit within a merge request. We have a manually incrementing semver with an additional build number tacked on (for example 1.2.3+abc123).

Now this works pretty well, but we often run into problems where a tester's NuGet doesn't pull down the latest version based on the build number if it detects it has the proper semver number. For example, if we create 1.2.3+abc456 NuGet won't pull down this version as long as it has the original 1.2.3+abc123 in its .nuget/packages directory. Testers and developers have to manually delete the version from the packages directory and do a fresh restore.

So, is there a better way to do build numbers? Or should I be deleting the NuGet package from the private repository every time (doesn't sound ideal...)?

The other part of this question is what is the best way to develop and test NuGet packages locally?

My current flow is a PowerShell script which will create the new .nupkg file, publish it to a local/filesystem NuGet directory with some random semver number (i.e., 9.9.9), update the .csproj with the version (temporarily), and then do a fresh dotnet restore on the target project. However, this can be cumbersome and feels like something that should be built into the dotnet command. Am I missing something, or is this really the best way to develop locally?

39
40
41
42
43
44
45
46
47
 
 

Twitter Link I personally like Avalonia and I hope this decision is for the best. But at the same time I don't know the benefits or disadvantages of being part of the .Net Foundation.

48
6
submitted 9 months ago by canpolat to c/csharp
49
50
 
 

cross-posted from: https://programming.dev/post/9780587

In MAUI 8.03 we had the Flyout bug where the NavigationPage Title wouldn't update from the first page you had been on. In MAUI 8.06 that bug has been fixed but has introduced a new one on Windows (sigh).

Starting on Page1 I can use the Flyout to switch to Page2. Then, on Windows, if I use Flyout to switch back to already-existing Page1 it crashes with...

System.Runtime.InteropServices.COMException (0x800F1000): No installed components were detected.

Element is already the child of another element

It works on Android, and it works if you are creating a new page each time, it just doesn't work on Windows to switch back to an already-created page (which defeats the whole purpose of having a Flyout menu - switch between 2 pages without making a new one every time).

  1. Does anyone know of a workaround to this? I can't find anything that relates to this in the context of a MAUI Flyout.
  2. Does anyone have a real simple Flyout template that could be used for the repro (to put in the issue I'm gonna need to create). The one I'm working on has a whole bunch of my own libraries in it, so I'm gonna need to tear them all out before I can use it to make a repro (and of course they don't provide a template, and their sample doesn't work due to different bugs - sigh).
view more: ‹ prev next ›