My activities in 2021

On Github :

https://github.com/ignatandrei/RSCG_Examples  – examples about Roslyn Source Code Generators

https://github.com/ignatandrei/appSettingsEditor – an editor for appSettings

https://github.com/ignatandrei/QueryViewer – generating code from SqlServer queries

https://github.com/MicroservicesBuffet  – email and

https://github.com/ignatandrei/MicroservicesPortChooser – a port registration / chooser for microservices

https://github.com/ignatandrei/RSCG_Static – roslyn gor static to interface

https://github.com/ignatandrei/RSCG_TimeBombComment –  comment to time bomb compile

https://github.com/ignatandrei/FileExtension –  recognize file after magic header

https://github.com/ignatandrei/RSCG_AMS – compile date time

https://github.com/ignatandrei/BlocklyAutomation – swagger automation with Blockly

https://github.com/ignatandrei/AOP_With_Roslyn – to automatically generate AOP for any method

 

Presentations:

Github ( Copilot and others) : https://ignatandrei.github.io/Presentations/GitHubprez.html#1

PowerAutomateDesktop : https://ignatandrei.github.io/Presentations/PowerAutomateDesktopprez.html#1

Roslyn Source Code Generator: https://ignatandrei.github.io/Presentations/RoslynSourceCodeGeneratorsprez.html#1

WebAPI : https://ignatandrei.github.io/Presentations/WebAPIReturnsprez.html#1

WhatsNewNet6: https://ignatandrei.github.io/Presentations/WhatsNewNet6prez.html#1

Conferences:

ADCES, AZConf, DevCon, GraniteCodeCamp

This blog:

Meetup : https://www.meetup.com/Bucharest-A-D-C-E-S-Meetup/

Book:  RSCG: https://ignatandrei.github.io/RSCG_Examples/  

 

Windows terminal + Powershell to run IDE, Angular, .NET Core

I work at http://github.com/ignatandrei/BlocklyAutomation – and every time I need to run Angular , Visual Studio Code IDE and .NET Core run ( and Visual Studio  sometimes  – it is more web based)

Also, sometimes I need to run in a container – to install globally something that I do not want to have in my PC.

So  I have 1 windows terminal command to run those :

First one

wt new-tab   –title RootSource –suppressApplicationTitle -p “Windows PowerShell” -d . cmd /k “cd src && code . && powershell” ;split-pane  –title Angular –suppressApplicationTitle -V -p “Windows PowerShell” -d . cmd /k “cd src &&  npm run start –watch && powershell” ;split-pane  –title LocalAPI_NetCore –suppressApplicationTitle -V -p “Windows PowerShell” -d . cmd /k “cd src/Local/LocalAPI/LocalAPI && dotnet watch run”

As you see , I have

code .

to run VSCode,

npm run start –watch

to run Angular and

dotnet watch run

to run dotnet.

Second one:

wt new-tab -p “Windows PowerShell” -d . ;split-pane -p “Windows PowerShell” -d . cmd /k “cd src && devcontainer open .”

The second it just works with devcontainer  – if you are interested in sources, see https://github.com/ignatandrei/BlocklyAutomation/tree/main/src/.devcontainer 

With those, I can start my developer environment fast ( how fast, that depends on my PC)

.NET Conf ADCES – .NET 6 and VS2022

Details

Speaker 1 : Daniel Costea , https://www.linkedin.com/in/danielcostea/ ,
Prezentare : .NET Minimal API

Speaker 2 : Catalin Gheorghiu, https://www.linkedin.com/in/catalingheorghiu/
Titlu: A Rush and a Push and the Land Is Ours
Descriere: Voi arata cum am migrat aplicatii Blazor, din productie, de la .Net 4 la 5 si acum la .Net 6. Si sa vedem ce a iesit . Prezentarea vrea sa va dea informatia practica, cum, care ar fi problemele, ce o sa ia timp, si de ce nu daca merita, azi si acum aceata migrare. Si vorbim de exepereinte din productie, din lumea reala. Povestea va incepe cu de ce am ales Blazor in primul rind, si de ce am considerat sa migram ASAP la .Net 6, si cit de greu, sau usor a fost acest drum.

Speaker 3: Andrei Ignat,http://msprogrammer.serviciipeweb.ro/
Titlu: All new and usefull in .NET 6
Descriere : VS2022, .NET features , WebAPI, EF , Roslyn Source Code Generators, OMG!
Va astept la  https://www.meetup.com/Bucharest-A-D-C-E-S-Meetup/events/280958485/
Multumesc,

Andrei

Developer choices Web => Windows application

So I have an Angular application – basically, a macro for your WebAPI – see https://ignatandrei.github.io/BlocklyAutomation/ . I want to transform into an Windows Application and have also deployed to Windows Store.

Attempt 1 : embed as a resource a .NET Core WebAPP and deploy to Windows Store. Not really –  the validation part of Store realizes this trick

Attempt2 : Electron – must rewrite window.prompt : https://github.com/electron/electron/issues/472

Attempt3 : Let’s see Blazor – https://github.com/dotnet/MobileBlazorBindings/  – however , it has just WPF, not UWP .

Attempt3: WebView2 –  https://github.com/MicrosoftEdge/WebView2Samples . It has an UWP. However, I realize that it does not have redirect … so routes in Angular will be difficult – if not intercepting 404 and serving the same index.html.

Attempt4: PWA : https://docs.microsoft.com/en-us/windows/uwp/publish/pwa/overview – yes, but my app it was Angular 12. Pass to 13 ( and force some unresolved dependencies ) take me the rest of the  day .

So I am at PWA now.

And Angular with https://www.pwabuilder.com/ is pretty impresive

What I do not have yet: ASP.NET Core downloading as Windows Store application with PWA and Controllers …

UNIQUE ID inside an Angular Component

If you use an id for a HTML element inside your angular component and then use

document.getElementById

to retrieve it, bear in mind that someone can have multiple instances of your component on the same page. So here is a simple trick to deal with

1. In the HTML component put

<div [id]=”‘htmlOutput’+myId”></div>

2. In the ts file put

export class MyComponent{

static id:number=0;

myId:number=0;

constructor(/*arguments*/){

this.myId=++DisplayBlocklyComponent.id;

}

}

and for retrieving the HTML element

document.getElementById(‘htmlOutput’+this.myId)

That is all;

Andrei Ignat weekly software news(mostly .NET)

* indicates required

Please select all the ways you would like to hear from me:

You can unsubscribe at any time by clicking the link in the footer of our emails. For information about our privacy practices, please visit our website.

We use Mailchimp as our marketing platform. By clicking below to subscribe, you acknowledge that your information will be transferred to Mailchimp for processing. Learn more about Mailchimp's privacy practices here.