Showing posts with label dotnet. Show all posts
Showing posts with label dotnet. Show all posts

Reading Notes #670

Dives into the intersection of AI and development, exploring tools like GitHub Copilot’s AGENTS.md and the MCP Toolkit for automations, alongside .NET 10.0’s performance gains and OpenAI’s recent updates. Whether you’re optimizing serverless APIs with AWS Lambda or mastering the Web Animation API, this post highlights breakthroughs in code efficiency, model customization, and cloud innovation. Dive into these thought-provoking reads to stay ahead in a rapidly changing world.




Have a nice week!

Suggestion of the week

Cloud

AI

Programming

  • How .NET 10.0 boosted JSON Schema performance by 18% (Matthew Adams) - Another example of the gain in performance just by upgrading to the latest .NET version.

  • The Web Animation API (Christian Nwamba) - It's the first time I've read about this web animation API, pretty cool even if we need to be careful, I think that precision offers could be very interesting for some animations.


Sharing my Reading Notes is a habit I started a long time ago, where I share a list of all the articles, blog posts, and books that catch my interest during the week.

If you have interesting content, share it!

~frank



Reading Notes #669

This week explores the synergy between Dapr and WebAssembly for modern microservices, highlights the transformative potential of Wasm 3.0 for .NET developers, and delves into best practices for structuring Rust web services. In the AI realm, we examine the emergence of developer-friendly AI frameworks like Microsoft’s Agent Framework and Google’s Jules Tools, which bridge AI capabilities directly into terminals and workflows. Additionally, we examine AI obfuscation techniques and their implications, alongside updates on Perplexity’s free Comet AI browser and its new background assistant. Whether you’re building scalable systems, optimizing code, or integrating cutting-edge AI tools, this post offers a snapshot of trends shaping tech today.


Cloud

Programming

AI

Sharing my Reading Notes is a habit I started a long time ago, where I share a list of all the articles, blog posts, and books that catch my interest during the week.

If you have interesting content, share it!

~frank

Reading Notes #668

This week covers Microsoft’s open-source Agent Framework for agentic AI, prompt-injection risks and mitigations, and the causes of language model hallucinations. It also highlights NuGet package security updates, Azure SQL Data API Builder improvements, Reka’s new Parallel Thinking feature, and the latest in AI benchmarking.


Cloud

Programming

AI

Databases

Miscellaneous


Sharing my Reading Notes is a habit I started a long time ago, where I share a list of all the articles, blog posts, and books that catch my interest during the week.

If you have interesting content, share it!

~frank

Reading Notes #667

This week post explores the intersection of AI, cloud, and DevOps, featuring updates on Microsoft’s Logic Apps integration, practical .NET tools for system automation, and strategies to enhance documentation for AI-driven workflows. Whether you’re refining enterprise security practices with NuGet’s Trusted Publishing or diving into the ethical nuances of AI through vector databases, this post offers a blend of technical deep dives and thought-provoking discussions. Don’t miss the podcast highlights, from DevOps innovation to the business impact of employee well-being, perfect for developers, architects, and curious minds alike. Let’s connect the dots in a world where code, creativity, and collaboration drive progress.






Programming

AI

DevOps

Podcasts

Miscellaneous

Sharing my Reading Notes is a habit I started a long time ago, where I share a list of all the articles, blog posts, and books that catch my interest during the week.

If you have interesting content, share it!

~frank

Reading Notes #666

Welcome to another edition of my reading notes! This week I've gathered some interesting finds across programming, AI, and general tech topics. From exciting Cake updates to practical AI implementation advice, here are the articles that caught my attention recently.



Programming

  • Cake.Sdk 5.0.25257.82-beta released (devlead) - I'm happy to see the new release of this cake version coming to a recent .NET version. I have one of my projects using cake, and I was waiting for it; this is amazing

AI

Miscellaneous


Sharing my Reading Notes is a habit I started a long time ago, where I share a list of all the articles, blog posts, and books that catch my interest during the week.

If you have interesting content, share it!

~frank



Reading Notes #665

In this edition, we explore modern development's evolving landscape. From Microsoft's .NET Aspire simplifying distributed applications to AI security considerations, Git workflow optimizations, and backlog management strategies, there's something here to spark your next breakthrough.


The tech world never sleeps, and neither does innovation. Let's explore what caught my attention this week and might just spark your next big idea or solve that problem you've been wrestling with.

Programming


AI


Open Source


Podcast


~frank

Reading Notes #664

Welcome to another edition of my weekly reading notes! This week's collection brings together some fascinating developments across the tech landscape. From the intricacies of building cross-platform .NET tools to impressive AI breakthroughs like Warp's stellar performance on SWE-bench, there's plenty to explore. I've also discovered some thought-provoking content about leadership, product management, and the art of meaningful communication. Whether you're interested in the latest AI tools, looking for career insights, or simply want to stay current with industry trends, this week's selection has something valuable for every developer and tech professional.



Programming

  • Using and authoring .NET tools (Andrew Lock) - Interesting post that shares the behind-the-scenes when you're building a tool for multiple targets and the challenge that it represents. Those also share the new ways of .NET 10

AI

Podcasts

Miscellaneous

Sharing my Reading Notes is a habit I started a long time ago, where I share a list of all the articles, blog posts, and books that catch my interest during the week.

If you have interesting content, share it!

~frank

Using AI with .NET 10 Scripts: What Worked, What Didn’t, and Lessons Learned

I wanted to kick the tires on the upcoming .NET 10 C# script experience and see how far I could get calling Reka’s Research LLM from a single file, no project scaffolding, no .csproj. This isn’t a benchmark; it’s a practical tour to compare ergonomics, setup, and the little gotchas you hit along the way. I’ll share what worked, what didn’t, and a few notes you might find useful if you try the same.

All the sample code (and a bit more) is here: reka-ai/api-examples-dotnet · csharp10-script. The scripts run a small “top 3 restaurants” prompt so you can validate everything quickly.

We’ll make the same request in three ways:

  1. OpenAI SDK
  2. Microsoft.Extensions.AI for OpenAI
  3. Raw HttpClient

What you need

The C# "script" feature used below ships with the upcoming .NET 10 and is currently available in preview. If you prefer not to install a preview SDK, you can run everything inside the provided Dev Container or on GitHub Codespaces. I include a .devcontainer folder with everything set up in the repo.

Set up your API key

We are talking about APIs here, so of course, you need an API key. The good news is that it's free to sign up with Reka and get one! It's a 2-click process, more details in the repo. The API key is then stored in a .env file, and each script loads environment variables using DotNetEnv.Env.Load(), so your key is picked up automatically. I went this way instead of using dotnet user-secrets because I thought it would be the way it would be done in a CI/CD pipeline or a quick script.

Run the demos

From the csharp10-script folder, run any of these scripts. Each line is an alternative

dotnet run 1-try-reka-openai.cs
dotnet run 2-try-reka-ms-ext.cs
dotnet run 3-try-reka-http.cs

You should see a short list of restaurant suggestions.

Propmt Result: 3 restaurants


OpenAI SDK with a custom endpoint

Reka's API is using the OpenAI format; therefore, I thought of using the NuGet package OpenAI. To reference a package in a script, you use the #:package [package name]@[package version] directive at the top of the file. Here is an example:

#:package OpenAI@2.3.0

// ...

var baseUrl = "http://api.reka.ai/v1";

var openAiClient = new OpenAIClient(new ApiKeyCredential(REKA_API_KEY), new OpenAIClientOptions
{
    Endpoint = new Uri(baseUrl)
});

var client = openAiClient.GetChatClient("reka-flash-research");

string prompt = "Give me 3 nice, not crazy expensive, restaurants for a romantic dinner in Montreal";

var completion = await client.CompleteChatAsync(
    new List<ChatMessage>
    {
        new UserChatMessage(prompt)
    }
);

var generatedText = completion.Value.Content[0].Text;

Console.WriteLine($" Result: \n{generatedText}");

The rest of the code is more straightforward. You create a chat client, specify the Reka API URL, select the model, and then you send a prompt. And it works just as expected. However, not everything was perfect, but before I share more about that part, let's talk about Microsoft.Extensions.AI.

Microsoft Extensions AI for OpenAI

Another common way to use LLM in .NET is to use one ot the Microsoft.Extensions.AI NuGet package. In our case Microsoft.Extensions.AI.OpenAI was used.

#:package Microsoft.Extensions.AI.OpenAI@9.8.0-preview.1.25412.6

// ....

var baseUrl = "http://api.reka.ai/v1";

IChatClient client = new ChatClient("reka-flash-research", new ApiKeyCredential(REKA_API_KEY), new OpenAIClientOptions
{
    Endpoint = new Uri(baseUrl)
}).AsIChatClient();

string prompt = "Give me 3 nice, not crazy expensive, restaurants for a romantic dinner in Montreal";

Console.WriteLine(await client.GetResponseAsync(prompt));

As you can see, the code is very similar. Create a chat client, set the URL, the model, and add your prompt, and it works just as well.

That's two ways to use Reka API with different SDKs, but maybe you would prefer to go "SDKless", let's see how to do that.

Raw HttpClient calling the REST API

Without any SDK to help, there is a bit more line of code to write, but it's still pretty straightforward. Let's see the code:

using var httpClient = new HttpClient();

var baseUrl = "http://api.reka.ai/v1/chat/completions";

var requestPayload = new
{
    model = "reka-flash-research",
    messages = new[]
            {
                new
                {
                    role = "user",
                    content = "Give me 3 nice, not crazy expensive, restaurants for a romantic dinner in New York city"
                }
            }
};

using var request = new HttpRequestMessage(HttpMethod.Post, baseUrl);
request.Headers.Add("Authorization", $"Bearer {REKA_API_KEY}");
request.Content = new StringContent(jsonPayload, Encoding.UTF8, "application/json");

var response = await httpClient.SendAsync(request);

var responseContent = await response.Content.ReadAsStringAsync();

var jsonDocument = JsonDocument.Parse(responseContent);

var contentString = jsonDocument.RootElement
    .GetProperty("choices")[0]
    .GetProperty("message")
    .GetProperty("content")
    .GetString();

Console.WriteLine(contentString);

So you create an HttpClient, prepare a request with the right headers and payload, send it, get the response, and parse the JSON to extract the text. In this case, you have to know the JSON structure of the response, but it follows the OpenAI format.

What did I learn from this experiment?

I used VS Code while trying the script functionality. One thing that surprised me was that I didn't get any IntelliSense or autocompletion. I try to disable the DevKit extension and change the setting for OmniSharp, but no luck. My guess is that because it's in preview, and it will work just fine in November 2025 when .NET 10 will be released.

In this light environment, I encountered some issues where, for some reason, I couldn't use an https endpoint, so I had to use http. In the raw httpClient script, I had some errors with the Reflection that wasn't available. It could be related to the preview or something else, I didn't investigate further.

For the most part, everything worked as expected. You can use C# code to quickly execute some tasks without any project scaffolding. It's a great way to try out the Reka API and see how it works.

What's Next?

While writing those scripts, I encountered multiple issues that aren't related to .NET but more about the SDKs when trying to do more advanced functionalities like optimization of the query and formatting the response output. Since it goes beyond the scope of this post, I will share my findings in a follow-up post. Stay tuned!

Video version

Here is a video version of this post


Learn more

Reading Notes #663

Here are my reading notes for the week: a mix of AI research and evaluation, .NET and Linux troubleshooting, testing framework changes, and JavaScript/TypeScript perspectives, plus a few podcast episodes on C#, work design, and software modernization that I found worthwhile. 


AI

Programming

Podcasts


Sharing my Reading Notes is a habit I started a long time ago, where I share a list of all the articles, blog posts, and books that catch my interest during the week.

If you have interesting content, share it!

~frank

Reading Notes #661

This week post collects concise links and takeaways across .NET, AI, Docker, open source security, DevOps, and broader developer topics. From the .NET Conf call for content and Copilot prompts to Docker MCP tooling, container debugging tips, running .NET as WASM, and a fresh look at the 10x engineer idea.


Suggestion of the week

AI

Open Source

DevOps

Programming

Miscellaneous


Sharing my Reading Notes is a habit I started a long time ago, where I share a list of all the articles, blog posts, and books that catch my interest during the week.

If you have interesting content, share it!

~frank

Reading Notes #660

This week’s notes cover GenAI vs agentic AI, fresh Docker and Aspire news, how to run WordPress in containers, and building apps with React and .NET. Plus a few podcasts worth a listen.


Enjoy!

AI

Open Source

  • Does it Make Sense to Run WordPress in Docker? (Lukas Mauser) - Looking at different options to run  WordPress? Check out this blog post. All the code to do it in a docker container is shared and also details the reasons why you should do it or not

Programming

Podcasts

Miscellaneous


Reading Notes #659

This week's reading notes cover a variety of insightful topics, from enhancing your development environment with dev containers on Windows to prioritizing open-source bugs effectively. You'll also find helpful posts on integrating MFA into your login process, exploring RavenDB's vector search capabilities, and understanding the differences between Ask Mode and Agent Mode in Visual Studio.

Happy reading!

a wild turkey in my driveway
A wild turkey in my driveway!?

Suggestion of the week


Databases


Programming

  • Why You Should Incorporate MFA into Your Login Process (Suzanne Scacca) - You think the answer is simple, think again. Nice post that explains the difference between 2FA and MFA and why you should or should not implement one of those

  • Aspire Dashboard (Joseph Guadagno) - Great deep dive about the Aspire dashboard, learn all the features packed inside it


Open Source

  • How I Prioritize OSS Bugs (jeremydmiller) - A very instructive post on a real-life issue. It's harder than people think to prioritize. And it may help you write better bug reports...

AI


Sharing my Reading Notes is a habit I started a long time ago, where I share a list of all the articles, blog posts, and books that catch my interest during the week. 

If you have interesting content, share it! 

~frank

Reading Notes #658

This week, we explore the latest insights on AI, Cloud, and software development to keep you informed and inspired.

little branch with leaves and walnuts

Cloud

Programming

Databases

AI

Miscellaneous


Sharing my Reading Notes is a habit I started a long time ago, where I share a list of all the articles, blog posts, and books that catch my interest during the week. 

If you have interesting content, share it! 

~frank

Why Your .NET Code Coverage Badge is 'Unknown' in GitLab (And How to Fix It)


In a recent post, I shared how to set up a CI/CD pipeline for a .NET Aspire project on GitLab. The pipeline includes unit tests, security scanning, and secret detection, and if any of those fail, the pipeline would fail. Great, but what about code coverage for the unit tests? The pipeline included code coverage commands, but the coverage was not visible in the GitLab interface. Let's fix that.

(blog post en français ici)

Badge on Gitlab showing coverage unknown

The Problem

One thing I initially thought was that the regex used to extract the coverage was incorrect. The regex used in the pipeline was:

coverage: '/Total\s*\|\s*(\d+(?:\.\d+)?)%/'

That regex came directly from the GitLab documentation, so I thought it should work correctly. However, coverage still wasn't visible in the GitLab interface.

So with the help of GitHub Copilot, we wrote a few commands to validate:

  • That the coverage.cobertura.xml was in a consistent location (instead of being in a folder with a GUID name)
  • That the coverage.cobertura.xml file was in a valid format
  • What exactly the regex was looking for

Everything checked out fine, so why was the coverage not visible?

The Solution

It turns out that the coverage command with the regex expression is scanning the console output and not the coverage.cobertura.xml file. Aha! One solution was to install dotnet-tools to changing where the the test results was persisted; to the console instead of the XML file, but I preferred keeping the .NET environment unchanged.

The solution I ended up implementing was executing a grep command to extract the coverage from the coverage.cobertura.xml file and then echoing it to the console. Here's what it looks like:

- COVERAGE=$(grep -o 'line-rate="[0-9.]*"' TestResults/coverage.cobertura.xml | head -1 | grep -o '[0-9.]*' | awk '{printf "%.1f", $1*100}')
- echo "Total | ${COVERAGE}%"

Results

And now when the pipeline runs, the coverage is visible in the GitLab pipeline!



And the badge is updated to show the coverage percentage.

Coverage badge showing percentage


Complete Configuration

Here's the complete test job configuration. Of course, the full .gitlab-ci.yml file is available in the GitLab repository.

test:
  stage: test
  image: mcr.microsoft.com/dotnet/sdk:9.0
  <<: *dotnet_cache
  dependencies:
    - build
  script:
    - dotnet test $SOLUTION_FILE --configuration Release --logger "junit;LogFilePath=$CI_PROJECT_DIR/TestResults/test-results.xml" --logger "console;verbosity=detailed" --collect:"XPlat Code Coverage" --results-directory $CI_PROJECT_DIR/TestResults
    - find TestResults -name "coverage.cobertura.xml" -exec cp {} TestResults/coverage.cobertura.xml \;
    - COVERAGE=$(grep -o 'line-rate="[0-9.]*"' TestResults/coverage.cobertura.xml | head -1 | grep -o '[0-9.]*' | awk '{printf "%.1f", $1*100}')
    - echo "Total | ${COVERAGE}%"
  artifacts:
    when: always
    reports:
      junit: "TestResults/test-results.xml"
      coverage_report:
        coverage_format: cobertura
        path: "TestResults/coverage.cobertura.xml"
    paths:
      - TestResults/
    expire_in: 1 week
  coverage: '/Total\s*\|\s*(\d+(?:\.\d+)?)%/'

Conclusion

I hope this helps others save time when setting up code coverage for their .NET projects on GitLab. The key insight is that GitLab's coverage regex works on console output, not on the files (XML or other formats).

If you have any questions or suggestions, feel free to reach out!


~frank



Reading Notes #657

a rocky path ends at the shore of a lake
This week's collection of interesting articles and resources covers AI development, DevOps practices, and open source tools. From GitHub Copilot customization to local AI deployments and containerization best practices, here are the highlights worth your attention.

AI

DevOps

  • Local Deploy with Bicep (Sam Cogan) - A perfect short story, I'll explain why the hell bicep can now deploy locally and how to do it

Open Source

  • Introducing OpenCLI (Patrik Svensson) - A standard that describes CLI so both humans and agents can understand how it works. Love it!

~frank


Reading Notes #656

This week, we're exploring a wide range of topics, from .NET 10 previews and A/B testing to the latest in Azure development and AI. Plus, a selection of insightful podcast episodes to keep you informed and inspired.

Cloud


Programming

Open Source

  • Patrik Svensson (Patrik Svensson) - An interesting way to structure the flow that provides more detailed issues and PR with a clear purpose.

AI


Podcasts


~frank

Reading Notes #655

Welcome to the 655th Reading Notes. This edition explores embedding Python in .NET, working with stacked git branches, and an introduction to cloud-native. Plus, a quick tip for the Azure Portal and using local AI for code reviews. 

a kayak on the water with a tree at the horizon

Open Source

Programming

Cloud

AI


Sharing my Reading Notes is a habit I started a long time ago, where I share a list of all the articles, blog posts, and books that catch my interest during the week. 

If you have interesting content, share it!


~frank


Reading Notes #654

Welcome to another edition of my reading notes! This week, I’ve gathered a selection of insightful articles and resources covering topics like AI, cloud security, open source, and developer productivity. Whether you’re interested in best practices, new tools, or thought-provoking perspectives, there’s something here for everyone. 

Dive in and enjoy the highlights!

Suggestion of the week

  • Copilot, The Good Parts: Efficiency (Rob Conery) - I love that post, it's so true! There are good and bad ways to use any tools. And I personally would really like seeing Rob build his stuff. Let's him know If you think like me.

Programming

Open Source

Databases

Miscellaneous


~frank


Reading Notes #653

Welcome to Reading Notes #653 another packed edition of insights, tools, and updates from the tech world! This week's roundup dives into legendary engineering wisdom, AI controversies, and the latest innovations in Docker, Azure, and VS Code. Whether you're exploring MCP, refining your scripting skills, or gearing up for the newest Azure Developer CLI release, there's something here for every developer.

windmill on the cap of Ile Perrot

Let’s get into it!

Cloud

  • Azure Developer CLI (azd) - June 2025 (Kristen Womack) - Love that tool, great updates, so many new features and improvements in this version, very looking forward to try all of them, turning them all

AI

Programming

Miscellaneous


~frank

Reading Notes #652

This week, we explore a variety of topics, from database containerization and AI security risks to the evolving landscape of gaming devices and cloud technologies. We also explore the shift towards security-first development and the integration of .NET Aspire with SQL Server for integration testing.


Let's dive in!

Suggestion of the week

Cloud

Programming

Databases

Miscellaneous

~frank