Skip to content

Commit

Permalink
Consistent project structure
Browse files Browse the repository at this point in the history
  • Loading branch information
craigktreasure committed Nov 16, 2023
1 parent 9d4ad75 commit 08976c2
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 9 deletions.
21 changes: 14 additions & 7 deletions Treasure.Utils.sln
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,26 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
.gitattributes = .gitattributes
.gitignore = .gitignore
Directory.Build.props = Directory.Build.props
Directory.Build.targets = Directory.Build.targets
Directory.Build.rsp = Directory.Build.rsp
Directory.Packages.props = Directory.Packages.props
global.json = global.json
nuget.config = nuget.config
Packages.props = Packages.props
version.json = version.json
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{FDF5F72E-0C98-4976-8125-12C0ED9F89B4}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Treasure.Utils.Argument.Benchmarks", "test\Treasure.Utils.Argument.Benchmarks\Treasure.Utils.Argument.Benchmarks.csproj", "{AB3B36BF-791F-4DC2-8B53-4BA812A80E86}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{7C628D75-6B6A-4D42-A4D9-45C6ACA51FB5}"
ProjectSection(SolutionItems) = preProject
build\Defaults.props = build\Defaults.props
build\Defaults.targets = build\Defaults.targets
src\Directory.Packages.props = src\Directory.Packages.props
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Treasure.Utils.Argument.Benchmarks", "test\Treasure.Utils.Argument.Benchmarks\Treasure.Utils.Argument.Benchmarks.csproj", "{AB3B36BF-791F-4DC2-8B53-4BA812A80E86}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{61D20241-7C98-4A60-AA8D-C7614B7D6768}"
ProjectSection(SolutionItems) = preProject
test\.editorconfig = test\.editorconfig
test\Directory.Build.props = test\Directory.Build.props
test\Directory.Packages.props = test\Directory.Packages.props
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -54,8 +60,9 @@ Global
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{EF141707-718F-49EC-99B9-8D7B59CBCCEF} = {B012001D-4B86-460D-A3E1-FC3EEC840D13}
{FDF5F72E-0C98-4976-8125-12C0ED9F89B4} = {A18B8F8E-8296-4968-A569-16F3F4FE045E}
{AB3B36BF-791F-4DC2-8B53-4BA812A80E86} = {B012001D-4B86-460D-A3E1-FC3EEC840D13}
{7C628D75-6B6A-4D42-A4D9-45C6ACA51FB5} = {A18B8F8E-8296-4968-A569-16F3F4FE045E}
{61D20241-7C98-4A60-AA8D-C7614B7D6768} = {A18B8F8E-8296-4968-A569-16F3F4FE045E}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {1304A800-AFA8-4EDF-9EBC-06F8680BADF1}
Expand Down
16 changes: 16 additions & 0 deletions test/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!-- Don't publish test projects by default. -->
<IsPublishable>false</IsPublishable>

<!-- Prevent test projects from being packaged by default. -->
<IsPackable>false</IsPackable>

<!-- Mark projects as test by default. -->
<IsTestProject>true</IsTestProject>

<!-- Configure code coverage settings for coverlet. -->
<ExcludeByAttribute>GeneratedCodeAttribute,CompilerGeneratedAttribute</ExcludeByAttribute>
<CoverletOutputFormat>cobertura</CoverletOutputFormat>
</PropertyGroup>

<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Windows'))">
Expand All @@ -9,5 +20,10 @@
<DefaultNetStandardTestTFM >net6.0$(PlatformTFMSuffix)</DefaultNetStandardTestTFM>
</PropertyGroup>

<ItemGroup>
<!-- Exclude test projects from code coverate reports. -->
<AssemblyAttribute Include="System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute" />
</ItemGroup>

<Import Project="$(MSBuildThisFileDirectory)/../Directory.Build.props" />
</Project>
1 change: 1 addition & 0 deletions test/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<ItemGroup>
<PackageVersion Include="BenchmarkDotNet" Version="0.13.10" />
<PackageVersion Include="coverlet.collector" Version="6.0.0" />
<PackageVersion Include="coverlet.msbuild" Version="6.0.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageVersion Include="xunit" Version="2.6.1" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.3" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('Windows'))">$(TargetFrameworks);$(DefaultNetStandardTestTFM)</TargetFrameworks>
<RootNamespace>Treasure.Utils.Tests</RootNamespace>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
Expand All @@ -18,6 +16,10 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.msbuild">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.visualstudio">
Expand Down

0 comments on commit 08976c2

Please sign in to comment.