chuongmep / RevitAddInManager

Revit AddinManager update .NET assemblies without restart Revit for developer.
MIT License
275 stars 50 forks source link

Milti version config #13

Closed Nice3point closed 2 years ago

Nice3point commented 2 years ago

https://github.com/chuongmep/RevitAddInManager/blob/8faa9fff26524c74eb5aadeb4e6bf3ae115c69cd/AddInManager/RevitAddinManager.csproj#L34

The project only compiles under the 2022 version of Revit, the Readme says support until 2014, you need to add the solution and project configurations for this: https://github.com/Nice3point/RevitTemplates/blob/main/Templates/Nice3point.Revit.AddIn/Nice3point.Revit.AddIn.csproj https://github.com/Nice3point/RevitTemplates/wiki/Multiple-Revit-Versions

Nice3point commented 2 years ago

you added project configs 19 to 22 but solution config is still set to 22

Nice3point commented 2 years ago

https://github.com/chuongmep/RevitAddInManager/blob/ad5e60ed2995f8c81ad807e3e2e8b1ffad4afcd5/AddInManager/RevitAddinManager.csproj#L10

this property should not be at the beginning, and the libraries version is still 2022)

chuongmep commented 2 years ago

@Nice3point may be have problem when we use some number after to build version image

Nice3point commented 2 years ago

move this line below like here https://github.com/Nice3point/RevitTemplates/blob/main/Templates/Nice3point.Revit.AddIn/Nice3point.Revit.AddIn.csproj#L38

Nice3point commented 2 years ago

And for the Nuget package, the version number changes to this: <PackageReference Include="Revit_All_Main_Versions_API_x64" Version="$(RevitVersion).*" />

Nice3point commented 2 years ago

Nuke will build a dll for each such solution configuration, and then this file will not be needed https://github.com/chuongmep/RevitAddInManager/blob/dev/Installer/BuildVersions.cs

Nice3point commented 2 years ago

You can still use the Revit_All_Main_Versions_API_x64 library, you don't have to change it at all 😉

Nice3point commented 2 years ago

Example Solution Configurations https://github.com/Nice3point/RevitTemplates/blob/main/Templates/Nice3point.Revit.Solution/Nice3point.Revit.Solution.sln#L23

chuongmep commented 2 years ago

hmm. Let me check fist with that, image

Nice3point commented 2 years ago

изображение When you set up the configurations correctly, Nuke for all Release configurations will compile the project and add the assembly to the installer, only you will need to use the code from the templates, the RevitLookup project has a heavily truncated and changed code

Nice3point commented 2 years ago

Debug configurations can only be created for the 22nd version, I don’t think that this project will have a lot of API dependent code

chuongmep commented 2 years ago

Only revit api x64 dependent in project, i has remove some library wpf no need yesterday

Nice3point commented 2 years ago

@chuongmep /p:Configuration=Installer Turn off building the AddInManager project for this solution configuration

Nice3point commented 2 years ago

you can leave it as it is for now, in 2 hours I will do everything and send a PR

chuongmep commented 2 years ago

many thanks @Nice3point , I'm still very new to nuke, hope you can help !