|
1 | | -<?xml version="1.0" encoding="utf-8"?> |
2 | | -<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| 1 | +<Project Sdk="Microsoft.NET.Sdk"> |
| 2 | + |
3 | 3 | <PropertyGroup> |
4 | | - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
5 | | - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
6 | | - <ProductVersion>8.0.30703</ProductVersion> |
7 | | - <SchemaVersion>2.0</SchemaVersion> |
8 | | - <ProjectGuid>{F1152D68-346B-4F48-8DB7-BE67B5CB1F49}</ProjectGuid> |
9 | | - <OutputType>Library</OutputType> |
10 | | - <AppDesignerFolder>Properties</AppDesignerFolder> |
11 | | - <RootNamespace>PythonConsoleControl</RootNamespace> |
12 | | - <AssemblyName>PythonConsoleControl</AssemblyName> |
13 | | - <FileAlignment>512</FileAlignment> |
14 | | - <PublishUrl>publish\</PublishUrl> |
15 | | - <Install>true</Install> |
16 | | - <InstallFrom>Disk</InstallFrom> |
17 | | - <UpdateEnabled>false</UpdateEnabled> |
18 | | - <UpdateMode>Foreground</UpdateMode> |
19 | | - <UpdateInterval>7</UpdateInterval> |
20 | | - <UpdateIntervalUnits>Days</UpdateIntervalUnits> |
21 | | - <UpdatePeriodically>false</UpdatePeriodically> |
22 | | - <UpdateRequired>false</UpdateRequired> |
23 | | - <MapFileExtensions>true</MapFileExtensions> |
24 | | - <ApplicationRevision>0</ApplicationRevision> |
25 | | - <ApplicationVersion>1.0.0.%2a</ApplicationVersion> |
26 | | - <IsWebBootstrapper>false</IsWebBootstrapper> |
27 | | - <UseApplicationTrust>false</UseApplicationTrust> |
28 | | - <BootstrapperEnabled>true</BootstrapperEnabled> |
29 | | - <TargetFrameworkProfile /> |
30 | | - <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> |
| 4 | + <Configurations>Debug;Debug One;Release</Configurations> |
31 | 5 | </PropertyGroup> |
32 | | - <PropertyGroup Condition="'$(Configuration)' == 'Debug 2014'"> |
33 | | - <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> |
34 | | - </PropertyGroup> |
35 | | - <PropertyGroup Condition="'$(Configuration)' == 'Debug 2015'"> |
36 | | - <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> |
| 6 | + |
| 7 | + <PropertyGroup> |
| 8 | + <!-- Please remove the targets you don't need in order |
| 9 | + to exclude Revit versions your add-in won't support |
| 10 | + use the list below for matching Revit version with .NET target |
| 11 | + 2014 | net40 |
| 12 | + 2015 | net45 |
| 13 | + 2016 | net451 |
| 14 | + 2017 | net452 |
| 15 | + 2018 | net46 |
| 16 | + 2019 | net47 |
| 17 | + 2020 | net471 |
| 18 | + For example you can exclude Revit 2014, by simply removing net40 target belows |
| 19 | + --> |
| 20 | + <TargetFrameworks>net40;net45;net451;net452;net46;net47;net471</TargetFrameworks> |
| 21 | + <RuntimeIdentifiers>win</RuntimeIdentifiers> |
| 22 | + <PublishSingleFile>true</PublishSingleFile> |
37 | 23 | </PropertyGroup> |
38 | | - <PropertyGroup Condition="'$(Configuration)' == 'Debug 2016'"> |
39 | | - <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> |
| 24 | + |
| 25 | + <PropertyGroup Condition="'$(Configuration)' == 'Debug One'"> |
| 26 | + <!-- You could debug just ONE addin version, |
| 27 | + instead of building all the versions above. |
| 28 | + Just put ONE target from the list above |
| 29 | + e.g. if you want to debug ONLY Revit 2019, |
| 30 | + put net47 below and switch to 'Debug One' configuration |
| 31 | + --> |
| 32 | + <TargetFrameworks>net40</TargetFrameworks> |
40 | 33 | </PropertyGroup> |
41 | | - <PropertyGroup Condition="'$(Configuration)' == 'Debug 2017'"> |
42 | | - <TargetFrameworkVersion>v4.6</TargetFrameworkVersion> |
| 34 | + |
| 35 | + <PropertyGroup Condition=" '$(TargetFramework)' == 'net40' "> |
| 36 | + <RevitVersion>2014</RevitVersion> |
43 | 37 | </PropertyGroup> |
44 | | - <PropertyGroup Condition="'$(Configuration)' == 'Debug 2018'"> |
45 | | - <TargetFrameworkVersion>v4.6</TargetFrameworkVersion> |
| 38 | + <PropertyGroup Condition=" '$(TargetFramework)' == 'net45' "> |
| 39 | + <RevitVersion>2015</RevitVersion> |
46 | 40 | </PropertyGroup> |
47 | | - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
48 | | - <DebugSymbols>true</DebugSymbols> |
49 | | - <DebugType>full</DebugType> |
50 | | - <Optimize>false</Optimize> |
51 | | - <OutputPath>..\..\bin\</OutputPath> |
52 | | - <DefineConstants>DEBUG;TRACE</DefineConstants> |
53 | | - <ErrorReport>prompt</ErrorReport> |
54 | | - <WarningLevel>4</WarningLevel> |
55 | | - <Prefer32Bit>false</Prefer32Bit> |
| 41 | + <PropertyGroup Condition=" '$(TargetFramework)' == 'net451' "> |
| 42 | + <RevitVersion>2016</RevitVersion> |
56 | 43 | </PropertyGroup> |
57 | | - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
58 | | - <DebugType>pdbonly</DebugType> |
59 | | - <Optimize>true</Optimize> |
60 | | - <OutputPath>bin\Release\</OutputPath> |
61 | | - <DefineConstants>TRACE</DefineConstants> |
62 | | - <ErrorReport>prompt</ErrorReport> |
63 | | - <WarningLevel>4</WarningLevel> |
64 | | - <Prefer32Bit>false</Prefer32Bit> |
65 | | - </PropertyGroup> |
66 | | - <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug 2015|AnyCPU'"> |
67 | | - <DebugSymbols>true</DebugSymbols> |
68 | | - <OutputPath>bin\Debug 2015\</OutputPath> |
69 | | - <DefineConstants>DEBUG;TRACE</DefineConstants> |
70 | | - <DebugType>full</DebugType> |
71 | | - <PlatformTarget>AnyCPU</PlatformTarget> |
72 | | - <ErrorReport>prompt</ErrorReport> |
73 | | - <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> |
74 | | - <Prefer32Bit>false</Prefer32Bit> |
| 44 | + <PropertyGroup Condition=" '$(TargetFramework)' == 'net452' "> |
| 45 | + <RevitVersion>2017</RevitVersion> |
75 | 46 | </PropertyGroup> |
76 | | - <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug 2016|AnyCPU'"> |
77 | | - <DebugSymbols>true</DebugSymbols> |
78 | | - <OutputPath>bin\Debug 2016\</OutputPath> |
79 | | - <DefineConstants>DEBUG;TRACE</DefineConstants> |
80 | | - <DebugType>full</DebugType> |
81 | | - <PlatformTarget>AnyCPU</PlatformTarget> |
82 | | - <ErrorReport>prompt</ErrorReport> |
83 | | - <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> |
84 | | - <Prefer32Bit>false</Prefer32Bit> |
| 47 | + <PropertyGroup Condition=" '$(TargetFramework)' == 'net46' "> |
| 48 | + <RevitVersion>2018</RevitVersion> |
85 | 49 | </PropertyGroup> |
86 | | - <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug 2017|AnyCPU'"> |
87 | | - <DebugSymbols>true</DebugSymbols> |
88 | | - <OutputPath>bin\Debug 2017\</OutputPath> |
89 | | - <DefineConstants>DEBUG;TRACE</DefineConstants> |
90 | | - <DebugType>full</DebugType> |
91 | | - <PlatformTarget>AnyCPU</PlatformTarget> |
92 | | - <ErrorReport>prompt</ErrorReport> |
93 | | - <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> |
94 | | - <Prefer32Bit>false</Prefer32Bit> |
| 50 | + <PropertyGroup Condition=" '$(TargetFramework)' == 'net47' "> |
| 51 | + <RevitVersion>2019</RevitVersion> |
95 | 52 | </PropertyGroup> |
96 | | - <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug 2018|AnyCPU'"> |
97 | | - <DebugSymbols>true</DebugSymbols> |
98 | | - <OutputPath>bin\Debug 2018\</OutputPath> |
99 | | - <DefineConstants>DEBUG;TRACE</DefineConstants> |
100 | | - <DebugType>full</DebugType> |
101 | | - <PlatformTarget>AnyCPU</PlatformTarget> |
102 | | - <ErrorReport>prompt</ErrorReport> |
103 | | - <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> |
104 | | - <Prefer32Bit>false</Prefer32Bit> |
| 53 | + <PropertyGroup Condition=" '$(TargetFramework)' == 'net471' "> |
| 54 | + <RevitVersion>2020</RevitVersion> |
105 | 55 | </PropertyGroup> |
106 | | - <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug 2014|AnyCPU'"> |
107 | | - <Prefer32Bit>false</Prefer32Bit> |
| 56 | + |
| 57 | + <PropertyGroup> |
| 58 | + <!-- Forcibly set platform to 'x64' and ignore architecture-related problems --> |
| 59 | + <PlatformTarget>x64</PlatformTarget> |
| 60 | + <Platforms>x64</Platforms> |
| 61 | + <ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch> |
| 62 | + |
| 63 | + <!-- Force the project to use the legacy debugger engine --> |
| 64 | + <DebugEngines>{351668CC-8477-4fbf-BFE3-5F1006E4DB1F}</DebugEngines> |
| 65 | + |
| 66 | + <!-- Invert the behavior of new .csproj format - exclude files by default --> |
| 67 | + <EnableDefaultCompileItems>false</EnableDefaultCompileItems> |
| 68 | + <EnableDefaultItems>false</EnableDefaultItems> |
| 69 | + |
| 70 | + <!-- Define handy symbols to use in the code in order to accommodate different Revit versions, |
| 71 | + e.g. by wrapping legacy / deprecated API calls with #if REVIT2014 | REVIT2015 --> |
| 72 | + <DefineConstants>REVIT$(RevitVersion);WINFORMS</DefineConstants> |
| 73 | + <PreprocessorDefinitions>$(DefineConstants)</PreprocessorDefinitions> |
| 74 | + |
| 75 | + <!-- Multiple targets can cause obj folder locking by concurrent builds --> |
| 76 | + <BuildInParallel>false</BuildInParallel> |
| 77 | + |
| 78 | + <!-- Override 'OutputPath' to Debug/Release + Revit version --> |
| 79 | + <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> |
| 80 | + <OutputPath>..\bin\$(Configuration)\$(RevitVersion)</OutputPath> |
108 | 81 | </PropertyGroup> |
109 | | - <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug 2019|AnyCPU'"> |
110 | | - <DebugSymbols>true</DebugSymbols> |
111 | | - <OutputPath>bin\Debug 2019\</OutputPath> |
112 | | - <DefineConstants>DEBUG;TRACE</DefineConstants> |
| 82 | + |
| 83 | + <PropertyGroup Condition="$(Configuration.Contains('Debug'))"> |
| 84 | + <DefineConstants>$(DefineConstants);DEBUG</DefineConstants> |
113 | 85 | <DebugType>full</DebugType> |
114 | | - <PlatformTarget>AnyCPU</PlatformTarget> |
115 | | - <ErrorReport>prompt</ErrorReport> |
116 | | - <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> |
| 86 | + <OutputPath></OutputPath> |
117 | 87 | </PropertyGroup> |
| 88 | + |
| 89 | + |
| 90 | + <ItemGroup Condition="$(DefineConstants.Contains('WINFORMS'))"> |
| 91 | + <Reference Include="System.Windows.Forms" /> |
| 92 | + </ItemGroup> |
| 93 | + |
| 94 | + <ItemGroup> |
| 95 | + <PackageReference Include="Autodesk.Revit.SDK" Version="2014.*" Condition=" '$(RevitVersion)' == '2014' " PrivateAssets="All" /> |
| 96 | + <PackageReference Include="Autodesk.Revit.SDK" Version="2015.*" Condition=" '$(RevitVersion)' == '2015' " PrivateAssets="All" /> |
| 97 | + <PackageReference Include="Autodesk.Revit.SDK" Version="2016.*" Condition=" '$(RevitVersion)' == '2016' " PrivateAssets="All" /> |
| 98 | + <PackageReference Include="Autodesk.Revit.SDK" Version="2017.*" Condition=" '$(RevitVersion)' == '2017' " PrivateAssets="All" /> |
| 99 | + <PackageReference Include="Autodesk.Revit.SDK" Version="2018.*" Condition=" '$(RevitVersion)' == '2018' " PrivateAssets="All" /> |
| 100 | + <PackageReference Include="Autodesk.Revit.SDK" Version="2019.*" Condition=" '$(RevitVersion)' == '2019' " PrivateAssets="All" /> |
| 101 | + <PackageReference Include="Autodesk.Revit.SDK" Version="2020.1.0" Condition=" '$(RevitVersion)' == '2020' " PrivateAssets="All" /> |
| 102 | + <PackageReference Include="AvalonEdit" Version="6.0.1"/> |
| 103 | + |
| 104 | + </ItemGroup> |
| 105 | + |
| 106 | + <Target Name="PreventRevitSDKCopyLocal" AfterTargets="ResolveReferences"> |
| 107 | + <ItemGroup> |
| 108 | + <!-- A temporary fix for Revit SDK files being copied to the output folder --> |
| 109 | + <ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalPaths)" Condition="'%(ReferenceCopyLocalPaths.NuGetPackageId)' == 'Autodesk.Revit.SDK'" /> |
| 110 | + </ItemGroup> |
| 111 | + </Target> |
| 112 | + |
118 | 113 | <ItemGroup> |
119 | | - <Reference Include="ICSharpCode.AvalonEdit, Version=5.0.3.0, Culture=neutral, PublicKeyToken=9cc39be672370310, processorArchitecture=MSIL"> |
120 | | - <HintPath>..\packages\AvalonEdit.5.0.4\lib\Net40\ICSharpCode.AvalonEdit.dll</HintPath> |
121 | | - </Reference> |
122 | 114 | <Reference Include="IronPython"> |
123 | 115 | <HintPath>..\RequiredLibraries\IronPython.dll</HintPath> |
124 | 116 | </Reference> |
|
134 | 126 | <Reference Include="Microsoft.Scripting.Metadata"> |
135 | 127 | <HintPath>..\RequiredLibraries\Microsoft.Scripting.Metadata.dll</HintPath> |
136 | 128 | </Reference> |
| 129 | + </ItemGroup> |
| 130 | + |
| 131 | + |
| 132 | + <ItemGroup> |
137 | 133 | <Reference Include="PresentationCore" /> |
138 | 134 | <Reference Include="PresentationFramework" /> |
139 | 135 | <Reference Include="System" /> |
|
150 | 146 | <Compile Include="PythonCompletionData.cs" /> |
151 | 147 | <Compile Include="PythonConsoleCompletionDataProvider.cs" /> |
152 | 148 | <Compile Include="PythonConsole.cs" /> |
153 | | - <Compile Include="Properties\AssemblyInfo.cs" /> |
154 | 149 | <Compile Include="PythonConsoleCompletionWindow.cs" /> |
155 | 150 | <Compile Include="PythonConsoleControl.xaml.cs"> |
156 | 151 | <DependentUpon>PythonConsoleControl.xaml</DependentUpon> |
|
172 | 167 | <EmbeddedResource Include="Resources\Python.xshd" /> |
173 | 168 | </ItemGroup> |
174 | 169 | <ItemGroup> |
175 | | - <BootstrapperPackage Include=".NETFramework,Version=v4.0"> |
176 | | - <Visible>False</Visible> |
177 | | - <ProductName>Microsoft .NET Framework 4 %28x86 and x64%29</ProductName> |
178 | | - <Install>true</Install> |
179 | | - </BootstrapperPackage> |
180 | | - <BootstrapperPackage Include="Microsoft.Net.Client.3.5"> |
181 | | - <Visible>False</Visible> |
182 | | - <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName> |
183 | | - <Install>false</Install> |
184 | | - </BootstrapperPackage> |
185 | | - <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1"> |
186 | | - <Visible>False</Visible> |
187 | | - <ProductName>.NET Framework 3.5 SP1</ProductName> |
188 | | - <Install>false</Install> |
189 | | - </BootstrapperPackage> |
190 | | - <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1"> |
191 | | - <Visible>False</Visible> |
192 | | - <ProductName>Windows Installer 3.1</ProductName> |
193 | | - <Install>true</Install> |
194 | | - </BootstrapperPackage> |
195 | | - </ItemGroup> |
196 | | - <ItemGroup> |
197 | | - <None Include="packages.config" /> |
| 170 | + <Folder Include="Properties\" /> |
198 | 171 | </ItemGroup> |
| 172 | + |
| 173 | + <!-- |
199 | 174 | <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
200 | 175 | <PropertyGroup> |
201 | 176 | <PostBuildEvent> |
202 | 177 | </PostBuildEvent> |
203 | | - </PropertyGroup> |
| 178 | + </PropertyGroup>--> |
204 | 179 | <!-- To modify your build process, add your task inside one of the targets below and uncomment it. |
205 | 180 | Other similar extension points exist, see Microsoft.Common.targets. |
206 | 181 | <Target Name="BeforeBuild"> |
|
0 commit comments