Skip to content

Commit

Permalink
Move samples to a separate solution, ensure they reference built package
Browse files Browse the repository at this point in the history
We won't build this sample for now in CI, since it's not even adding a very useful example at all (it was mostly brought from Merq). Pending rewrite or deletion?
  • Loading branch information
kzu committed Dec 3, 2024
1 parent c1684e7 commit b19b9e1
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 47 deletions.
25 changes: 0 additions & 25 deletions DependencyInjection.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DependencyInjection.Tests",
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CodeAnalysis.Tests", "src\CodeAnalysis.Tests\CodeAnalysis.Tests.csproj", "{E512DEBA-FB35-47FD-AF25-3BAECCF667B1}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{3C5A7AC8-E8CC-40D6-B472-A693F742152A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Library1", "src\Samples\Library1\Library1.csproj", "{2BFDB11F-9503-4898-B348-BBE053A166B4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Library2", "src\Samples\Library2\Library2.csproj", "{EB3F2D78-0F2C-4A1B-BD5E-E31299B67601}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleApp", "src\Samples\ConsoleApp\ConsoleApp.csproj", "{26EF99DB-D846-4F65-929D-D7E3E820423A}"
EndProject
Project("{13B669BE-BB05-4DDF-9536-439F39A36129}") = "Attributed", "src\Attributed\Attributed.msbuildproj", "{1E68517F-34E7-415E-91B1-857802ED5592}"
EndProject
Global
Expand All @@ -37,18 +29,6 @@ Global
{E512DEBA-FB35-47FD-AF25-3BAECCF667B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E512DEBA-FB35-47FD-AF25-3BAECCF667B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E512DEBA-FB35-47FD-AF25-3BAECCF667B1}.Release|Any CPU.Build.0 = Release|Any CPU
{2BFDB11F-9503-4898-B348-BBE053A166B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2BFDB11F-9503-4898-B348-BBE053A166B4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2BFDB11F-9503-4898-B348-BBE053A166B4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2BFDB11F-9503-4898-B348-BBE053A166B4}.Release|Any CPU.Build.0 = Release|Any CPU
{EB3F2D78-0F2C-4A1B-BD5E-E31299B67601}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EB3F2D78-0F2C-4A1B-BD5E-E31299B67601}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EB3F2D78-0F2C-4A1B-BD5E-E31299B67601}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EB3F2D78-0F2C-4A1B-BD5E-E31299B67601}.Release|Any CPU.Build.0 = Release|Any CPU
{26EF99DB-D846-4F65-929D-D7E3E820423A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{26EF99DB-D846-4F65-929D-D7E3E820423A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{26EF99DB-D846-4F65-929D-D7E3E820423A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{26EF99DB-D846-4F65-929D-D7E3E820423A}.Release|Any CPU.Build.0 = Release|Any CPU
{1E68517F-34E7-415E-91B1-857802ED5592}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1E68517F-34E7-415E-91B1-857802ED5592}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1E68517F-34E7-415E-91B1-857802ED5592}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -57,11 +37,6 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{2BFDB11F-9503-4898-B348-BBE053A166B4} = {3C5A7AC8-E8CC-40D6-B472-A693F742152A}
{EB3F2D78-0F2C-4A1B-BD5E-E31299B67601} = {3C5A7AC8-E8CC-40D6-B472-A693F742152A}
{26EF99DB-D846-4F65-929D-D7E3E820423A} = {3C5A7AC8-E8CC-40D6-B472-A693F742152A}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {0B87CEC2-BB4D-4DAC-9C64-EB24C968C5D8}
EndGlobalSection
Expand Down
7 changes: 1 addition & 6 deletions src/Samples/ConsoleApp/ConsoleApp.csproj
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\DependencyInjection\Devlooped.Extensions.DependencyInjection.props" />

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>true</ImplicitUsings>
<!-- Allow inspection of generated code under obj -->
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<WarningsAsErrors>true</WarningsAsErrors>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
<PackageReference Include="Devlooped.Extensions.DependencyInjection" Version="42.*" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Library1\Library1.csproj" Aliases="Library1" />
<ProjectReference Include="..\Library2\Library2.csproj" Aliases="Library2" />
<ProjectReference Include="..\..\DependencyInjection\DependencyInjection.csproj" ReferenceOutputAssembly="false" OutputItemType="Analyzer" />
</ItemGroup>

<Import Project="..\..\DependencyInjection\Devlooped.Extensions.DependencyInjection.targets" />
</Project>
44 changes: 44 additions & 0 deletions src/Samples/DISample.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.4.32916.344
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{3C5A7AC8-E8CC-40D6-B472-A693F742152A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Library1", "Library1\Library1.csproj", "{2BFDB11F-9503-4898-B348-BBE053A166B4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleApp", "ConsoleApp\ConsoleApp.csproj", "{26EF99DB-D846-4F65-929D-D7E3E820423A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Library2", "Library2\Library2.csproj", "{628BF7AC-CADB-E845-D0A3-82D0FCBCA4DC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2BFDB11F-9503-4898-B348-BBE053A166B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2BFDB11F-9503-4898-B348-BBE053A166B4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2BFDB11F-9503-4898-B348-BBE053A166B4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2BFDB11F-9503-4898-B348-BBE053A166B4}.Release|Any CPU.Build.0 = Release|Any CPU
{26EF99DB-D846-4F65-929D-D7E3E820423A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{26EF99DB-D846-4F65-929D-D7E3E820423A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{26EF99DB-D846-4F65-929D-D7E3E820423A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{26EF99DB-D846-4F65-929D-D7E3E820423A}.Release|Any CPU.Build.0 = Release|Any CPU
{628BF7AC-CADB-E845-D0A3-82D0FCBCA4DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{628BF7AC-CADB-E845-D0A3-82D0FCBCA4DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{628BF7AC-CADB-E845-D0A3-82D0FCBCA4DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{628BF7AC-CADB-E845-D0A3-82D0FCBCA4DC}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{2BFDB11F-9503-4898-B348-BBE053A166B4} = {3C5A7AC8-E8CC-40D6-B472-A693F742152A}
{26EF99DB-D846-4F65-929D-D7E3E820423A} = {3C5A7AC8-E8CC-40D6-B472-A693F742152A}
{628BF7AC-CADB-E845-D0A3-82D0FCBCA4DC} = {3C5A7AC8-E8CC-40D6-B472-A693F742152A}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {0B87CEC2-BB4D-4DAC-9C64-EB24C968C5D8}
EndGlobalSection
EndGlobal
10 changes: 10 additions & 0 deletions src/Samples/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project>

<PropertyGroup>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
<RestoreSources>https://api.nuget.org/v3/index.json;$(MSBuildThisFileDirectory)../../bin;https://pkg.kzu.app/index.json</RestoreSources>
</PropertyGroup>

<Import Project="..\Directory.Build.props"/>
</Project>
12 changes: 1 addition & 11 deletions src/Samples/Library1/Library1.csproj
Original file line number Diff line number Diff line change
@@ -1,23 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\DependencyInjection\Devlooped.Extensions.DependencyInjection.props" />

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
<!-- Would otherwise be provided by the DependencyInjection.Attributed package -->
<DefineConstants>DDI_ADDSERVICE</DefineConstants>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
<PackageReference Include="Devlooped.Extensions.DependencyInjection" Version="42.*" />
<PackageReference Include="PolySharp" PrivateAssets="all" Version="1.14.1" />
<PackageReference Include="Merq" Version="2.0.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\DependencyInjection\DependencyInjection.csproj" ReferenceOutputAssembly="false" OutputItemType="Analyzer" />
</ItemGroup>

<Import Project="..\..\DependencyInjection\Devlooped.Extensions.DependencyInjection.targets" />
</Project>
5 changes: 0 additions & 5 deletions src/Samples/Library2/Library2.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,11 @@

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="PolySharp" PrivateAssets="all" Version="1.14.1" />
<PackageReference Include="Merq" Version="2.0.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Library1\Library1.csproj" />
</ItemGroup>

</Project>

0 comments on commit b19b9e1

Please sign in to comment.