Replies: 8 comments 33 replies
-
Beta Was this translation helpful? Give feedback.
-
Without automating |
Beta Was this translation helpful? Give feedback.
-
Done!
By default gonna work if you add. <PackageReference Include="RevitVersion.DefineConstants" Version="*-*" /> Gonna inject the DefineConstants based on the value of the |
Beta Was this translation helpful? Give feedback.
-
That's nice, I didn't search for the Microsoft SDK approach. I like that.
That could be done by looking at the configuration and guessing the version, I was messing with that in the other project that has a lot of SDK experiments.
Yes, I was experimenting with creating the Revit.NET.Sdk to add the packages, define, and other configurations. |
Beta Was this translation helpful? Give feedback.
-
Just to update, I add a similar implementation using that dark-magic using target and |
Beta Was this translation helpful? Give feedback.
-
@ricaun I was able to write code that generates constants only for configurations specified in the project, not only from version 17 to 25. And it's really cool because we can create a library that covers all the needs for msbuild customisation |
Beta Was this translation helpful? Give feedback.
-
I remember that I have some issues trying that, 😔 |
Beta Was this translation helpful? Give feedback.
-
I thought about it, but decided that people use different API libraries, for example you use Revit_All_Main_Versions_API_x64 which contains quite a few dependencies, I use my own, where each dependency is a separate package. then this approach won't work, and "Revit.Build.Tasks" is used only for revit plugins, and without adding API dependencies it doesn't make sense. Maybe I'll check if we can check Reference instead of PackageReference |
Beta Was this translation helpful? Give feedback.
-
Hello @Nice3point
I was looking in your template and noticed that you are using the define pattern with only R and the number with only 2 digits to define the const for the Revit version.
I wonder if you are willing to consider changing to the REVIT and the 4 digits.
This gonna make clear what the define is for and gonna make it possible to automate the creation of the defines in the csproj.
I was experimenting with .props to make the creation of the _OR_GREATER and _OR_LOWER on the fly depending of
$(RevitVersion)
available.Beta Was this translation helpful? Give feedback.
All reactions