Category: projects

  • Package analyzer and Feature Matrix

    I have started a .NET Tool,https://github.com/ignatandrei/PackageAnalyzer,that can analyze your solution and generate various statistics. The program can show you dependency matrix of projects The X on the diagonal shows that the project is not dependent on himself. The 1 shows that the project is dependent DIRECTLY on the other project ( read from left to…

  • Watch2–part7–full test

    Watch2 NuGet Package The Watch2 NuGet package extends the functionality of dotnet watch by adding features such as console clearing and delay handling. It outputs the same information as dotnet watch. 1. Wrapper Interfaces To facilitate testing,it is necessary to wrap various process creation classes from .NET (e.g.,Process => ProcessWrapper,ProcessStartInfo => ProcessStartInfoWrapper). This allows for…

  • Watch2–part 6- options

    The Watch2 package passes all the command line arguments to the dotnet watch. So how can it have its own settings? Simple: by reading a watch.json file that is in the same folder where it is executing. 1. Testing I was considering how to perform the testing,and there were two options: Microsoft File Providers: https://learn.microsoft.com/en-us/aspnet/core/fundamentals/file-providers?view=aspnetcore-8.0…

  • Watch2- part 5–DI

    The Watch2 NuGet package project now has interfaces,making it test-friendly and ready for action. To make life easier,we’ve sprinkled some Dependency Injection (DI) magic throughout the project. Classes have been refactored to embrace constructor injection,ensuring all necessary interfaces are on board. The DI container has been set up in `Program.cs`,making dependency resolution a breeze. The…

  • Watch2–part 4–CI and CD

    Now I want to do build and auto-deployment as a Nuget Package( at https://www.nuget.org/packages/watch2 ) The most simple build action on GitHub Actions is simple example of how to do it. However,I want to do more than that. I want to build,test and deploy on demand the Nuget package to Nuget.org. However,the building should be…

  • Watch2- part 3 -refactoring to interfaces and test

    The Watch2 just intercepts the dotnet watch,adds a clear console,and a delay to give a breather between running the app and the tests. So I need to have tests – if I want to be sure what the software does and to modify it without summoning the coding gremlins. More importantly,the output from dotnet watch…

  • Watch2- part 2- first fast implementation

    The first attempt to writing the code was very fast – and,surely,not testable. (Speedy Gonzales would be proud!) Some observations: 1. If you start any process inside a console application,you should intercept the cancel signal and stop the process. This is done by using the CancelKeyPress event of the Console class. This is important because…

  • Watch2–part 1–idea

    I frequently use .NET Watch for two main reasons: Running .NET applications during development. Executing tests. Seriously,if you haven’t tried .NET Watch,you’re missing out. It’s like having a personal assistant who never sleeps compiling code . For more info,check out Microsoft’s documentation  at https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-watch But,like all good things,it comes with a couple of quirks: The…

  • NetCoreUsefullEndpoints-part 13–adding runtime information

    In the Nuget NetCoreUsefullEndpoints I have added information about the runtime information : You can access by going to localhost:5027/api/usefull/runtimeinformationAll and the end result is { “frameworkDescription”: “.NET 8.0.8”, “osDescription”: “Microsoft Windows 10.0.22631”, “processArchitecture”: “X64”, “osArchitecture”: “X64” } The code that returns this is ( I have used a Roslyn Code Generator,https://ignatandrei.github.io/RSCG_Examples/v2/docs/RSCG_Static#example–source-csproj-source-files-,that generates a class…

  • NetCoreUsefullEndpoints-part 12–adding url adresses

    In the Nuget NetCoreUsefullEndpoints I have added information about the current process : You can access by going to localhost:5027/api/usefull/adresses and the end result is [     “http://localhost:5027″ ] The code that returns this is