Skip to content

Commit ef96bd6

Browse files
committed
Dual-Target net472 and net8.0
1 parent 27eebb0 commit ef96bd6

File tree

71 files changed

+755
-973
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+755
-973
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ insert_final_newline = true
1212
charset = utf-8-bom
1313

1414
# XML project files
15-
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj,wixproj}]
15+
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj,wixproj,msbuildproj}]
1616
indent_size = 2
1717

1818
# XML config files

Cyberduck.sln

Lines changed: 90 additions & 179 deletions
Large diffs are not rendered by default.

Directory.Build.props

Lines changed: 33 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,36 @@
1616

1717
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
1818

19-
<PropertyGroup Label="AssemblyInfo">
20-
<Company>iterate GmbH</Company>
21-
<Description>Libre FTP, SFTP, WebDAV, S3 and OpenStack Swift browser for Mac and Windows.</Description>
22-
</PropertyGroup>
23-
24-
<PropertyGroup>
25-
<CyberduckDir>$(MSBuildThisFileDirectory)</CyberduckDir>
26-
<TargetBuildDir>$(ModulePath)target\</TargetBuildDir>
27-
28-
<BaseIntermediateOutputPath>$(TargetBuildDir)obj\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
29-
<BaseOutputPath>$(TargetBuildDir)</BaseOutputPath>
30-
<IntermediateOutputPath>$(BaseIntermediateOutputPath)$(Configuration)\</IntermediateOutputPath>
31-
<OutputPath>$(BaseOutputPath)</OutputPath>
32-
33-
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
34-
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
35-
<LangVersion>12</LangVersion>
36-
</PropertyGroup>
37-
38-
<ItemDefinitionGroup>
39-
<CyberduckReference>
40-
<ProjectPath />
41-
</CyberduckReference>
42-
</ItemDefinitionGroup>
43-
44-
</Project>
19+
<PropertyGroup Label="AssemblyInfo">
20+
<Company>iterate GmbH</Company>
21+
<Description>Libre FTP, SFTP, WebDAV, S3 and OpenStack Swift browser for Mac and Windows.</Description>
22+
</PropertyGroup>
23+
24+
<PropertyGroup>
25+
<CyberduckDir>$(MSBuildThisFileDirectory)</CyberduckDir>
26+
<BuildSupportDir>$(CyberduckDir)src\main\msbuild\</BuildSupportDir>
27+
<TargetBuildDir>$(ModulePath)target\</TargetBuildDir>
28+
<LibDir>$(TargetBuildDir)lib\</LibDir>
29+
<GeneratedMSBuildDir>$(TargetBuildDir)generated\msbuild\</GeneratedMSBuildDir>
30+
31+
<ArtifactsPath>$(TargetBuildDir)</ArtifactsPath>
32+
<UseArtifactsOutput>false</UseArtifactsOutput>
33+
34+
<BaseIntermediateOutputPath>$(ArtifactsPath)obj\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
35+
<BaseOutputPath>$(ArtifactsPath)</BaseOutputPath>
36+
<IntermediateOutputPath>$(BaseIntermediateOutputPath)$(Configuration)\</IntermediateOutputPath>
37+
<OutputPath>$(BaseOutputPath)</OutputPath>
38+
39+
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
40+
<LangVersion>12</LangVersion>
41+
</PropertyGroup>
42+
43+
<ItemDefinitionGroup>
44+
<CyberduckReference>
45+
<ProjectPath />
46+
</CyberduckReference>
47+
</ItemDefinitionGroup>
48+
49+
<Import Project="$(GeneratedMSBuildDir)Version.props" Condition="Exists('$(GeneratedMSBuildDir)Version.props')" />
50+
51+
</Project>

Directory.Build.targets

Lines changed: 60 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -16,66 +16,71 @@
1616

1717
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
1818

19-
<Sdk Name="Microsoft.Build.CentralPackageVersions" Version="2.0.41" />
19+
<Sdk Name="Microsoft.Build.CentralPackageVersions" Version="2.0.41" />
2020

21-
<ItemGroup>
22-
<CyberduckReference Update="Bonjour">
23-
<ProjectPath>$(CyberduckDir)bonjour\dll\Cyberduck.Bonjour.msbuildproj</ProjectPath>
24-
</CyberduckReference>
25-
<CyberduckReference Update="Bonjour.Native">
26-
<ProjectPath>$(CyberduckDir)bonjour\src\main\csharp\Cyberduck.Bonjour.Native.csproj</ProjectPath>
27-
</CyberduckReference>
28-
<CyberduckReference Update="Cli">
29-
<ProjectPath>$(CyberduckDir)cli\dll\Cyberduck.Cli.msbuildproj</ProjectPath>
30-
</CyberduckReference>
31-
<CyberduckReference Update="Core">
32-
<ProjectPath>$(CyberduckDir)core\dll\Cyberduck.Core.msbuildproj</ProjectPath>
33-
</CyberduckReference>
34-
<CyberduckReference Update="Core.Native">
35-
<ProjectPath>$(CyberduckDir)core\src\main\csharp\Cyberduck.Core.Native.csproj</ProjectPath>
36-
</CyberduckReference>
37-
<CyberduckReference Update="Core.Refresh">
38-
<ProjectPath>$(CyberduckDir)core\native\refresh\src\main\csharp\Cyberduck.Core.Refresh.csproj</ProjectPath>
39-
</CyberduckReference>
40-
<CyberduckReference Update="Cryptomator">
41-
<ProjectPath>$(CyberduckDir)cryptomator\dll\Cyberduck.Cryptomator.msbuildproj</ProjectPath>
42-
</CyberduckReference>
43-
<CyberduckReference Update="Importer">
44-
<ProjectPath>$(CyberduckDir)importer\dll\Cyberduck.Importer.msbuildproj</ProjectPath>
45-
</CyberduckReference>
46-
<CyberduckReference Update="Protocols">
47-
<ProjectPath>$(CyberduckDir)protocols\dll\Cyberduck.Protocols.msbuildproj</ProjectPath>
48-
</CyberduckReference>
49-
</ItemGroup>
21+
<PropertyGroup>
22+
<AssemblySearchPaths>$(LibDir);$(AssemblySearchPaths)</AssemblySearchPaths>
23+
</PropertyGroup>
5024

51-
<ItemGroup>
52-
<CyberduckProjectReferences Include="@(CyberduckReference->HasMetadata('ProjectPath'))" Condition=" '$(BuildingInsideVisualStudio)'=='True' " />
53-
<CyberduckLibraryReferences Include="@(CyberduckReference)" Exclude="@(CyberduckProjectReferences)" />
25+
<PropertyGroup Condition=" '$(TargetFramework)' != '' ">
26+
<LibDirFramework Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net472'))">net472</LibDirFramework>
27+
<LibDirFramework Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">net8.0</LibDirFramework>
28+
<AssemblySearchPaths Condition=" '$(LibDirFramework)' != '' ">$(LibDir)$(LibDirFramework)\;$(AssemblySearchPaths)</AssemblySearchPaths>
29+
</PropertyGroup>
5430

55-
<ProjectReference Include="@(CyberduckProjectReferences->'%(ProjectPath)')">
56-
<Name>Cyberduck.%(Identity)</Name>
57-
</ProjectReference>
58-
<Reference Include="@(CyberduckLibraryReferences->'Cyberduck.%(Identity)')">
59-
<HintPath>$(TargetBuildDir)%(Identity).dll</HintPath>
60-
</Reference>
61-
</ItemGroup>
31+
<ItemGroup>
32+
<CyberduckReference Update="Bonjour">
33+
<ProjectPath>$(CyberduckDir)bonjour\dll\Cyberduck.Bonjour.msbuildproj</ProjectPath>
34+
</CyberduckReference>
35+
<CyberduckReference Update="Bonjour.Native">
36+
<ProjectPath>$(CyberduckDir)bonjour\src\main\csharp\Cyberduck.Bonjour.Native.csproj</ProjectPath>
37+
</CyberduckReference>
38+
<CyberduckReference Update="Cli">
39+
<ProjectPath>$(CyberduckDir)cli\dll\Cyberduck.Cli.msbuildproj</ProjectPath>
40+
</CyberduckReference>
41+
<CyberduckReference Update="Core">
42+
<ProjectPath>$(CyberduckDir)core\dll\Cyberduck.Core.msbuildproj</ProjectPath>
43+
</CyberduckReference>
44+
<CyberduckReference Update="Core.Native">
45+
<ProjectPath>$(CyberduckDir)core\src\main\csharp\Cyberduck.Core.Native.csproj</ProjectPath>
46+
</CyberduckReference>
47+
<CyberduckReference Update="Core.Refresh">
48+
<ProjectPath>$(CyberduckDir)core\native\refresh\src\main\csharp\Cyberduck.Core.Refresh.csproj</ProjectPath>
49+
</CyberduckReference>
50+
<CyberduckReference Update="Cryptomator">
51+
<ProjectPath>$(CyberduckDir)cryptomator\dll\Cyberduck.Cryptomator.msbuildproj</ProjectPath>
52+
</CyberduckReference>
53+
<CyberduckReference Update="Importer">
54+
<ProjectPath>$(CyberduckDir)importer\dll\Cyberduck.Importer.msbuildproj</ProjectPath>
55+
</CyberduckReference>
56+
<CyberduckReference Update="Protocols">
57+
<ProjectPath>$(CyberduckDir)protocols\dll\Cyberduck.Protocols.msbuildproj</ProjectPath>
58+
</CyberduckReference>
6259

63-
<PropertyGroup Condition=" '$(NETCoreSdkVersion)'!='' ">
64-
<!-- Treat SDK 6.0.301 as last known to work. -->
65-
<NETSDKBeforeFeature>$([MSBuild]::VersionLessThanOrEquals('$(NETCoreSdkVersion)', '6.0.301'))</NETSDKBeforeFeature>
66-
<NETSDKAfterFix>$([MSBuild]::VersionGreaterThanOrEquals('$(NETCoreSdkVersion)', '6.0.401'))</NETSDKAfterFix>
67-
<CoreCompileDependsOn Condition="!($(NETSDKBeforeFeature) or $(NETSDKAfterFix))">SDKFix_RemoveDuplicateAnalyzers;$(CoreCompileDependsOn)</CoreCompileDependsOn>
68-
</PropertyGroup>
60+
<CyberduckProjectReferences Include="@(CyberduckReference->HasMetadata('ProjectPath'))" Condition=" '$(BuildingInsideVisualStudio)'=='True' " />
61+
<CyberduckLibraryReferences Include="@(CyberduckReference->'Cyberduck.%(Identity)')" Exclude="@(CyberduckProjectReferences)" />
62+
<ProjectReference Include="@(CyberduckProjectReferences->'%(ProjectPath)')">
63+
<Name>Cyberduck.%(Identity)</Name>
64+
</ProjectReference>
65+
<Reference Include="@(CyberduckLibraryReferences)" />
66+
</ItemGroup>
6967

70-
<Target Name="SDKFix_RemoveDuplicateAnalyzers">
71-
<ItemGroup>
72-
<FilteredAnalyzer Include="@(Analyzer-&gt;Distinct())" />
73-
<Analyzer Remove="@(Analyzer)" />
74-
<Analyzer Include="@(FilteredAnalyzer)" />
75-
<FilteredAnalyzer Remove="@(FilteredAnalyzer)" />
76-
</ItemGroup>
68+
<PropertyGroup Condition=" '$(NETCoreSdkVersion)'!='' ">
69+
<!-- Treat SDK 6.0.301 as last known to work. -->
70+
<NETSDKBeforeFeature>$([MSBuild]::VersionLessThanOrEquals('$(NETCoreSdkVersion)', '6.0.301'))</NETSDKBeforeFeature>
71+
<NETSDKAfterFix>$([MSBuild]::VersionGreaterThanOrEquals('$(NETCoreSdkVersion)', '6.0.401'))</NETSDKAfterFix>
72+
<CoreCompileDependsOn Condition="!($(NETSDKBeforeFeature) or $(NETSDKAfterFix))">SDKFix_RemoveDuplicateAnalyzers;$(CoreCompileDependsOn)</CoreCompileDependsOn>
73+
</PropertyGroup>
74+
75+
<Target Name="SDKFix_RemoveDuplicateAnalyzers">
76+
<ItemGroup>
77+
<FilteredAnalyzer Include="@(Analyzer-&gt;Distinct())" />
78+
<Analyzer Remove="@(Analyzer)" />
79+
<Analyzer Include="@(FilteredAnalyzer)" />
80+
<FilteredAnalyzer Remove="@(FilteredAnalyzer)" />
81+
</ItemGroup>
7782
</Target>
78-
83+
7984
<Target Name="_ExportReference" />
8085

81-
</Project>
86+
</Project>

Packages.props

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@
3333
<PackageReference Update="ReactiveUI" Version="17.1.50" />
3434
<PackageReference Update="ReactiveUI.WPF" Version="17.1.50" />
3535
<PackageReference Update="StructureMap" Version="2.6.4.1" />
36+
<PackageReference Update="System.Configuration.ConfigurationManager" Version="8.0.0" />
3637
<PackageReference Update="System.Memory" Version="4.5.5" />
38+
<PackageReference Update="System.Runtime.Caching" Version="8.0.0" />
39+
<PackageReference Update="System.Security.Cryptography.ProtectedData" Version="8.0.0" />
3740

3841
<GlobalPackageReference Include="MSBuildTasks" Version="1.5.0.235" GeneratePathProperty="true" />
3942
</ItemGroup>
Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
<Project Sdk="IKVM.NET.Sdk">
2-
<PropertyGroup>
3-
<TargetFramework>net472</TargetFramework>
4-
</PropertyGroup>
2+
<PropertyGroup>
3+
<!--
4+
Only really used in Cyberduck.
5+
-->
6+
<TargetFramework>net472</TargetFramework>
7+
</PropertyGroup>
58

6-
<ItemGroup>
7-
<CyberduckReference Include="Core" />
8-
9-
<Convert Include="$(TargetBuildDir)ch.cyberduck.bonjour.jar" />
10-
<Convert Include="$(TargetBuildDir)com.apple.dnssd.jar" />
11-
</ItemGroup>
12-
</Project>
9+
<Import Project="$(BuildSupportDir)Cyberduck.Java.props" />
10+
11+
<ItemGroup>
12+
<CyberduckReference Include="Core" />
13+
14+
<Convert Include="$(TargetBuildDir)ch.cyberduck.bonjour.jar" />
15+
<Convert Include="$(TargetBuildDir)com.apple.dnssd.jar" />
16+
</ItemGroup>
17+
</Project>

bonjour/dll/Directory.Build.props

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,5 @@
2020
</PropertyGroup>
2121

2222
<Import Project="../Directory.Build.props" />
23-
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.Java.props', '$(MSBuildThisFileDirectory)../'))" />
2423

2524
</Project>

bonjour/dll/build.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,9 @@
2929
</msbuild>
3030
</target>
3131

32-
<target name="build" if="platform.windows" depends="version,restore,msbuild.configuration">
32+
<target name="build" if="platform.windows" depends="restore,msbuild">
3333
<msbuild buildfile="Cyberduck.Bonjour.msbuildproj">
3434
<property name="Configuration" value="${msbuild.configuration}" />
35-
<property name="Copyright" value="${copyright}" />
36-
<property name="Version" value="${version}.${revision}" />
3735
</msbuild>
3836
</target>
3937

bonjour/dll/pom.xml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,9 @@
5858
<configuration>
5959
<artifacts>
6060
<artifact>
61+
<classifier>net472</classifier>
6162
<type>dll</type>
62-
<file>${project.build.directory}/Cyberduck.Bonjour.dll</file>
63+
<file>${project.build.directory}/net472/Cyberduck.Bonjour.dll</file>
6364
</artifact>
6465
</artifacts>
6566
</configuration>
@@ -75,6 +76,7 @@
7576
<dependency>
7677
<groupId>ch.cyberduck</groupId>
7778
<artifactId>Cyberduck.Core</artifactId>
79+
<classifier>net472</classifier>
7880
<version>${project.version}</version>
7981
<type>dll</type>
8082
</dependency>
@@ -87,6 +89,13 @@
8789
<groupId>ch.cyberduck</groupId>
8890
<artifactId>bonjour</artifactId>
8991
<version>${project.version}</version>
92+
<scope>provided</scope>
93+
<exclusions>
94+
<exclusion>
95+
<groupId>ch.cyberduck</groupId>
96+
<artifactId>core</artifactId>
97+
</exclusion>
98+
</exclusions>
9099
</dependency>
91100
</dependencies>
92101
</project>

bonjour/native/build.xml

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,31 +23,18 @@
2323

2424
<import file="../../build.xml"/>
2525

26-
<property name="msbuild.configuration" value="release"/>
27-
28-
<target name="init-msbuild">
29-
<taskdef name="msbuild" classname="org.apache.ant.dotnet.build.MSBuildTask">
30-
<classpath path="${lib.ext}/ant-dotnet-1.1.jar"/>
31-
</taskdef>
32-
</target>
33-
34-
<target name="restore" depends="init-msbuild, version">
26+
<target name="restore" depends="msbuild">
3527
<msbuild buildfile="../src/main/csharp/Cyberduck.Bonjour.Native.csproj">
3628
<target name="Restore" />
3729
</msbuild>
3830
</target>
3931

40-
<target name="build" depends="init-msbuild, version">
32+
<target name="build" depends="restore,msbuild">
4133
<!-- Create DLL Cyberduck.Bonjour.Native -->
4234
<msbuild buildfile="../src/main/csharp/Cyberduck.Bonjour.Native.csproj">
4335
<target name="Build"/>
4436

45-
<property name="Version"
46-
value="${version}.${revision}"/>
47-
<property name="ShortVersion"
48-
value="${version} (${revision})"/>
49-
<property name="Configuration"
50-
value="${msbuild.configuration}"/>
37+
<property name="Configuration" value="${msbuild.configuration}"/>
5138
</msbuild>
5239
</target>
5340
</project>

bonjour/native/pom.xml

Lines changed: 3 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@
3636
<configuration>
3737
<artifacts>
3838
<artifact>
39+
<classifier>net472</classifier>
3940
<type>dll</type>
40-
<file>${project.build.directory}/Cyberduck.Bonjour.Native.dll</file>
41+
<file>${project.build.directory}/net472/Cyberduck.Bonjour.Native.dll</file>
4142
</artifact>
4243
</artifacts>
4344
</configuration>
@@ -46,56 +47,18 @@
4647
</plugin>
4748
<plugin>
4849
<artifactId>maven-antrun-plugin</artifactId>
49-
<executions>
50-
<execution>
51-
<id>run-ant-restore-target</id>
52-
<phase>initialize</phase>
53-
<goals>
54-
<goal>run</goal>
55-
</goals>
56-
<configuration>
57-
<target>
58-
<property name="home" value="${main.basedir}" />
59-
<ant antfile="${project.basedir}/build.xml" target="restore" dir="." />
60-
</target>
61-
</configuration>
62-
</execution>
63-
<execution>
64-
<id>run-ant-build-target</id>
65-
<phase>compile</phase>
66-
<goals>
67-
<goal>run</goal>
68-
</goals>
69-
<configuration>
70-
<target>
71-
<property name="home" value="${main.basedir}" />
72-
<property name="version" value="${project.version}" />
73-
<property name="revision" value="${git.commitsCount}" />
74-
<ant antfile="${project.basedir}/build.xml" target="build" dir="." />
75-
</target>
76-
</configuration>
77-
</execution>
78-
</executions>
7950
</plugin>
8051
</plugins>
8152
</build>
8253
<dependencies>
8354
<dependency>
8455
<groupId>ch.cyberduck</groupId>
8556
<artifactId>Cyberduck.Bonjour</artifactId>
57+
<classifier>net472</classifier>
8658
<type>dll</type>
8759
<version>${project.version}</version>
88-
<scope>runtime</scope>
8960
</dependency>
9061
</dependencies>
9162
</profile>
9263
</profiles>
93-
94-
<dependencies>
95-
<dependency>
96-
<groupId>ch.cyberduck</groupId>
97-
<artifactId>bonjour</artifactId>
98-
<version>${project.version}</version>
99-
</dependency>
100-
</dependencies>
10164
</project>

0 commit comments

Comments
 (0)