Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions FileTypeChecker.Tests/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project>
<PropertyGroup>
<Deterministic>true</Deterministic>
<BaseIntermediateOutputPath>..\artifacts\obj\FileTypeChecker.Tests\</BaseIntermediateOutputPath>
<BaseOutputPath>..\artifacts\bin\</BaseOutputPath>
</PropertyGroup>
</Project>
87 changes: 21 additions & 66 deletions FileTypeChecker.Tests/FileTypeChecker.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,81 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{716D0AB2-5088-4A22-A6E8-24B8D2F2039B}</ProjectGuid>
<TargetFrameworks>
<!-- .NET Framework -->
net35;net40;
net45;net451;net452;
net46;net461;net462;
net47;net471;net472;
</TargetFrameworks>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>FileTypeChecker.Tests</RootNamespace>
<AssemblyName>FileTypeChecker.Tests</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<!-- Workaround for building with dotnet CLI and targeting .NET 3.5: https://github.com/Microsoft/msbuild/issues/1333#issuecomment-296346352 -->
<FrameworkPathOverride Condition="'$(TargetFramework)' == 'net35'">C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v3.5\Profile\Client</FrameworkPathOverride>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>

<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<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>

<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>

<ItemGroup>
<Reference Include="nunit.framework, Version=2.6.4.14350, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<PackageReference Include="NUnit" Version="3.11.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.10.0" />
</ItemGroup>

<ItemGroup>
<Compile Include="FileTypeCheckerTests.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<ProjectReference Include="..\FileTypeChecker\FileTypeChecker.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FileTypeChecker\FileTypeChecker.csproj">
<Project>{0ae201d3-ce5b-404f-8c25-36bd929e1d19}</Project>
<Name>FileTypeChecker</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="Resources\advancedquantumthermodynamics.pdf" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="Resources\LAND.BMP" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- 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>
6 changes: 3 additions & 3 deletions FileTypeChecker.Tests/FileTypeCheckerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class WhenTheFileIsKnown

private FileTypeChecker checker;

[TestFixtureSetUp]
[OneTimeSetUp]
public void SetUp()
{
bitmap = new MemoryStream();
Expand Down Expand Up @@ -59,7 +59,7 @@ public class WhenTheFileIsUnknown

private FileTypeChecker checker;

[TestFixtureSetUp]
[OneTimeSetUp]
public void SetUp()
{
bitmap = new MemoryStream();
Expand Down Expand Up @@ -124,7 +124,7 @@ public class WhenTheFileIsUnknownList

private FileTypeChecker checker;

[TestFixtureSetUp]
[OneTimeSetUp]
public void SetUp()
{
bitmap = new MemoryStream();
Expand Down
36 changes: 0 additions & 36 deletions FileTypeChecker.Tests/Properties/AssemblyInfo.cs

This file was deleted.

4 changes: 0 additions & 4 deletions FileTypeChecker.Tests/packages.config

This file was deleted.

3 changes: 2 additions & 1 deletion FileTypeChecker.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27004.2005
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FileTypeChecker", "FileTypeChecker\FileTypeChecker.csproj", "{0AE201D3-CE5B-404F-8C25-36BD929E1D19}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FileTypeChecker", "FileTypeChecker\FileTypeChecker.csproj", "{0AE201D3-CE5B-404F-8C25-36BD929E1D19}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FileTypeChecker.Tests", "FileTypeChecker.Tests\FileTypeChecker.Tests.csproj", "{716D0AB2-5088-4A22-A6E8-24B8D2F2039B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{1019EF17-64B8-4C70-BB39-A12DBFB30A16}"
ProjectSection(SolutionItems) = preProject
.gitignore = .gitignore
LICENSE.md = LICENSE.md
README.md = README.md
EndProjectSection
EndProject
Expand Down
6 changes: 0 additions & 6 deletions FileTypeChecker/App.config

This file was deleted.

7 changes: 7 additions & 0 deletions FileTypeChecker/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project>
<PropertyGroup>
<Deterministic>true</Deterministic>
<BaseIntermediateOutputPath>..\artifacts\obj\FileTypeChecker\</BaseIntermediateOutputPath>
<BaseOutputPath>..\artifacts\bin\</BaseOutputPath>
</PropertyGroup>
</Project>
95 changes: 40 additions & 55 deletions FileTypeChecker/FileTypeChecker.csproj
Original file line number Diff line number Diff line change
@@ -1,66 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{0AE201D3-CE5B-404F-8C25-36BD929E1D19}</ProjectGuid>
<TargetFrameworks>
<!-- .NET Standard -->
netstandard1.0;netstandard1.1;netstandard1.2;netstandard1.3;netstandard1.4;netstandard1.5;netstandard1.6;
netstandard2.0;
<!-- .NET Core -->
netcoreapp1.0;netcoreapp1.1;
netcoreapp2.0;netcoreapp2.1;
<!-- .NET Framework -->
net35;net40;
net45;net451;net452;
net46;net461;net462;
net47;net471;net472;
</TargetFrameworks>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<RootNamespace>FileTypeChecker</RootNamespace>
<AssemblyName>FileTypeChecker</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<!-- Workaround for building with dotnet CLI and targeting .NET 3.5: https://github.com/Microsoft/msbuild/issues/1333#issuecomment-296346352 -->
<FrameworkPathOverride Condition="'$(TargetFramework)' == 'net35'">C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v3.5\Profile\Client</FrameworkPathOverride>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>

<!-- Nuget specific tags -->
<PropertyGroup>
<Version>1.1.0</Version>
<PackageId>FileTypeChecker</PackageId>
<Company></Company>
<Authors>0xbrock</Authors>
<Description>File type checker that checks the file's magic numbers/Identifying bytes. Useful for verifying uploaded files in web applications. NuGet package of code originally written by https://github.com/mjolka and extended to allow for dependency injecting the known file types.</Description>
<PackageLicenseUrl>https://github.com/0xbrock/FileTypeChecker/blob/master/LICENSE.md</PackageLicenseUrl>
<PackageProjectUrl></PackageProjectUrl>
<RepositoryUrl>https://github.com/0xbrock/FileTypeChecker</RepositoryUrl>
<Copyright>Copyright © 2017-2018 0xbrock</Copyright>
<PackageTags>File Type, Validator, Checker, Magic Numbers, Identifying Bytes</PackageTags>
<NeutralLanguage>en-US</NeutralLanguage>
<PackageReleaseNotes></PackageReleaseNotes>
<RepositoryType></RepositoryType>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>

<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="ExactFileTypeMatcher.cs" />
<Compile Include="FileType.cs" />
<Compile Include="FileTypeChecker.cs" />
<Compile Include="FileTypeMatcher.cs" />
<Compile Include="FuzzyFileTypeMatcher.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="RangeFileTypeMatcher.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- 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>
18 changes: 0 additions & 18 deletions FileTypeChecker/FileTypeChecker.nuspec

This file was deleted.

36 changes: 0 additions & 36 deletions FileTypeChecker/Properties/AssemblyInfo.cs

This file was deleted.