Skip to content

Commit

Permalink
Multi-target to .NET Framework 4.0 and 4.6
Browse files Browse the repository at this point in the history
 - Clone DokanNet.csproj to DokanNet.net4.6.csproj and target it to .NET
   Framework 4.6
 - Rename DokanNet.csproj to DokanNet.net4.0.csproj
 - Remove packages.config and replace with DokanNet.net4.0.project.json
   and DokanNet.net4.6.project.json (introduced in NuGet 3.2, see
   NuGet/Home#1102)
 - Handle extra flags in FileAttributes for .NET Framework 4.5
 - Update DokanNet.nuspec to handle the multiple targets.
  • Loading branch information
magol committed Sep 7, 2016
1 parent 7c7accd commit 7d9f617
Show file tree
Hide file tree
Showing 14 changed files with 415 additions and 172 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ obj
packages
TestResults
/DokanNet/documentations/doc
*.lock.json
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased]
### Added
- This CHANGELOG.md.
- Support for .NET Framework 4.6
- XML comments in code.
- A website with the [documentation](https://dokan-dev.github.io/dokan-dotnet-doc/html/).
- Possibility to redirect log output.
Expand Down
2 changes: 1 addition & 1 deletion DokanNet.Tests/DokanNet.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
<Compile Include="TestCategories.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\DokanNet\DokanNet.csproj">
<ProjectReference Include="..\DokanNet\DokanNet.net4.0.csproj">
<Project>{a09b408a-26a0-4ff8-83d5-6e1b1da5f63c}</Project>
<Name>DokanNet</Name>
</ProjectReference>
Expand Down
11 changes: 10 additions & 1 deletion DokanNet.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.25123.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DokanNet", "DokanNet\DokanNet.csproj", "{A09B408A-26A0-4FF8-83D5-6E1B1DA5F63C}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DokanNet.net4.0", "DokanNet\DokanNet.net4.0.csproj", "{A09B408A-26A0-4FF8-83D5-6E1B1DA5F63C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DokanNet.net4.6", "DokanNet\DokanNet.net4.6.csproj", "{7EAF58F3-ECB0-4B08-B457-C1FD87CCE459}"
ProjectSection(ProjectDependencies) = postProject
{A09B408A-26A0-4FF8-83D5-6E1B1DA5F63C} = {A09B408A-26A0-4FF8-83D5-6E1B1DA5F63C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DokanNet.Tests", "DokanNet.Tests\DokanNet.Tests.csproj", "{65806CB3-BC11-4E5B-8DCB-58826A49FBBF}"
EndProject
Expand Down Expand Up @@ -44,6 +49,10 @@ Global
{A09B408A-26A0-4FF8-83D5-6E1B1DA5F63C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A09B408A-26A0-4FF8-83D5-6E1B1DA5F63C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A09B408A-26A0-4FF8-83D5-6E1B1DA5F63C}.Release|Any CPU.Build.0 = Release|Any CPU
{7EAF58F3-ECB0-4B08-B457-C1FD87CCE459}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7EAF58F3-ECB0-4B08-B457-C1FD87CCE459}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7EAF58F3-ECB0-4B08-B457-C1FD87CCE459}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7EAF58F3-ECB0-4B08-B457-C1FD87CCE459}.Release|Any CPU.Build.0 = Release|Any CPU
{65806CB3-BC11-4E5B-8DCB-58826A49FBBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{65806CB3-BC11-4E5B-8DCB-58826A49FBBF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{65806CB3-BC11-4E5B-8DCB-58826A49FBBF}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
323 changes: 166 additions & 157 deletions DokanNet/DokanNet.csproj → DokanNet/DokanNet.net4.0.csproj
Original file line number Diff line number Diff line change
@@ -1,164 +1,173 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{A09B408A-26A0-4FF8-83D5-6E1B1DA5F63C}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>DokanNet</RootNamespace>
<AssemblyName>DokanNet</AssemblyName>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<SccProjectName>
</SccProjectName>
<SccLocalPath>
</SccLocalPath>
<SccAuxPath>
</SccAuxPath>
<SccProvider>
</SccProvider>
<TargetFrameworkProfile />
<IsWebBootstrapper>false</IsWebBootstrapper>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<PlatformTarget>AnyCPU</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>
</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<PlatformTarget>AnyCPU</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>
</ApplicationIcon>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>Dokan.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Compile Include="DokanOptions.cs" />
<Compile Include="DokanResult.cs" />
<Compile Include="FileSystemFeatures.cs" />
<Compile Include="DokanException.cs" />
<Compile Include="Logging\ConsoleLogger.cs" />
<Compile Include="Logging\DebugViewLogger.cs" />
<Compile Include="Logging\ILogger.cs" />
<Compile Include="Logging\Logger.cs" />
<Compile Include="Logging\LoggerExtensions.cs" />
<Compile Include="Logging\NullLogger.cs" />
<Compile Include="Logging\TraceLogger.cs" />
<Compile Include="Native\BY_HANDLE_FILE_INFORMATION.cs" />
<Compile Include="DokanFileInfo.cs" />
<Compile Include="Native\SECURITY_INFORMATION.cs" />
<Compile Include="Native\DOKAN_OPERATIONS.cs" />
<Compile Include="Native\DOKAN_OPTIONS.cs" />
<Compile Include="FileAccess.cs" />
<Compile Include="FileInformation.cs" />
<Compile Include="Native\NativeMethods.cs" />
<Compile Include="Dokan.cs" />
<Compile Include="IDokanOperations.cs" />
<Compile Include="Native\WIN32_FIND_STREAM_DATA.cs" />
<Compile Include="NtStatus.cs" />
<Compile Include="NullFormatProvider.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="DokanOperationProxy.cs" />
<Compile Include="Native\WIN32_FIND_DATA.cs" />
<Compile Include="Properties\Resource.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resource.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<Reference Include="StringInterpolationBridge, Version=0.9.1.0, Culture=neutral, PublicKeyToken=761dcf67ba0bf74d, processorArchitecture=MSIL">
<HintPath>..\packages\StringInterpolationBridgeStrong.0.9.1\lib\net40\StringInterpolationBridge.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Properties\Resource.de.resx" />
<EmbeddedResource Include="Properties\Resource.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resource.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resource.fr.resx" />
<EmbeddedResource Include="Properties\Resource.sv.resx" />
</ItemGroup>
<ItemGroup>
<None Include="Dokan.snk" />
<None Include="DokanNet.nuspec" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
<UserProperties BuildVersion_UpdateFileVersion="True" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="YearStamp.MonthStamp.DayStamp.Increment" />
</VisualStudio>
</ProjectExtensions>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{A09B408A-26A0-4FF8-83D5-6E1B1DA5F63C}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>DokanNet</RootNamespace>
<AssemblyName>DokanNet</AssemblyName>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<SccProjectName>
</SccProjectName>
<SccLocalPath>
</SccLocalPath>
<SccAuxPath>
</SccAuxPath>
<SccProvider>
</SccProvider>
<TargetFrameworkProfile />
<IsWebBootstrapper>false</IsWebBootstrapper>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\NET$(TargetFrameworkVersion)\</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<PlatformTarget>AnyCPU</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\NET$(TargetFrameworkVersion)\</OutputPath>
<DefineConstants>
</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<PlatformTarget>AnyCPU</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<!-- Adding a custom constant will auto-magically append a comma and space to the pre-built constants. -->
<!-- Move the comma delimiter to the end of each constant and remove the trailing comma when we're done. -->
<DefineConstants Condition=" !$(DefineConstants.Contains(', NET')) ">$(DefineConstants)$(TargetFrameworkVersion.Replace("v", "NET").Replace(".", "")); </DefineConstants>
<DefineConstants Condition=" $(DefineConstants.Contains(', NET')) ">$(DefineConstants.Remove($(DefineConstants.LastIndexOf("; NET"))))$(TargetFrameworkVersion.Replace("v", "NET").Replace(".", "")); </DefineConstants>
<DefineConstants Condition=" $(TargetFrameworkVersion.Replace('v', '')) &gt;= 2.0 ">$(DefineConstants)NET20_OR_GREATER; </DefineConstants>
<DefineConstants Condition=" $(TargetFrameworkVersion.Replace('v', '')) &gt;= 3.0 ">$(DefineConstants)NET30_OR_GREATER; </DefineConstants>
<DefineConstants Condition=" $(TargetFrameworkVersion.Replace('v', '')) &gt;= 3.5 ">$(DefineConstants)NET35_OR_GREATER; </DefineConstants>
<DefineConstants Condition=" $(TargetFrameworkVersion.Replace('v', '')) &gt;= 4.0 ">$(DefineConstants)NET40_OR_GREATER; </DefineConstants>
<DefineConstants Condition=" $(TargetFrameworkVersion.Replace('v', '')) &gt;= 4.5 ">$(DefineConstants)NET45_OR_GREATER; </DefineConstants>
<DefineConstants Condition=" $(TargetFrameworkVersion.Replace('v', '')) &gt;= 4.6 ">$(DefineConstants)NET46_OR_GREATER; </DefineConstants>
<DefineConstants Condition=" $(DefineConstants.EndsWith(', ')) ">$(DefineConstants.Remove($(DefineConstants.LastIndexOf("; "))))</DefineConstants>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>
</ApplicationIcon>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>Dokan.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Compile Include="DokanOptions.cs" />
<Compile Include="DokanResult.cs" />
<Compile Include="FileSystemFeatures.cs" />
<Compile Include="DokanException.cs" />
<Compile Include="Logging\ConsoleLogger.cs" />
<Compile Include="Logging\DebugViewLogger.cs" />
<Compile Include="Logging\ILogger.cs" />
<Compile Include="Logging\Logger.cs" />
<Compile Include="Logging\LoggerExtensions.cs" />
<Compile Include="Logging\NullLogger.cs" />
<Compile Include="Logging\TraceLogger.cs" />
<Compile Include="Native\BY_HANDLE_FILE_INFORMATION.cs" />
<Compile Include="DokanFileInfo.cs" />
<Compile Include="Native\SECURITY_INFORMATION.cs" />
<Compile Include="Native\DOKAN_OPERATIONS.cs" />
<Compile Include="Native\DOKAN_OPTIONS.cs" />
<Compile Include="FileAccess.cs" />
<Compile Include="FileInformation.cs" />
<Compile Include="Native\NativeMethods.cs" />
<Compile Include="Dokan.cs" />
<Compile Include="IDokanOperations.cs" />
<Compile Include="Native\WIN32_FIND_STREAM_DATA.cs" />
<Compile Include="NtStatus.cs" />
<Compile Include="NullFormatProvider.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="DokanOperationProxy.cs" />
<Compile Include="Native\WIN32_FIND_DATA.cs" />
<Compile Include="Properties\Resource.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resource.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Properties\Resource.de.resx" />
<EmbeddedResource Include="Properties\Resource.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resource.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resource.fr.resx" />
<EmbeddedResource Include="Properties\Resource.sv.resx" />
</ItemGroup>
<ItemGroup>
<None Include="Dokan.snk" />
<None Include="DokanNet.net4.0.project.json" />
<None Include="DokanNet.nuspec" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
<UserProperties BuildVersion_UpdateFileVersion="True" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="YearStamp.MonthStamp.DayStamp.Increment" />
</VisualStudio>
</ProjectExtensions>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
-->
</Project>
11 changes: 11 additions & 0 deletions DokanNet/DokanNet.net4.0.project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"dependencies": {
"StringInterpolationBridgeStrong": "0.9.1"
},
"frameworks": {
"net40": { }
},
"runtimes": {
"win": { }
}
}
Loading

0 comments on commit 7d9f617

Please sign in to comment.