Skip to content

Commit

Permalink
Merge pull request #29 from AxaFrance/feat/refactor_nuget_package
Browse files Browse the repository at this point in the history
chore(nuget): refactor projects for add build.props and build.targets…
  • Loading branch information
julien-vandenbussche authored Jun 30, 2023
2 parents 71a872d + 8482834 commit 9a38e0e
Show file tree
Hide file tree
Showing 12 changed files with 76 additions and 49 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/extensions-dependency-injection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
shell: powershell
run: |
.\.sonar\scanner\dotnet-sonarscanner begin /k:"AxaGuilDEv_extensions-dependency-injection" /o:"axaguildev" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.vstest.reportsPaths=./TestResults/*.trx /d:sonar.cs.opencover.reportsPaths=./**/coverage.opencover.xml /d:sonar.coverage.exclusions=./test/**/*.* /d:sonar.verbose=true
.\.sonar\scanner\dotnet-sonarscanner begin /k:"AxaFrance_extensions-dependency-injection" /o:"axaguildev" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.vstest.reportsPaths=./TestResults/*.trx /d:sonar.cs.opencover.reportsPaths=./**/coverage.opencover.xml /d:sonar.coverage.exclusions=./test/**/*.* /d:sonar.verbose=true
# Build solution
- name: Add msbuild to PATH
Expand Down
11 changes: 11 additions & 0 deletions AxaFrance.Extensions.DependencyInjection.sln
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AxaFrance.Extensions.DependencyInjection.Owin", "src\AxaFrance.Extensions.DependencyInjection.Owin\AxaFrance.Extensions.DependencyInjection.Owin.csproj", "{BAB1E70C-0A99-41AD-9CB5-E0977A34C546}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{9E4A80AF-D2AC-44F6-AD09-BFFC3E456606}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{203A27B2-9012-4BC0-BC28-39FDB1F08254}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -85,6 +89,13 @@ Global
{6AD49E6B-5CB7-4471-86D9-6FB802408E31} = {EBC70037-B810-4345-BD47-ADD776DC1798}
{DF8C69D2-CE09-4938-A3E9-AC04B61B4FCD} = {EBC70037-B810-4345-BD47-ADD776DC1798}
{66D40F60-9395-47A1-AC69-9C222755AF78} = {EBC70037-B810-4345-BD47-ADD776DC1798}
{A6749BC6-D711-4CDB-86C3-719ECDCB40E0} = {9E4A80AF-D2AC-44F6-AD09-BFFC3E456606}
{F260E43F-6649-4E39-B868-C3E3A061AA1B} = {9E4A80AF-D2AC-44F6-AD09-BFFC3E456606}
{2CABF339-32FE-405B-9B65-33563D43CE35} = {9E4A80AF-D2AC-44F6-AD09-BFFC3E456606}
{FF7E695B-6D38-4E42-B352-91CD3FE8394A} = {203A27B2-9012-4BC0-BC28-39FDB1F08254}
{BAB1E70C-0A99-41AD-9CB5-E0977A34C546} = {203A27B2-9012-4BC0-BC28-39FDB1F08254}
{EE0C8EFF-9BD2-4283-A191-5CCBBAE47937} = {203A27B2-9012-4BC0-BC28-39FDB1F08254}
{E17896B1-B53F-4C30-9749-97A8F76CB1AE} = {203A27B2-9012-4BC0-BC28-39FDB1F08254}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F27C8C0C-A9ED-4445-A90B-A3AF5CE968F3}
Expand Down
File renamed without changes.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# AxaFrance Dependency Injection

[![Continuous Integration](https://github.com/AxaFrance/extensions-dependency-injection/actions/workflows/extensions-dependency-injection.yml/badge.svg)](https://github.com/AxaFrance/extensions-dependency-injection/actions/workflows/extensions-dependency-injection.yaml) [![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=AxaFrance_extensions-dependency-injection&metric=alert_status)](https://sonarcloud.io/dashboard?id=AxaFrance_extensions-dependency-injection) [![Reliability](https://sonarcloud.io/api/project_badges/measure?project=AxaFrance_extensions-dependency-injection&metric=reliability_rating)](https://sonarcloud.io/component_measures?id=AxaFrance_extensions-dependency-injection&metric=reliability_rating) [![Security](https://sonarcloud.io/api/project_badges/measure?project=AxaFrance_extensions-dependency-injection&metric=security_rating)](https://sonarcloud.io/component_measures?id=AxaFrance_extensions-dependency-injection&metric=security_rating) [![Code Corevage](https://sonarcloud.io/api/project_badges/measure?project=AxaFrance_extensions-dependency-injection&metric=coverage)](https://sonarcloud.io/component_measures?id=AxaFrance_extensions-dependency-injection&metric=Coverage)

## About
This package allows projects running on older version of .NET Framework to use the new dependency injection framework introduced with ASP.NET Core.
It works with OWIN, MVC and WebApi web applications as well as WCF services.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,9 @@
</PropertyGroup>

<PropertyGroup>
<PackageId>AxaFrance.Extensions.DependencyInjection.Mvc</PackageId>
<Version>1.0.0</Version>
<Authors>AxaFrance</Authors>
<Company>AxaFrance</Company>

<Title>AxaFrance.Extensions.DependencyInjection for MVC</Title>
<Description>Use Microsoft.Extensions.DependencyInjection in old MVC projects</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<RepositoryUrl>https://github.com/AxaGuilDEv/extensions-dependency-injection</RepositoryUrl>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IsPackable>true</IsPackable>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<PackageTags>DependencyInjection;AspNet;MVC</PackageTags>
</PropertyGroup>

<ItemGroup>
Expand All @@ -28,7 +18,6 @@
<ItemGroup>
<PackageReference Include="Microsoft.AspNet.Mvc" Version="5.2.9" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All"/>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,15 @@
</PropertyGroup>

<PropertyGroup>
<PackageId>AxaFrance.Extensions.DependencyInjection.Owin</PackageId>
<Version>1.0.0</Version>
<Authors>AxaFrance</Authors>
<Company>AxaFrance</Company>

<Title>AxaFrance.Extensions.DependencyInjection for OWIN</Title>
<Description>Use Microsoft.Extensions.DependencyInjection in OWIN applications</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<RepositoryUrl>https://github.com/AxaGuilDEv/extensions-dependency-injection</RepositoryUrl>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IsPackable>true</IsPackable>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<PackageTags>DependencyInjection;Owin</PackageTags>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Owin" Version="4.2.2" />
<PackageReference Include="Owin" Version="1.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All"/>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,9 @@
</PropertyGroup>

<PropertyGroup>
<PackageId>AxaFrance.Extensions.DependencyInjection.WCF</PackageId>
<Version>1.0.0</Version>
<Authors>AxaFrance</Authors>
<Company>AxaFrance</Company>

<Title>AxaFrance.Extensions.DependencyInjection for WCF services</Title>
<Description>Use Microsoft.Extensions.DependencyInjection in WCF services</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<RepositoryUrl>https://github.com/AxaGuilDEv/extensions-dependency-injection</RepositoryUrl>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IsPackable>true</IsPackable>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<PackageTags>DependencyInjection;WCF</PackageTags>
</PropertyGroup>

<ItemGroup>
Expand All @@ -29,7 +19,6 @@
<PackageReference Include="System.ServiceModel.Primitives" Version="4.10.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All"/>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,14 @@
</PropertyGroup>

<PropertyGroup>
<PackageId>AxaFrance.Extensions.DependencyInjection.WebApi</PackageId>
<Version>1.0.0</Version>
<Authors>AxaFrance</Authors>
<Company>AxaFrance</Company>

<Title>AxaFrance.Extensions.DependencyInjection for MVC</Title>
<Description>Use Microsoft.Extensions.DependencyInjection in WebApi applications</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<RepositoryUrl>https://github.com/AxaGuilDEv/extensions-dependency-injection</RepositoryUrl>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IsPackable>true</IsPackable>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<PackageTags>DependencyInjection;AspNet;WebApi</PackageTags>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNet.WebApi" Version="5.2.9" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All"/>
</ItemGroup>

</Project>
5 changes: 5 additions & 0 deletions src/Common/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
using System.Reflection;

[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0.0")]
Binary file added src/Common/axa_icon.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 38 additions & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Company>AXA France</Company>
<PackageIcon>axa_icon.jpg</PackageIcon>
<RepositoryType>git</RepositoryType>
<LangVersion>latest</LangVersion>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<IsPackable>true</IsPackable>
<IncludeSymbols>true</IncludeSymbols>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<SrcDir>$(MSBuildThisFileDirectory)</SrcDir>
<PackageReadmeFile>README.md</PackageReadmeFile>
<Copyright>Copyright © AXA France 2019</Copyright>
<PackageProjectUrl>https://github.com/AxaGuilDEv/extensions-dependency-injection</PackageProjectUrl>
<RepositoryUrl>https://github.com/AxaGuilDEv/extensions-dependency-injection</RepositoryUrl>
</PropertyGroup>

<ItemGroup>
<None Include="..\Common\axa_icon.jpg" Pack="true" PackagePath="\"/>
<None Include="..\..\LICENSE" Pack="true"/>
<None Include="..\..\README.md" Pack="true" PackagePath="\"/>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>
</Project>
15 changes: 15 additions & 0 deletions src/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TargetFrameworkMonikerAssemblyAttributesPath>$([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))</TargetFrameworkMonikerAssemblyAttributesPath>
</PropertyGroup>
<ItemGroup>
<EmbeddedFiles Include="$(SrcDir)/Common/**/*.cs"/>
</ItemGroup>
<ItemGroup>
<Compile Include="$(SrcDir)/Common/**/*.cs">
<Visible>true</Visible>
<Link>Common/%(RecursiveDir)%(Filename)%(Extension)</Link>
</Compile>
</ItemGroup>
</Project>

0 comments on commit 9a38e0e

Please sign in to comment.