Skip to content

Commit ed4ef05

Browse files
committed
upgrade to net6
1 parent 989f67c commit ed4ef05

File tree

4 files changed

+51
-282
lines changed

4 files changed

+51
-282
lines changed
Lines changed: 20 additions & 125 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,7 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
1+
<Project Sdk="Microsoft.NET.Sdk">
32
<PropertyGroup>
4-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6-
<ProductVersion>9.0.30729</ProductVersion>
7-
<SchemaVersion>2.0</SchemaVersion>
8-
<ProjectGuid>{7E37F14E-D840-42F8-8CA6-90FFC5497972}</ProjectGuid>
3+
<TargetFramework>net48</TargetFramework>
94
<OutputType>Library</OutputType>
10-
<AppDesignerFolder>Properties</AppDesignerFolder>
11-
<RootNamespace>CADPythonShell</RootNamespace>
12-
<AssemblyName>CADPythonShell</AssemblyName>
13-
<FileAlignment>512</FileAlignment>
14-
<FileUpgradeFlags>
15-
</FileUpgradeFlags>
16-
<UpgradeBackupLocation>
17-
</UpgradeBackupLocation>
18-
<OldToolsVersion>3.5</OldToolsVersion>
195
<PublishUrl>publish\</PublishUrl>
206
<Install>true</Install>
217
<InstallFrom>Disk</InstallFrom>
@@ -31,62 +17,36 @@
3117
<IsWebBootstrapper>false</IsWebBootstrapper>
3218
<UseApplicationTrust>false</UseApplicationTrust>
3319
<BootstrapperEnabled>true</BootstrapperEnabled>
34-
<TargetFrameworkProfile />
35-
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
36-
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
3720
<NoStdLib>False</NoStdLib>
38-
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
3921
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
40-
<WarningLevel>4</WarningLevel>
4122
<NoWin32Manifest>False</NoWin32Manifest>
4223
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
43-
<OutputPath>bin\$(Configuration)\</OutputPath>
4424
<LangVersion>latest</LangVersion>
25+
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
26+
<UseWindowsForms>true</UseWindowsForms>
27+
<UseWPF>true</UseWPF>
28+
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
4529
</PropertyGroup>
4630
<PropertyGroup>
47-
<!-- see: http://thebuildingcoder.typepad.com/blog/2013/06/processor-architecture-mismatch-warning.html -->
4831
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
4932
None
5033
</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
5134
</PropertyGroup>
52-
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
53-
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
54-
<DefineConstants>DEBUG;TRACE</DefineConstants>
55-
<DebugType>Full</DebugType>
56-
</PropertyGroup>
5735
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
58-
<DebugSymbols>true</DebugSymbols>
59-
<PlatformTarget>AnyCPU</PlatformTarget>
60-
<ErrorReport>prompt</ErrorReport>
6136
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
6237
</PropertyGroup>
63-
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
64-
<Optimize>False</Optimize>
65-
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
66-
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
67-
</PropertyGroup>
6838
<PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
6939
<BaseAddress>4194304</BaseAddress>
7040
<RegisterForComInterop>False</RegisterForComInterop>
7141
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
72-
<Prefer32Bit />
7342
</PropertyGroup>
7443
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
75-
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
76-
<DefineConstants>TRACE</DefineConstants>
7744
<DebugType>None</DebugType>
7845
</PropertyGroup>
7946
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
8047
<DebugSymbols>true</DebugSymbols>
81-
<PlatformTarget>AnyCPU</PlatformTarget>
82-
<ErrorReport>prompt</ErrorReport>
8348
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
8449
</PropertyGroup>
85-
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
86-
<Optimize>True</Optimize>
87-
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
88-
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
89-
</PropertyGroup>
9050
<ItemGroup>
9151
<Reference Include="accoremgd">
9252
<HintPath>C:\Program Files\Autodesk\AutoCAD 2022\accoremgd.dll</HintPath>
@@ -117,7 +77,6 @@
11777
<SpecificVersion>False</SpecificVersion>
11878
<HintPath>..\RefrencedAssemblies\IronPython.Wpf.dll</HintPath>
11979
</Reference>
120-
<Reference Include="Microsoft.CSharp" />
12180
<Reference Include="Microsoft.Dynamic, Version=1.1.0.20, Culture=neutral, PublicKeyToken=7f709c5b713576e1, processorArchitecture=MSIL">
12281
<SpecificVersion>False</SpecificVersion>
12382
<HintPath>..\RefrencedAssemblies\Microsoft.Dynamic.dll</HintPath>
@@ -130,67 +89,21 @@
13089
<SpecificVersion>False</SpecificVersion>
13190
<HintPath>..\RefrencedAssemblies\Microsoft.Scripting.Metadata.dll</HintPath>
13291
</Reference>
133-
<Reference Include="PresentationCore" />
134-
<Reference Include="PresentationFramework" />
135-
<Reference Include="System" />
136-
<Reference Include="System.Core">
92+
<Reference Update="System.Core">
13793
<RequiredTargetFramework>3.5</RequiredTargetFramework>
13894
</Reference>
139-
<Reference Include="System.Drawing" />
14095
<Reference Include="System.Windows.Controls.WpfPropertyGrid, Version=2010.11.10.0, Culture=neutral, PublicKeyToken=be4b71144cd8a3e5, processorArchitecture=MSIL">
14196
<SpecificVersion>False</SpecificVersion>
14297
<HintPath>..\RefrencedAssemblies\System.Windows.Controls.WpfPropertyGrid.dll</HintPath>
14398
</Reference>
144-
<Reference Include="System.Windows.Forms" />
145-
<Reference Include="System.Xaml" />
146-
<Reference Include="System.Xml.Linq">
147-
<RequiredTargetFramework>3.5</RequiredTargetFramework>
148-
</Reference>
149-
<Reference Include="System.Data.DataSetExtensions">
99+
<Reference Update="System.Xml.Linq">
150100
<RequiredTargetFramework>3.5</RequiredTargetFramework>
151101
</Reference>
152-
<Reference Include="System.Data" />
153-
<Reference Include="System.Xml" />
154-
<Reference Include="WindowsBase" />
155102
<Reference Include="WPG, Version=2.0.3997.38860, Culture=neutral, processorArchitecture=MSIL">
156103
<SpecificVersion>False</SpecificVersion>
157104
<HintPath>..\RefrencedAssemblies\WPG.dll</HintPath>
158105
</Reference>
159106
</ItemGroup>
160-
<ItemGroup>
161-
<Compile Include="CommandLoaderBase.cs" />
162-
<Compile Include="CompletionToolTip.cs" />
163-
<Compile Include="ConfigureCommand.cs" />
164-
<Compile Include="ConfigureCommandsForm.cs">
165-
<SubType>Form</SubType>
166-
</Compile>
167-
<Compile Include="ConfigureCommandsForm.Designer.cs">
168-
<DependentUpon>ConfigureCommandsForm.cs</DependentUpon>
169-
</Compile>
170-
<Compile Include="ConsoleOptions.cs" />
171-
<Compile Include="IronPythonConsole.xaml.cs">
172-
<DependentUpon>IronPythonConsole.xaml</DependentUpon>
173-
</Compile>
174-
<Compile Include="IronPythonConsoleApp.cs" />
175-
<Compile Include="IronPythonConsoleCommand.cs" />
176-
<Compile Include="Properties\AssemblyInfo.cs" />
177-
<Compile Include="Properties\Resources.Designer.cs">
178-
<AutoGen>True</AutoGen>
179-
<DesignTime>True</DesignTime>
180-
<DependentUpon>Resources.resx</DependentUpon>
181-
</Compile>
182-
<Compile Include="CADPythonShellApplication.cs" />
183-
<Compile Include="RelayCommand.cs" />
184-
</ItemGroup>
185-
<ItemGroup>
186-
<EmbeddedResource Include="ConfigureCommandsForm.resx">
187-
<DependentUpon>ConfigureCommandsForm.cs</DependentUpon>
188-
</EmbeddedResource>
189-
<EmbeddedResource Include="Properties\Resources.resx">
190-
<Generator>ResXFileCodeGenerator</Generator>
191-
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
192-
</EmbeddedResource>
193-
</ItemGroup>
194107
<ItemGroup>
195108
<Resource Include="Images\Number.png" />
196109
<Resource Include="Images\Paragraph.png" />
@@ -208,19 +121,18 @@
208121
<Content Include="init.py">
209122
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
210123
</Content>
211-
<None Include="Icons\Python-16.ico">
124+
<None Update="Icons\Python-16.ico">
212125
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
213126
</None>
214-
<None Include="Icons\Python-32.ico">
127+
<None Update="Icons\Python-32.ico">
215128
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
216129
</None>
217-
<None Include="Icons\Settings-16.ico">
130+
<None Update="Icons\Settings-16.ico">
218131
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
219132
</None>
220-
<None Include="Icons\Settings-32.ico">
133+
<None Update="Icons\Settings-32.ico">
221134
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
222135
</None>
223-
<None Include="Resources\ipy.ico" />
224136
<Resource Include="Images\Copy.png" />
225137
<Resource Include="Images\Cut.png" />
226138
<Resource Include="Images\Delete.png" />
@@ -262,38 +174,21 @@
262174
</BootstrapperPackage>
263175
</ItemGroup>
264176
<ItemGroup>
265-
<Page Include="IronPythonConsole.xaml">
266-
<SubType>Designer</SubType>
267-
<Generator>MSBuild:Compile</Generator>
268-
</Page>
177+
<ProjectReference Include="..\CADRuntime\CADRuntime.csproj" />
178+
<ProjectReference Include="..\PythonConsoleControl\PythonConsoleControl.csproj" />
269179
</ItemGroup>
270180
<ItemGroup>
271-
<ProjectReference Include="..\CADRuntime\CADRuntime.csproj">
272-
<Project>{c8446636-c663-409f-82d0-72c0d55bba1c}</Project>
273-
<Name>CADRuntime</Name>
274-
</ProjectReference>
275-
<ProjectReference Include="..\PythonConsoleControl\PythonConsoleControl.csproj">
276-
<Project>{f1152d68-346b-4f48-8db7-be67b5cb1f49}</Project>
277-
<Name>PythonConsoleControl</Name>
278-
</ProjectReference>
181+
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
182+
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
183+
<PackageReference Include="Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers" Version="0.3.310801">
184+
<PrivateAssets>all</PrivateAssets>
185+
</PackageReference>
279186
</ItemGroup>
280-
<ItemGroup />
281-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
282-
<PropertyGroup>
283-
<PreBuildEvent>
284-
</PreBuildEvent>
285-
</PropertyGroup>
187+
<PropertyGroup />
286188
<PropertyGroup>
287189
<PostBuildEvent>set bundle="C:\ProgramData\Autodesk\ApplicationPlugins\CADPythonShell.bundle\"
288190
if not exist "%25bundle%25" mkdir "%25bundle%25"
289191
xcopy "$(TargetDir)*.*" "%25bundle%25" /Y /I /E /R
290192
xcopy "$(SolutionDir)PackageContents.xml" "%25bundle%25" /Y /R</PostBuildEvent>
291193
</PropertyGroup>
292-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
293-
Other similar extension points exist, see Microsoft.Common.targets.
294-
<Target Name="BeforeBuild">
295-
</Target>
296-
<Target Name="AfterBuild">
297-
</Target>
298-
-->
299194
</Project>

CADRuntime/CADRuntime.csproj

Lines changed: 16 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,36 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
1+
<Project Sdk="Microsoft.NET.Sdk">
32
<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>{C8446636-C663-409F-82D0-72C0D55BBA1C}</ProjectGuid>
3+
<TargetFramework>net48</TargetFramework>
94
<OutputType>Library</OutputType>
10-
<AppDesignerFolder>Properties</AppDesignerFolder>
11-
<RootNamespace>CADRuntime</RootNamespace>
12-
<AssemblyName>CADRuntime</AssemblyName>
13-
<FileAlignment>512</FileAlignment>
14-
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
15-
<TargetFrameworkProfile />
165
<NoWin32Manifest>False</NoWin32Manifest>
17-
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
186
<NoStdLib>False</NoStdLib>
19-
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
207
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
21-
<WarningLevel>4</WarningLevel>
228
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
23-
<OutputPath>bin\$(Configuration)\</OutputPath>
249
<LangVersion>latest</LangVersion>
10+
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
11+
<UseWindowsForms>true</UseWindowsForms>
12+
<UseWPF>true</UseWPF>
13+
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
2514
</PropertyGroup>
2615
<PropertyGroup>
27-
<!-- see: http://thebuildingcoder.typepad.com/blog/2013/06/processor-architecture-mismatch-warning.html -->
2816
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
2917
None
3018
</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
3119
</PropertyGroup>
32-
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
33-
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
34-
<DefineConstants>DEBUG;TRACE</DefineConstants>
35-
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
36-
<DebugType>Full</DebugType>
37-
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
38-
<Optimize>False</Optimize>
39-
</PropertyGroup>
4020
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
41-
<DebugSymbols>true</DebugSymbols>
42-
<PlatformTarget>AnyCPU</PlatformTarget>
43-
<ErrorReport>prompt</ErrorReport>
4421
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
45-
<Prefer32Bit />
4622
</PropertyGroup>
4723
<PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
4824
<BaseAddress>4194304</BaseAddress>
4925
<RegisterForComInterop>False</RegisterForComInterop>
5026
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
5127
</PropertyGroup>
5228
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
53-
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
54-
<DefineConstants>TRACE</DefineConstants>
55-
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
5629
<DebugType>None</DebugType>
57-
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
58-
<Optimize>True</Optimize>
5930
</PropertyGroup>
6031
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
6132
<DebugSymbols>true</DebugSymbols>
62-
<PlatformTarget>AnyCPU</PlatformTarget>
63-
<ErrorReport>prompt</ErrorReport>
6433
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
65-
<Prefer32Bit />
6634
</PropertyGroup>
6735
<ItemGroup>
6836
<Reference Include="accoremgd">
@@ -91,7 +59,6 @@
9159
<SpecificVersion>False</SpecificVersion>
9260
<HintPath>..\RefrencedAssemblies\IronPython.Wpf.dll</HintPath>
9361
</Reference>
94-
<Reference Include="Microsoft.CSharp" />
9562
<Reference Include="Microsoft.Dynamic, Version=1.1.0.20, Culture=neutral, PublicKeyToken=7f709c5b713576e1, processorArchitecture=MSIL">
9663
<SpecificVersion>False</SpecificVersion>
9764
<HintPath>..\RefrencedAssemblies\Microsoft.Dynamic.dll</HintPath>
@@ -104,61 +71,33 @@
10471
<SpecificVersion>False</SpecificVersion>
10572
<HintPath>..\RefrencedAssemblies\Microsoft.Scripting.Metadata.dll</HintPath>
10673
</Reference>
107-
<Reference Include="PresentationCore" />
108-
<Reference Include="System" />
109-
<Reference Include="System.Core" />
110-
<Reference Include="System.Drawing" />
11174
<Reference Include="System.Windows.Controls.WpfPropertyGrid, Version=2010.11.10.0, Culture=neutral, PublicKeyToken=be4b71144cd8a3e5, processorArchitecture=MSIL">
11275
<SpecificVersion>False</SpecificVersion>
11376
<HintPath>..\RefrencedAssemblies\System.Windows.Controls.WpfPropertyGrid.dll</HintPath>
11477
</Reference>
115-
<Reference Include="System.Windows.Forms" />
116-
<Reference Include="System.Xaml" />
117-
<Reference Include="System.Xml.Linq" />
118-
<Reference Include="System.Data.DataSetExtensions" />
119-
<Reference Include="System.Data" />
120-
<Reference Include="System.Xml" />
121-
<Reference Include="WindowsBase" />
12278
<Reference Include="WPG, Version=2.0.3997.38860, Culture=neutral, processorArchitecture=MSIL">
12379
<SpecificVersion>False</SpecificVersion>
12480
<HintPath>..\RefrencedAssemblies\WPG.dll</HintPath>
12581
</Reference>
12682
</ItemGroup>
12783
<ItemGroup>
128-
<Compile Include="INpsConfig.cs" />
129-
<Compile Include="Properties\AssemblyInfo.cs" />
130-
<Compile Include="NpsConfig.cs" />
131-
<Compile Include="ScriptExecutor.cs" />
132-
<Compile Include="ScriptOutput.cs">
133-
<SubType>Form</SubType>
134-
</Compile>
135-
<Compile Include="ScriptOutput.Designer.cs">
136-
<DependentUpon>ScriptOutput.cs</DependentUpon>
137-
</Compile>
138-
<Compile Include="ScriptOutputStream.cs" />
139-
<Compile Include="SettingsDictionary.cs" />
84+
<EmbeddedResource Include="Resources\PythonScript16x16.png" />
14085
</ItemGroup>
14186
<ItemGroup>
142-
<EmbeddedResource Include="ScriptOutput.resx">
143-
<DependentUpon>ScriptOutput.cs</DependentUpon>
144-
<SubType>Designer</SubType>
145-
</EmbeddedResource>
87+
<EmbeddedResource Include="Resources\PythonScript32x32.png" />
14688
</ItemGroup>
14789
<ItemGroup>
148-
<EmbeddedResource Include="Resources\PythonScript16x16.png" />
90+
<EmbeddedResource Include="Resources\python_27_lib.zip" />
14991
</ItemGroup>
15092
<ItemGroup>
151-
<EmbeddedResource Include="Resources\PythonScript32x32.png" />
93+
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
94+
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
95+
<PackageReference Include="Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers" Version="0.3.310801">
96+
<PrivateAssets>all</PrivateAssets>
97+
</PackageReference>
98+
<PackageReference Include="Microsoft.Windows.Compatibility" Version="6.0.0" />
15299
</ItemGroup>
153100
<ItemGroup>
154-
<EmbeddedResource Include="Resources\python_27_lib.zip" />
101+
<Compile Remove="ExternalCommandAssemblyBuilder.cs" />
155102
</ItemGroup>
156-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
157-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
158-
Other similar extension points exist, see Microsoft.Common.targets.
159-
<Target Name="BeforeBuild">
160-
</Target>
161-
<Target Name="AfterBuild">
162-
</Target>
163-
-->
164103
</Project>

0 commit comments

Comments
 (0)