-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Description
High level goals for code generation
- Works for server projects which targets .net6 (maybe even for netstandard2.0)
- also works for .Net Framework (what is supported today)
- Keeps support for clients running .net framework, netstandard2.0 and net core (net5.0+) (Support mixed server / client framework versions #274 )
- Works cross platform with "dotnet build"
Fixed by ([CodeGen] Support net6+ on server #414) - Support portable pdb (Support for Portable PDBs in server project #185)
A working sample can be found in Samples repo
Codegen remaining work
- Add test similar to CreateRiaClientFiles_ASPNET_AppDomain for net6 link
- We want a test which verifies that
Program.SetupAppConfigin codegeneration program works as expected
- We want a test which verifies that
- Add dependencies from Tools and Tools.TextTemplate in T4.nuspec link
- Create ServerClassLibNet6 by copying ServerClassLib link
- Fix insecurity with Path.GetTempFile()
- Implement or take action on server codegen validation
- Support nullable reference types (it generates attributes on client which gives Compile errors).
- see nullable attributes metadata which needs to be "reversed/decompiled" to corresponding c#/vb code
- a good temporary solution could be to ignore properties in code gen
- Support "required" properties (it generates an attribute on client which gives Compile errors)
- Support other new property features (if any) that are implemented as attributes that are not allowed to be specified in code ("init" properties?)
New codegen exe todo's:
Program.cs
- // TODO: Remove dependency on MSBuild and then remove any PackageReferences to MSBuild and MSBuildLocator
- This will require splitting "OpenRiaServices.Tools" into 2 separate projects, one with MSbuild tasks and one without (just code generation)
SharedCodeServiceParametersBinder.cs
-
Change parameter names to match "default/recommended" names such as "--shared-source-files"
This might make the binders redundant and maybe allows some further cleanup of the program
// TODO: -
Change name of project (and exe) , from "Tools.CodeGen" to something else such as "Tools.Console"