Open philippelatulippe opened 1 month ago
@philippelatulippe can you share archive with the project folder here?
I can't share the whole project but I can certainly share the csproj:
@gritsenko, I'm starting to wonder if integrating the generation CLI into MSBuild would make it simpler. A Custom MSbuild step could get a list of all loaded libraries and that could be used to trigger the generation.
I use a MSBuild step here that runs after the ResolveReferences step. https://github.com/IvanJosipovic/KubernetesCRDModelGen/blob/86e5de4755a0263a5017a85896c30a1c5468c966/src/KubernetesCRDModelGen/KubernetesCRDModelGen.csproj#L31
@IvanJosipovic I thought about it as well, but we need to generate extensions before building step already, and even when project itself has errors and can't to be built. Do you think it is possible to use msbuild in this case? Or I misunderstanding how it works?
@IvanJosipovic I thought about it as well, but we need to generate extensions before building step already, and even when project itself has errors and can't to be built. Do you think it is possible to use msbuild in this case? Or I misunderstanding how it works?
@gritsenko, I created an example PR, https://github.com/AvaloniaUI/Avalonia.Markup.Declarative/pull/70 Have a look, if its interesting, we can continue the work there. I believe we can also publish custom "MSBuild Target" as a part of the NuGet package to make it even simpler to use.
When I run avalonia-amd-gen on a project created by Rider, I get the following error:
It looks like the csproj file reader doesn't understand variables, since the variable
AvaloniaVersion
is definited inPropertyGroup
.