Category: roslyn
-
RSCG Example–CI Version–part 18
name RSCG_AMS nuget https://www.nuget.org/packages/AMS_Base https://www.nuget.org/packages/AMSWebAPI https://www.nuget.org/packages/RSCG_AMS link https://github.com/ignatandrei/RSCG_AMS author Andrei Ignat The AMS will add in the CI the version and creator to your project.See https://netcoreblockly.herokuapp.com/ams for an example The code that you start with is The code that you will use is The code that is generated is Example Code: https://github.com/ignatandrei/RSCG_Examples/tree/main/CI_Version
-
RSCG-Integrating with CI Only – part 10
The integration with CI providers is enough straightforward – just see what environments variable those providers have. GitLab and Github has enough documentation – at https://docs.gitlab.com/ee/ci/variables/ and https://docs.github.com/en/actions/reference/environment-variables What I have forgot is that there are also CI providers without having necessary source control. For example AzureDevOps can execute code taken from GitHub More than…
-
RSCG–Template Rendering- part 17
name Transplator nuget https://www.nuget.org/packages/Transplator/ link https://github.com/atifaziz/Transplator/ author Atif Aziz The Transplator is a small fast rendering engine to allow you to make rendering from any class instance. The code that you start with is The code that you will use is The code that is generated is Example Code: https://github.com/ignatandrei/RSCG_Examples/tree/main/TemplateRender
-
RSCG–Advice- part 8
If you create a Roslyn Source Code Generator that uses inside a base class or a static class,the best way,in my opinion,is to create 2 separate nuget packages : one for the code generated and one for the base class. This way the project that will use your RSCG will use just the nuget package…
-
RSCG–AMS – About My software –Documentation– part 7
Now it is time to let others know about the project. And the first step is to make documentation. And,because a picture is worth many words,here is the picture: Also,instructions about how to use will help the programmers: For a DLL it is simple : <ItemGroup> <PackageReference Include=”AMS_Base” Version=”2021.6.29.1820″ /> <PackageReference Include=”RSCG_AMS” Version=”2021.6.29.1820″ ReferenceOutputAssembly=”false” OutputItemType=”Analyzer”…
-
RSCG–AMS – About My software –Reading csproj– part 6
Now it is time to put some more data – like authors and version. I have read a lot ( and tried a lot) about CompilerVisibleProperty and CompilerVisibleItemMetadata ( see https://github.com/dotnet/roslyn/blob/main/docs/features/source-generators.cookbook.md ) . However,I was unable to get the data ( Authors and Version) from there . So this is what I was get,to read…
-
RSCG–AMS – About My software –NuGet– part 5
The problem with RSCG is to differentiate between the generator and the code generated. In my case,the base class should be in one nuget,the generator in other ( to can remove it from build) and the WebAPI in another. That took me a whole day and the result is ok . Pain Points: https://turnerj.com/blog/the-pain-points-of-csharp-source-generators CI…
-
RSCG–AMS – About My software –WebAPI– part 4
Now it should be an easy way to see in the WebAPI. First,return the data for all software that respected that : Now,how can I make a small html to display things ? I can do with Razor Library – but it is too big and maybe the developers do not want to have this…
-
RSCG–AMS – About My software –Multiple assemblies– part 3
The problem that I face now – and must be solved – is what to do if I have multiple assemblies / dlls / asp.net core that wants to have the About My Software listed ? It will be a name conflict between the classes – or,if we put in different namespaces,will be difficult to…
-
RSCG–AMS – About My software –work– part 2
So now it is time to work at implementation This will be a standard RSCG – generating code. I make also a test console to display the values. The implementation will consider the fact that we can have many Source Control providers – each one with his ideas about variables. So I made 2 classes…