Skip to content

Commit 166408d

Browse files
Add Directory.Build.props (#15)
* Added root Directory prop file * Restructure directories - Moved /source/AsepriteDotNet/ to /src/AsepriteDotNet/ - Moved /source/AsepriteDotNet.Tests/ - Moved /source/AsperiteDotNet.sln to /AsepriteDotnet.sln to /tests/AsepriteDotNet.Tests/ * Added /src/Directory.Build.props * Added /test/Directory.Build.props * Fix project reference link after moving directories * Fix CI due to directory changes.
1 parent 74a9644 commit 166408d

Some content is hidden

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

69 files changed

+166
-72
lines changed

.github/workflows/build-and-test.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ env:
1414
jobs:
1515
build-and-test:
1616
name: build-and-test
17-
defaults:
18-
run:
19-
working-directory: ./source
2017
runs-on: ${{ matrix.os }}
2118
strategy:
2219
matrix:

AsepriteDotNet.sln

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.0.31903.59
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{877A2074-ABF8-48AB-B182-DF35D051292B}"
7+
EndProject
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AsepriteDotNet", "src\AsepriteDotNet\AsepriteDotNet.csproj", "{9DE551AA-9A07-466D-9B76-EBCA2F3F6233}"
9+
EndProject
10+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{247A35A5-03DD-4050-AE08-B8C24A52BB72}"
11+
EndProject
12+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AsepriteDotNet.Tests", "tests\AsepriteDotNet.Tests\AsepriteDotNet.Tests.csproj", "{76868373-30A4-47D3-9A9D-90EB85E7934D}"
13+
EndProject
14+
Global
15+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
16+
Debug|Any CPU = Debug|Any CPU
17+
Release|Any CPU = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
23+
{9DE551AA-9A07-466D-9B76-EBCA2F3F6233}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
24+
{9DE551AA-9A07-466D-9B76-EBCA2F3F6233}.Debug|Any CPU.Build.0 = Debug|Any CPU
25+
{9DE551AA-9A07-466D-9B76-EBCA2F3F6233}.Release|Any CPU.ActiveCfg = Release|Any CPU
26+
{9DE551AA-9A07-466D-9B76-EBCA2F3F6233}.Release|Any CPU.Build.0 = Release|Any CPU
27+
{76868373-30A4-47D3-9A9D-90EB85E7934D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
28+
{76868373-30A4-47D3-9A9D-90EB85E7934D}.Debug|Any CPU.Build.0 = Debug|Any CPU
29+
{76868373-30A4-47D3-9A9D-90EB85E7934D}.Release|Any CPU.ActiveCfg = Release|Any CPU
30+
{76868373-30A4-47D3-9A9D-90EB85E7934D}.Release|Any CPU.Build.0 = Release|Any CPU
31+
EndGlobalSection
32+
GlobalSection(NestedProjects) = preSolution
33+
{9DE551AA-9A07-466D-9B76-EBCA2F3F6233} = {877A2074-ABF8-48AB-B182-DF35D051292B}
34+
{76868373-30A4-47D3-9A9D-90EB85E7934D} = {247A35A5-03DD-4050-AE08-B8C24A52BB72}
35+
EndGlobalSection
36+
EndGlobal

Directory.Build.props

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project>
3+
4+
<!-- Set the root directory as the solution directory -->
5+
<PropertyGroup>
6+
<SolutionDirectory>$(MSBuildThisFileDirectory)</SolutionDirectory>
7+
</PropertyGroup>
8+
9+
<!-- Standardize build output locations -->
10+
<PropertyGroup>
11+
<BaseArtifactsPath>$(SolutionDirectory).artifacts/</BaseArtifactsPath>
12+
<BaseArtifactsPathSuffix>$(ProjectCategory)/$(MSBuildProjectName)</BaseArtifactsPathSuffix>
13+
<BaseIntermediateOutputPath>$(BaseArtifactsPath)obj/$(BaseArtifactsPathSuffix)</BaseIntermediateOutputPath>
14+
<BaseOutputPath>$(BaseArtifactsPath)bin/$(BaseArtifactsPathSuffix)</BaseOutputPath>
15+
<PackageOutputPath>$(BaseArtifactsPath)pkg/$(BaseArtifactsPathSuffix)/$(Configuration)/</PackageOutputPath>
16+
</PropertyGroup>
17+
18+
<!-- Standardize compilation settings -->
19+
<PropertyGroup>
20+
<NeutralLanguage>en</NeutralLanguage>
21+
<ImplicitUsings>enable</ImplicitUsings>
22+
<Nullable>enable</Nullable>
23+
</PropertyGroup>
24+
25+
<!-- Setup Code Analysis using the .editorconfig file -->
26+
<PropertyGroup>
27+
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
28+
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
29+
<AnalysisLevel>latest</AnalysisLevel>
30+
<RunAnalyzersDuringBuild>true</RunAnalyzersDuringBuild>
31+
<RunAnalyzersDuringLiveAnalysis>true</RunAnalyzersDuringLiveAnalysis>
32+
<CodeAnalysisTreatWarningsAsErrors>false</CodeAnalysisTreatWarningsAsErrors>
33+
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
34+
<WarningsAsErrors>nullable</WarningsAsErrors>
35+
</PropertyGroup>
36+
</Project>

source/AsepriteDotNet.Tests/AsepriteDotNet.Tests.csproj

Lines changed: 0 additions & 32 deletions
This file was deleted.

source/AsepriteDotNet.sln

Lines changed: 0 additions & 28 deletions
This file was deleted.

source/AsepriteDotNet/AsepriteDotNet.csproj renamed to src/AsepriteDotNet/AsepriteDotNet.csproj

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,17 @@
22

33
<PropertyGroup>
44
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
5-
<ImplicitUsings>enable</ImplicitUsings>
6-
<Nullable>enable</Nullable>
7-
<GenerateDocumentationFile>true</GenerateDocumentationFile>
85
</PropertyGroup>
96

107
<PropertyGroup>
118
<PackageId>AsepriteDotNet</PackageId>
129
<Version>0.2.3</Version>
1310
<AssemblyVersion>0.2.3</AssemblyVersion>
1411
<FileVersion>0.2.3</FileVersion>
15-
<Authors>Christopher Whitley</Authors>
16-
<Company>Aristurtle</Company>
17-
<PackageLicenseExpression>MIT</PackageLicenseExpression>
18-
<Copyright>Copyright (c) 2022 Christoipher Whitley</Copyright>
1912
<PackageProjectUrl>https://github.com/AristurtleDev/AsepriteDotNet</PackageProjectUrl>
2013
<PackageIcon>aseprite-dotnet-nuget-icon.png</PackageIcon>
2114
<PackageReadmeFile>README.md</PackageReadmeFile>
2215
<RepositoryUrl>https://github.com/AristurtleDev/AsepriteDotNet</RepositoryUrl>
23-
<RepositoryType>git</RepositoryType>
2416
<RepositoryBranch>main</RepositoryBranch>
2517
<PackageTags>Aseprite;reader;pixel art;png;spritesheet;tilesheet</PackageTags>
2618
<PackageReleaseNotes>Multitarget for net6 and net7</PackageReleaseNotes>
@@ -29,7 +21,6 @@
2921
(.aseprite/.ase) files. Once file has been read, the library presents an
3022
easy to navigate AsepriteFile class containing the data read from the file.
3123
</Description>
32-
<NeutralLanguage>en</NeutralLanguage>
3324
</PropertyGroup>
3425

3526
<ItemGroup>

src/Directory.Build.props

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project>
3+
4+
<!-- Set the project category used by the root Directory.Build.props -->
5+
<PropertyGroup>
6+
<ProjectCategory>src</ProjectCategory>
7+
</PropertyGroup>
8+
9+
<!-- We're a library, always generate a documentation file -->
10+
<!-- (suck it prime) -->
11+
<PropertyGroup>
12+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
13+
</PropertyGroup>
14+
15+
<!-- Common Nuget Package Settings -->
16+
<PropertyGroup>
17+
<Copyright>Copyright © Christopher Whitley</Copyright>
18+
<Authors>Christopher Whitley and contributors</Authors>
19+
<Company>Aristurtle</Company>
20+
<RepositoryType>git</RepositoryType>
21+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
22+
</PropertyGroup>
23+
24+
<!-- Import the root prop last -->
25+
<Import Project="$(MSBuildThisFileDirectory)..\Directory.Build.props" />
26+
</Project>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net7.0</TargetFramework>
5+
</PropertyGroup>
6+
7+
<ItemGroup>
8+
<ProjectReference Include="..\..\src\AsepriteDotNet\AsepriteDotNet.csproj" />
9+
</ItemGroup>
10+
11+
<ItemGroup>
12+
<None Include="Files/**" CopyToOutputDirectory="PreserveNewest"/>
13+
</ItemGroup>
14+
15+
</Project>

tests/Directory.Build.props

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project>
3+
4+
<!-- Set the project category used by the root Directory.Build.props -->
5+
<PropertyGroup>
6+
<ProjectCategory>test</ProjectCategory>
7+
</PropertyGroup>
8+
9+
<!-- Never generate documentation files for test projects -->
10+
<!-- (you win this time prime) -->
11+
<PropertyGroup>
12+
<GenerateDocumentationFile>false</GenerateDocumentationFile>
13+
</PropertyGroup>
14+
15+
<!-- Common Test Project Configurations -->
16+
<PropertyGroup>
17+
<IsTestProject Condition="'$(IsTestProject)' == ''">true</IsTestProject>
18+
<IsPackable>false</IsPackable>
19+
</PropertyGroup>
20+
21+
<!-- All test projects use the same NuGet references -->
22+
<ItemGroup Condition="'$(IsTestProject)' == 'true'">
23+
<PackageReference Include="xunit"
24+
Version="2.6.2"
25+
IsImplicitlyDefined="true" />
26+
27+
<PackageReference Include="Microsoft.NET.Test.Sdk"
28+
Version="17.6.0"
29+
IsImplicitlyDefined="true" />
30+
31+
<PackageReference Include="xunit.runner.visualstudio"
32+
Version="2.5.6"
33+
IsImplicitlyDefined="true"
34+
IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive"
35+
PrivateAssets="all" />
36+
37+
<PackageReference Include="coverlet.collector"
38+
Version="6.0.0"
39+
IsImplicitlyDefined="true"
40+
IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive"
41+
PrivateAssets="all" />
42+
</ItemGroup>
43+
44+
<!-- Implicitly enable "Xunit" namespace globally if implicit using is defined -->
45+
<ItemGroup Condition="'$(IsTestProject)' == 'true'">
46+
<Using Include="Xunit"
47+
Condition="'$(ImplicitUsings)' == 'enable' OR '$(ImplicitUsings)' == 'true'" />
48+
</ItemGroup>
49+
50+
<!-- Import the root prop last -->
51+
<Import Project="$(MSBuildThisFileDirectory)..\Directory.Build.props" />
52+
53+
</Project>

0 commit comments

Comments
 (0)