2024-09-22 11:05:41 +08:00
|
|
|
|
<Project Sdk="Microsoft.NET.Sdk">
|
|
|
|
|
|
<PropertyGroup>
|
2025-02-10 20:53:40 +08:00
|
|
|
|
<LangVersion>preview</LangVersion>
|
2024-09-22 11:05:41 +08:00
|
|
|
|
<Configurations>Debug;Release</Configurations>
|
|
|
|
|
|
<AccelerateBuildsInVisualStudio>True</AccelerateBuildsInVisualStudio>
|
|
|
|
|
|
<!-- 添加默认的五个命名空间 -->
|
|
|
|
|
|
<ImplicitUsings>enable</ImplicitUsings>
|
|
|
|
|
|
<!-- 生成多语言的问题 -->
|
2024-12-22 10:26:12 +08:00
|
|
|
|
<!--<SatelliteResourceLanguages>en-US</SatelliteResourceLanguages>-->
|
2024-09-22 11:05:41 +08:00
|
|
|
|
<GenerateAssemblyInfo>True</GenerateAssemblyInfo>
|
|
|
|
|
|
<!--netcore框架指定目标运行时-->
|
2024-12-22 10:26:12 +08:00
|
|
|
|
<!--<RuntimeIdentifier>win-x64</RuntimeIdentifier>-->
|
2024-09-22 11:05:41 +08:00
|
|
|
|
<UseWPF>True</UseWPF>
|
2025-04-24 20:56:10 +08:00
|
|
|
|
<PackageId>ShrlAlgoToolkit.RevitAddins</PackageId>
|
2026-01-01 10:02:59 +08:00
|
|
|
|
<AssemblyVersion>1.0.0.0</AssemblyVersion>
|
|
|
|
|
|
<ProductVersion>$(AssemblyVersion)</ProductVersion>
|
|
|
|
|
|
<FileVersion>$(AssemblyVersion)</FileVersion>
|
2024-09-22 11:05:41 +08:00
|
|
|
|
<!--<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>-->
|
|
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
<PropertyGroup>
|
2026-01-01 10:02:59 +08:00
|
|
|
|
<TargetFrameworks>
|
|
|
|
|
|
net48;net481<!--;net8.0-windows--></TargetFrameworks>
|
2024-09-22 11:05:41 +08:00
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
<PropertyGroup Condition=" '$(TargetFramework)' == 'net48' ">
|
|
|
|
|
|
<RevitVersion>2018</RevitVersion>
|
|
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
|
|
|
|
<PropertyGroup Condition=" '$(TargetFramework)' == 'net481' ">
|
|
|
|
|
|
<RevitVersion>2020</RevitVersion>
|
|
|
|
|
|
</PropertyGroup>
|
2026-01-01 10:02:59 +08:00
|
|
|
|
<!--
|
2024-09-22 11:05:41 +08:00
|
|
|
|
<PropertyGroup Condition=" '$(TargetFramework)' == 'net8.0-windows' ">
|
|
|
|
|
|
<RevitVersion>2025</RevitVersion>
|
|
|
|
|
|
</PropertyGroup>-->
|
|
|
|
|
|
|
|
|
|
|
|
<PropertyGroup>
|
|
|
|
|
|
<!-- 强行将平台设置为 "x64 "并忽略与架构有关的问题 -->
|
|
|
|
|
|
<PlatformTarget>x64</PlatformTarget>
|
2026-01-01 10:02:59 +08:00
|
|
|
|
<Platforms>AnyCPU</Platforms>
|
2024-09-22 11:05:41 +08:00
|
|
|
|
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 定义方便的符号在代码中使用,以适应不同的Revit版本,例如用#if REVIT2014 | REVIT2015 来包装传统/废弃的API调用。-->
|
|
|
|
|
|
<DefineConstants>REVIT$(RevitVersion);$(DefineConstants)</DefineConstants>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 通过同时构建多个目标会导致obj文件夹被锁定 -->
|
|
|
|
|
|
<BuildInParallel>false</BuildInParallel>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 'OutputPath'不添加运行时和框架的文件夹 -->
|
|
|
|
|
|
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
|
|
|
|
|
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
|
|
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
|
|
|
|
<!--我们可以定义我们的自定义预处理器常量来简化我们的项目代码-->
|
|
|
|
|
|
<PropertyGroup Condition="'$(RevitVersion)' != '2018' AND '$(RevitVersion)' != '2019' AND '$(RevitVersion)' != '2020'">
|
|
|
|
|
|
<DefineConstants>$(DefineConstants);USE_FORGETYPEID</DefineConstants>
|
|
|
|
|
|
<PreprocessorDefinitions>$(DefineConstants)</PreprocessorDefinitions>
|
|
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
|
|
|
|
<PropertyGroup Condition="$(Configuration.Contains('Debug'))">
|
|
|
|
|
|
<DefineConstants>$(DefineConstants);DEBUG</DefineConstants>
|
|
|
|
|
|
<DebugType>full</DebugType>
|
|
|
|
|
|
<OutputPath>..\bin\Debug\$(RevitVersion)</OutputPath>
|
|
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
<!--不生成调试信息pdb-->
|
|
|
|
|
|
<PropertyGroup Condition="$(Configuration.Contains('Release'))">
|
|
|
|
|
|
<DefineConstants>$(DefineConstants);Release</DefineConstants>
|
|
|
|
|
|
<DebugType>None</DebugType>
|
|
|
|
|
|
<OutputPath>..\bin\Release\$(RevitVersion)</OutputPath>
|
|
|
|
|
|
</PropertyGroup>
|
2026-02-20 15:31:44 +08:00
|
|
|
|
<!-- <PropertyGroup Condition="$(Configuration.Contains('Release'))">
|
2026-01-01 10:02:59 +08:00
|
|
|
|
<Obfuscate>true</Obfuscate>
|
|
|
|
|
|
<ConfuserReplaceOutput>true</ConfuserReplaceOutput>
|
|
|
|
|
|
<ConfuserProject>$(MSBuildProjectDirectory)\$(MSBuildProjectName).crproj</ConfuserProject>
|
|
|
|
|
|
<ConfuserKeyFile>$(AssemblyOriginatorKeyFile)</ConfuserKeyFile>
|
|
|
|
|
|
<ConfuserIntermediateOutputPath>$(IntermediateOutputPath)</ConfuserIntermediateOutputPath>
|
|
|
|
|
|
<ConfuserOutDir>$(OutDir)</ConfuserOutDir>
|
|
|
|
|
|
<ConfuserSymbolFileName>symbols.map</ConfuserSymbolFileName>
|
2026-02-20 15:31:44 +08:00
|
|
|
|
</PropertyGroup>-->
|
2025-12-28 11:47:54 +08:00
|
|
|
|
<PropertyGroup>
|
2026-01-01 10:02:59 +08:00
|
|
|
|
<InnoSetupCompiler>C:\Program Files (x86)\Inno Setup 6\ISCC.exe</InnoSetupCompiler>
|
|
|
|
|
|
<InnoScriptPath>$(MSBuildProjectDirectory)\$(MSBuildProjectName).iss</InnoScriptPath>
|
|
|
|
|
|
<!--最后编译的框架后打包-->
|
|
|
|
|
|
<PackagerTriggerFramework>net481</PackagerTriggerFramework>
|
2025-12-28 11:47:54 +08:00
|
|
|
|
</PropertyGroup>
|
2024-09-22 11:05:41 +08:00
|
|
|
|
<ItemGroup>
|
2026-01-01 10:02:59 +08:00
|
|
|
|
<!-- <Reference Include="Microsoft.CSharp" Condition="'$(RevitVersion)' == '2018' Or '$(RevitVersion)' == '2019' Or '$(RevitVersion)' == '2020'" />
|
2024-09-22 11:05:41 +08:00
|
|
|
|
<Reference Include="System.ComponentModel.DataAnnotations" Condition="'$(RevitVersion)' == '2018' Or '$(RevitVersion)' == '2019' Or '$(RevitVersion)' == '2020' " />-->
|
|
|
|
|
|
<Reference Include="eTransmitForRevitDB" HintPath="..\libs\$(RevitVersion)\eTransmitForRevitDB.dll" />
|
2026-01-01 10:02:59 +08:00
|
|
|
|
<!-- <Reference Include="RevitAPIIFC" Condition=" '$(RevitVersion)' == '2025' " HintPath="..\libs\$(RevitVersion)\RevitAPIIFC.dll" Private="False" />
|
2024-09-22 11:05:41 +08:00
|
|
|
|
<Reference Include="UIFramework" HintPath="..\libs\$(RevitVersion)\UIFramework.dll" Private="False" />
|
|
|
|
|
|
<Reference Include="UIFrameworkServices" HintPath="..\libs\$(RevitVersion)\UIFrameworkServices.dll" Private="False" />-->
|
|
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
<ItemGroup>
|
2025-02-10 20:53:40 +08:00
|
|
|
|
<PackageReference Include="CommunityToolkit.Common" Version="8.4.0" />
|
|
|
|
|
|
<PackageReference Include="CommunityToolkit.Diagnostics" Version="8.4.0" />
|
|
|
|
|
|
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
|
2026-02-20 15:31:44 +08:00
|
|
|
|
<!-- <PackageReference Include="Confuser.MSBuild" Version="1.6.0">
|
2026-01-01 10:02:59 +08:00
|
|
|
|
<PrivateAssets>all</PrivateAssets>
|
|
|
|
|
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
2026-02-20 15:31:44 +08:00
|
|
|
|
</PackageReference>-->
|
2024-09-22 11:05:41 +08:00
|
|
|
|
<PackageReference Include="EPPlus.Core.Extensions" Version="2.4.0" />
|
2025-12-28 11:47:54 +08:00
|
|
|
|
<PackageReference Include="ACadSharp" Version="3.3.13" />
|
2024-09-22 11:05:41 +08:00
|
|
|
|
<PackageReference Include="FuzzySharp" Version="2.0.2" />
|
2026-01-01 10:02:59 +08:00
|
|
|
|
<PackageReference Include="HtmlAgilityPack" Version="1.12.4" />
|
2024-09-22 11:05:41 +08:00
|
|
|
|
<!--TreatAsUsed="true"标记为已使用-->
|
2025-02-10 20:53:40 +08:00
|
|
|
|
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.135" TreatAsUsed="True" />
|
2025-04-24 20:56:44 +08:00
|
|
|
|
<PackageReference Include="Nice3point.Revit.Extensions" Version="2020.3.0" />
|
2026-02-20 15:31:44 +08:00
|
|
|
|
<PackageReference Include="ValueConverters" Version="3.1.22" />
|
2024-09-22 11:05:41 +08:00
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
<ItemGroup>
|
|
|
|
|
|
<PackageReference Include="Nice3point.Revit.Api.RevitAPI" Version="$(RevitVersion).*" PrivateAssets="All" />
|
|
|
|
|
|
<PackageReference Include="Nice3point.Revit.Api.RevitAPIUI" Version="$(RevitVersion).*" PrivateAssets="All" />
|
|
|
|
|
|
<PackageReference Include="Nice3point.Revit.Api.RevitAPIIFC" Version="$(RevitVersion).*" PrivateAssets="All" />
|
|
|
|
|
|
<PackageReference Include="Nice3point.Revit.Api.UIFramework" Version="$(RevitVersion).*" PrivateAssets="All" />
|
|
|
|
|
|
<PackageReference Include="Nice3point.Revit.Api.UIFrameworkServices" Version="$(RevitVersion).*" PrivateAssets="All" />
|
2025-12-28 11:47:54 +08:00
|
|
|
|
<PackageReference Include="Nice3point.Revit.Api.AdWindows" Version="$(RevitVersion).*" PrivateAssets="All" />
|
2024-09-22 11:05:41 +08:00
|
|
|
|
<PackageReference Include="Nice3point.Revit.Toolkit" Version="2019.*" Condition=" '$(RevitVersion)' == '2018' " />
|
|
|
|
|
|
<PackageReference Include="Nice3point.Revit.Toolkit" Version="2020.*" Condition=" '$(RevitVersion)' == '2020' " />
|
|
|
|
|
|
<!--<PackageReference Include="Nice3point.Revit.Toolkit" Version="2025.*" Condition=" '$(RevitVersion)' == '2025' " />-->
|
|
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
<ItemGroup>
|
|
|
|
|
|
<!-- 通过MSBuild处理插件清单 -->
|
|
|
|
|
|
|
|
|
|
|
|
<EmbeddedResource Include="Resources\**\*.*">
|
|
|
|
|
|
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
|
|
|
|
|
</EmbeddedResource>
|
|
|
|
|
|
|
|
|
|
|
|
<Content Include="Properties\launchSettings.json">
|
|
|
|
|
|
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
|
|
|
|
|
</Content>
|
|
|
|
|
|
|
|
|
|
|
|
<Content Include="Libraries\**\**\*.rfa">
|
|
|
|
|
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
|
|
|
|
</Content>
|
2026-01-01 10:02:59 +08:00
|
|
|
|
|
|
|
|
|
|
<Content Include="PackageContents.xml">
|
|
|
|
|
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
|
|
|
|
<Link>..\..\ShrlAlgoToolkit.RevitAddins.bundle\PackageContents.xml</Link>
|
|
|
|
|
|
</Content>
|
2024-09-22 11:05:41 +08:00
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
2025-02-10 20:53:40 +08:00
|
|
|
|
<ItemGroup>
|
2026-02-12 21:29:00 +08:00
|
|
|
|
<ProjectReference Include="..\Melskin\Melskin.csproj" />
|
2024-09-22 11:05:41 +08:00
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
<ItemGroup>
|
2026-01-01 10:02:59 +08:00
|
|
|
|
<Resource Include="Fonts\boxicons.ttf" />
|
|
|
|
|
|
<Resource Include="Fonts\Font Awesome 6 Free-Regular-400.otf" />
|
|
|
|
|
|
<Resource Include="Fonts\Segoe Fluent Icons.ttf" />
|
2024-09-22 11:05:41 +08:00
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
|
|
|
|
<ItemGroup>
|
|
|
|
|
|
<Compile Update="Properties\Resources.Designer.cs">
|
2026-01-01 10:02:59 +08:00
|
|
|
|
<DesignTime>True</DesignTime>
|
|
|
|
|
|
<AutoGen>True</AutoGen>
|
|
|
|
|
|
<DependentUpon>Resources.resx</DependentUpon>
|
2024-09-22 11:05:41 +08:00
|
|
|
|
</Compile>
|
|
|
|
|
|
<Compile Update="Properties\Settings.Designer.cs">
|
|
|
|
|
|
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
|
|
|
|
|
<AutoGen>True</AutoGen>
|
|
|
|
|
|
<DependentUpon>Settings.settings</DependentUpon>
|
|
|
|
|
|
</Compile>
|
|
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
|
|
|
|
<ItemGroup>
|
2026-01-01 10:02:59 +08:00
|
|
|
|
<EmbeddedResource Update="Properties\Resources.resx">
|
|
|
|
|
|
<Generator>ResXFileCodeGenerator</Generator>
|
|
|
|
|
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
|
|
|
|
|
</EmbeddedResource>
|
2024-09-22 11:05:41 +08:00
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
<ItemGroup>
|
|
|
|
|
|
<None Update="Properties\Settings.settings">
|
|
|
|
|
|
<Generator>SettingsSingleFileGenerator</Generator>
|
|
|
|
|
|
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
|
|
|
|
|
</None>
|
|
|
|
|
|
</ItemGroup>
|
2026-01-01 10:02:59 +08:00
|
|
|
|
|
|
|
|
|
|
<Import Project="..\ShrlAlgoToolkit.Revit\ShrlAlgoToolkit.Revit.projitems" Label="Shared" />
|
|
|
|
|
|
<!-- <PropertyGroup>
|
2024-09-22 11:05:41 +08:00
|
|
|
|
<NeutralLanguage>en</NeutralLanguage>
|
|
|
|
|
|
<UserSecretsId>c6f7036c-6a5d-453e-9f5e-3089ea23d222</UserSecretsId>
|
|
|
|
|
|
<AnalysisLevel>latest</AnalysisLevel>
|
2026-01-01 10:02:59 +08:00
|
|
|
|
</PropertyGroup>-->
|
2024-09-22 11:05:41 +08:00
|
|
|
|
|
2026-01-01 10:02:59 +08:00
|
|
|
|
<!-- <Target Name="MoveXmlTobundle" AfterTargets="AfterBuild">
|
2025-04-24 20:56:44 +08:00
|
|
|
|
--><!-- 将xml文件移动到bundle文件夹中(在启动调试器之前)。 --><!--
|
2024-09-22 11:05:41 +08:00
|
|
|
|
<Message Importance="high" Text="将xml文件移动到bundle文件夹中" />
|
|
|
|
|
|
<ItemGroup>
|
|
|
|
|
|
<XMLFile Include="$(OutputPath)\..\**\PackageContents.xml" />
|
|
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
<Move SourceFiles="@(XMLFile)" DestinationFolder="$(OutputPath)\..\..\$(AssemblyName).bundle" OverwriteReadOnlyFiles="true" />
|
2025-04-24 20:56:44 +08:00
|
|
|
|
</Target>-->
|
|
|
|
|
|
<Target Name="MoveFamilyFiles" AfterTargets="AfterBuild" Condition="$(RevitVersion)!='2018'">
|
2024-09-22 11:05:41 +08:00
|
|
|
|
<!-- 将族文件移动到输出目录中(在启动调试器之前)。 -->
|
|
|
|
|
|
<Message Importance="high" Text="将族文件移动到输出目录对应版本的Libraries文件夹中" />
|
|
|
|
|
|
<ItemGroup>
|
|
|
|
|
|
<FilesToMove Include="..\$(AssemblyName)\Libraries\$(RevitVersion)\**\*.*" />
|
|
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
<Copy SourceFiles="@(FilesToMove)" DestinationFolder="$(OutputPath)Libraries\%(RecursiveDir)" SkipUnchangedFiles="True" />
|
|
|
|
|
|
</Target>
|
2026-01-01 10:02:59 +08:00
|
|
|
|
|
|
|
|
|
|
<Target Name="InnoSetupPackage" AfterTargets="Build" Condition="'$(Configuration)' == 'Release' AND '$(TargetFramework)' == '$(PackagerTriggerFramework)'">
|
|
|
|
|
|
|
|
|
|
|
|
<Message Text="------------------------------------------------" Importance="high" />
|
|
|
|
|
|
<Message Text="[InnoSetup] 所有框架编译完成,开始执行最终打包..." Importance="high" />
|
|
|
|
|
|
<Message Text="[InnoSetup] 触发框架: $(TargetFramework)" Importance="high" />
|
|
|
|
|
|
<Warning Text="未找到 Inno Setup 编译器,跳过打包。" Condition="!Exists($(InnoSetupCompiler))" />
|
|
|
|
|
|
<Exec Command=""$(InnoSetupCompiler)" /dAppVersion="$(AssemblyVersion)" /Q "$(InnoScriptPath)"" />
|
|
|
|
|
|
|
|
|
|
|
|
<Message Text="[InnoSetup] 打包完成!" Importance="high" />
|
|
|
|
|
|
<Message Text="------------------------------------------------" Importance="high" />
|
|
|
|
|
|
</Target>
|
|
|
|
|
|
</Project>
|