https://www.cnblogs.com/ponus/p/11046624.html#!comments

可以按照上方链接地址访问原作者博客和github

此处按照自己的情况记录了一下项目迁移时遇到的问题

多版本项目搭建

  1. 创建新项目后,打开配置管理器创建多个版本的编译管理器
![在这里插入图片描述](https://cdn.bimath.com/blog/pg/Snipaste_2026-01-04_17-08-45.png)
  1. 卸载原有项目,打开*.csproj文件,按照版本号添加节点,此处可以限定编译的framwork版本,此处的编译可以将’Any CPU’修改为x64
1
2
<PlatformTarget>x64</PlatformTarget>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
  1. 依次将所有版本设置好之后可以继续在<ItemGroup>添加项目初始时需要添加的引用,此处我将Revit的ManagedMC3文件一起放进去了,因为会出现文件版本与RevitAPI版本不一致的情况,如果加密程序集将会报错

  2. 配置文件

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{FBBB7AFE-3CF9-42D9-A95C-0BD2CF3CAC3D}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ReCheckModelAllPlatform</RootNamespace>
<AssemblyName>ReCheckModelAllPlatform</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'R2016|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\R2016\</OutputPath>
<DefineConstants>TRACE;DEBUG;R2016;R2017;R2019;R2020;R2022</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'R2017|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\R2017\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'R2019|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\R2019\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'R2020|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\R2020\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'R2022|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\R2022\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'R2016R|AnyCPU'">
<OutputPath>bin\R2016R\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'R2017R|AnyCPU'">
<OutputPath>bin\R2017R\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'R2019R|AnyCPU'">
<OutputPath>bin\R2019R\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'R2020R|AnyCPU'">
<OutputPath>bin\R2020R\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'R2022R|AnyCPU'">
<OutputPath>bin\R2022R\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
</PropertyGroup>
<ItemGroup Condition="'$(Configuration)' == 'R2016' or '$(Configuration)' == 'R2016R'">
<Reference Include="AdWindows">
<HintPath>..\libs\Revit2016\AdWindows.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="RevitAPI">
<HintPath>..\libs\Revit2016\RevitAPI.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="RevitAPIUI">
<HintPath>..\libs\Revit2016\RevitAPIUI.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ManagedMC3">
<HintPath>..\libs\Revit2016\ManagedMC3.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup Condition="'$(Configuration)' == 'R2017' or '$(Configuration)' == 'R2017R'">
<Reference Include="AdWindows">
<HintPath>..\libs\Revit2017\AdWindows.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="RevitAPI">
<HintPath>..\libs\Revit2017\RevitAPI.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="RevitAPIUI">
<HintPath>..\libs\Revit2017\RevitAPIUI.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ManagedMC3">
<HintPath>..\libs\Revit2017\ManagedMC3.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup Condition="'$(Configuration)' == 'R2019' or '$(Configuration)' == 'R2019R'">
<Reference Include="AdWindows">
<HintPath>..\libs\Revit2019\AdWindows.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="RevitAPI">
<HintPath>..\libs\Revit2019\RevitAPI.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="RevitAPIUI">
<HintPath>..\libs\Revit2019\RevitAPIUI.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ManagedMC3">
<HintPath>..\libs\Revit2019\ManagedMC3.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup Condition="'$(Configuration)' == 'R2020' or '$(Configuration)' == 'R2020R'">
<Reference Include="AdWindows">
<HintPath>..\libs\Revit2020\AdWindows.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="RevitAPI">
<HintPath>..\libs\Revit2020\RevitAPI.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="RevitAPIUI">
<HintPath>..\libs\Revit2020\RevitAPIUI.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ManagedMC3">
<HintPath>..\libs\Revit2020\ManagedMC3.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Reference Include="BouncyCastle.Crypto, Version=1.8.9.0, Culture=neutral, PublicKeyToken=0e99375e54769942, processorArchitecture=MSIL">
<HintPath>..\packages\Portable.BouncyCastle.1.8.9\lib\net40\BouncyCastle.Crypto.dll</HintPath>
</Reference>
<Reference Include="DotNetProjects.Input.Toolkit, Version=6.1.94.0, Culture=neutral, PublicKeyToken=79778c5f2eed289b, processorArchitecture=MSIL">
<HintPath>..\packages\DotNetProjects.WpfToolkit.Input.6.1.94\lib\net40\DotNetProjects.Input.Toolkit.dll</HintPath>
</Reference>
<Reference Include="ICSharpCode.SharpZipLib, Version=1.3.3.11, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
<HintPath>..\packages\SharpZipLib.1.3.3\lib\net45\ICSharpCode.SharpZipLib.dll</HintPath>
</Reference>
<Reference Include="log4net, Version=2.0.14.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.14\lib\net45\log4net.dll</HintPath>
</Reference>
<Reference Include="MySql.Data, Version=8.0.21.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL" />
<Reference Include="NPOI, Version=2.5.6.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
<HintPath>..\packages\NPOI.2.5.6\lib\net45\NPOI.dll</HintPath>
</Reference>
<Reference Include="NPOI.OOXML, Version=2.5.6.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
<HintPath>..\packages\NPOI.2.5.6\lib\net45\NPOI.OOXML.dll</HintPath>
</Reference>
<Reference Include="NPOI.OpenXml4Net, Version=2.5.6.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
<HintPath>..\packages\NPOI.2.5.6\lib\net45\NPOI.OpenXml4Net.dll</HintPath>
</Reference>
<Reference Include="NPOI.OpenXmlFormats, Version=2.5.6.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
<HintPath>..\packages\NPOI.2.5.6\lib\net45\NPOI.OpenXmlFormats.dll</HintPath>
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Web" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xaml" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="Connected Services\ServiceReference1\Reference.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Reference.svcmap</DependentUpon>
</Compile>
<Compile Include="Export\Export.cs" />
<Compile Include="Export\Rule.cs" />
<Compile Include="ExternalWindow\CheckForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="ExternalWindow\CheckForm.Designer.cs">
<DependentUpon>CheckForm.cs</DependentUpon>
</Compile>
<Compile Include="ExternalWindow\ExportExcel.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="ExternalWindow\ExportExcel.Designer.cs">
<DependentUpon>ExportExcel.cs</DependentUpon>
</Compile>
<Compile Include="ExternalWindow\FindForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="ExternalWindow\FindForm.Designer.cs">
<DependentUpon>FindForm.cs</DependentUpon>
</Compile>
<Compile Include="ExternalWindow\MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon>
</Compile>
<Compile Include="ExternalWindow\RegisterForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="ExternalWindow\RegisterForm.Designer.cs">
<DependentUpon>RegisterForm.cs</DependentUpon>
</Compile>
<Compile Include="ExternalWindow\SelectFrom1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="ExternalWindow\SelectFrom1.Designer.cs">
<DependentUpon>SelectFrom1.cs</DependentUpon>
</Compile>
<Compile Include="ExternalWindow\SignIn.xaml.cs">
<DependentUpon>SignIn.xaml</DependentUpon>
</Compile>
<Compile Include="ExternalWindow\TreeViewWindow.xaml.cs">
<DependentUpon>TreeViewWindow.xaml</DependentUpon>
</Compile>
<Compile Include="Log\LogUtility.cs" />
<Compile Include="Properties\Annotations.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="RevitUnit\Command.cs" />
<Compile Include="RevitUnit\ExportApplication.cs" />
<Compile Include="RevitUnit\FindCommand.cs" />
<Compile Include="RevitUnit\RegisterCommand.cs" />
<Compile Include="RevitUnit\SelectElement.cs" />
<Compile Include="RevitUnit\ThisApplication.cs" />
<Compile Include="SQL\MysqlDate.cs" />
<Compile Include="SQL\OperateHelper.cs" />
<Compile Include="SQL\ProjectsService.cs" />
<Compile Include="SQL\SQL_Data.cs" />
<Compile Include="Unit\CaptureClass.cs" />
<Compile Include="Unit\CaptureForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Unit\CaptureForm.Designer.cs">
<DependentUpon>CaptureForm.cs</DependentUpon>
</Compile>
<Compile Include="Unit\CaptureWindowCommand.cs" />
<Compile Include="Unit\DivideProjectNameUnit.cs" />
<Compile Include="Unit\ExternalProperity.cs" />
<Compile Include="Unit\GetNearlyPhaseTime.cs" />
<Compile Include="Unit\LoginInfo.cs" />
<Compile Include="Unit\ReSizeForm.cs" />
<Compile Include="Unit\ScreenBody.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Unit\ScreenBody.Designer.cs">
<DependentUpon>ScreenBody.cs</DependentUpon>
</Compile>
<Compile Include="Unit\TextBoxRemind.cs" />
</ItemGroup>
<ItemGroup>
<Analyzer Include="C:\Program Files %28x86%29\MySQL\MySQL Connector Net 8.0.21\Assemblies\v4.5.2\MySql.Data.dll" />
<Analyzer Include="C:\Program Files %28x86%29\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\PresentationFramework.dll" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="Connected Services\ServiceReference1\MysqlInfo.wsdl" />
<None Include="Connected Services\ServiceReference1\MysqlInfo.xsd">
<SubType>Designer</SubType>
</None>
<None Include="Connected Services\ServiceReference1\MysqlInfo1.xsd">
<SubType>Designer</SubType>
</None>
<None Include="Connected Services\ServiceReference1\MysqlInfo2.xsd">
<SubType>Designer</SubType>
</None>
<None Include="Connected Services\ServiceReference1\MysqlInfo3.xsd">
<SubType>Designer</SubType>
</None>
<None Include="Connected Services\ServiceReference1\MysqlInfo4.xsd">
<SubType>Designer</SubType>
</None>
<None Include="Connected Services\ServiceReference1\MysqlInfo5.xsd">
<SubType>Designer</SubType>
</None>
<None Include="Connected Services\ServiceReference1\MysqlInfo6.xsd">
<SubType>Designer</SubType>
</None>
<None Include="Connected Services\ServiceReference1\MysqlInfo7.xsd">
<SubType>Designer</SubType>
</None>
<None Include="Connected Services\ServiceReference1\MysqlInfo8.xsd">
<SubType>Designer</SubType>
</None>
<None Include="Connected Services\ServiceReference1\ReCheckModelAllPlatform.ServiceReference1.DownFileResult.datasource">
<DependentUpon>Reference.svcmap</DependentUpon>
</None>
<None Include="Connected Services\ServiceReference1\ReCheckModelAllPlatform.ServiceReference1.UpFileResult.datasource">
<DependentUpon>Reference.svcmap</DependentUpon>
</None>
<None Include="note.md" />
<None Include="packages.config" />
<None Include="Properties\DataSources\MySql.Data.MySqlClient.MySqlConnection1.datasource" />
<None Include="Properties\DataSources\System.Data.DataSet.datasource" />
<None Include="TY_RecheckModel.addin" />
</ItemGroup>
<ItemGroup>
<WCFMetadata Include="Connected Services\" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="ExternalWindow\CheckForm.resx">
<DependentUpon>CheckForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="ExternalWindow\ExportExcel.resx">
<DependentUpon>ExportExcel.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="ExternalWindow\FindForm.resx">
<DependentUpon>FindForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="ExternalWindow\RegisterForm.resx">
<DependentUpon>RegisterForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="ExternalWindow\SelectFrom1.resx">
<DependentUpon>SelectFrom1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="Unit\CaptureForm.resx">
<DependentUpon>CaptureForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Unit\ScreenBody.resx">
<DependentUpon>ScreenBody.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Page Include="ExternalWindow\MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ExternalWindow\SignIn.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ExternalWindow\TreeViewWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
</ItemGroup>
<ItemGroup>
<None Include="Connected Services\ServiceReference1\Reference.svcmap">
<Generator>WCF Proxy Generator</Generator>
<LastGenOutput>Reference.cs</LastGenOutput>
</None>
<None Include="Connected Services\ServiceReference1\configuration.svcinfo" />
<None Include="Connected Services\ServiceReference1\configuration91.svcinfo" />
<Content Include="Resource\back.png" />
<Content Include="Resource\Check.png" />
<Content Include="Resource\Check_Large.png" />
<Content Include="Resource\Export.png" />
<Content Include="Resource\Export_Large.png" />
<Content Include="Resource\Filter.png" />
<Content Include="Resource\Filter_Large.png" />
<Content Include="Resource\go.png" />
<Content Include="Resource\Hide.png" />
<Content Include="Resource\Hide_Large.png" />
<Content Include="Resource\Register.png" />
<Content Include="Resource\Register_Large.png" />
<Content Include="Resource\Select.png" />
<Content Include="Resource\Select_Large.png" />
</ItemGroup>
<ItemGroup>
<WCFMetadataStorage Include="Connected Services\ServiceReference1\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
  1. 此时打开项目,切换配置管理器即可按照相应版本载入Revit程序集和按照指定framework版本编译

项目迁移

  1. 因为已经有一个但版本项目,所以将单版本文件copy到文件夹下面,点击图中的图标,在文件夹位置右键包含到项目中即可
![在这里插入图片描述](https://cdn.bimath.com/blog/pg/Snipaste_2026-01-04_17-08-35.png)
2. 项目迁移过来还需要修改命名空间,将其修改为现在项目的命名空间,vs中使用`Ctrl + .`快捷键,我是安装了jetbrains的resharper,使用快捷键`Alt + Enter`. 3. 添加本地资源时报错,无法使用`ReCheckModelAllPlatform.Properties.Resources.*`访问图片,点击属性->资源->图片,将右侧的自定义修改为`interal`即可。
![在这里插入图片描述](https://cdn.bimath.com/blog/pg/Snipaste_2026-01-04_17-08-30.png)