Skip to content

Commit

Permalink
Remove incompatible dependencies from Commons (#30)
Browse files Browse the repository at this point in the history
* Correct dotnetcore.yml

* Creating Users project. (see #29)
  • Loading branch information
soroshsabz authored Aug 12, 2022
1 parent e097e4c commit 1108b26
Show file tree
Hide file tree
Showing 23 changed files with 249 additions and 55 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/dotnetcore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
- uses: actions/checkout@v2

- name: setup-msbuild
uses: microsoft/setup-msbuild@v1
uses: microsoft/setup-msbuild@v1.1

- name: Setup NuGet.exe for use with actions
uses: NuGet/[email protected].2
uses: NuGet/[email protected].6

- name: Restore Package
run: nuget restore
Expand Down
13 changes: 11 additions & 2 deletions BSN.Commons.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29519.87
# Visual Studio Version 17
VisualStudioVersion = 17.2.32630.192
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Source", "Source", "{DC377ADC-CC9D-4785-81BE-726DBF5F3096}"
EndProject
Expand All @@ -10,6 +10,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{6F9A45A1-05A3-4DAD-B4F2-DCD4836E110A}"
ProjectSection(SolutionItems) = preProject
Build\BSN.Commons.Orm.EntityFramework.nuspec = Build\BSN.Commons.Orm.EntityFramework.nuspec
Build\BSN.Commons.Users.nuspec = Build\BSN.Commons.Users.nuspec
Build\build.cake = Build\build.cake
Build\build.ps1 = Build\build.ps1
EndProjectSection
Expand All @@ -28,6 +29,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
GitVersion.yml = GitVersion.yml
LICENSE = LICENSE
README.md = README.md
sbuild.bat = sbuild.bat
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BSN.Commons.Orm.EntityFramework.Tests", "Test\BSN.Commons.Orm.EntityFramework.Tests\BSN.Commons.Orm.EntityFramework.Tests.csproj", "{2DF9D69C-E6F0-4CDA-8D8D-12F5D9C91494}"
Expand All @@ -38,6 +40,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BSN.Commons.Orm.EntityFrame
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BSN.Commons.Orm.EntityFrameworkCore", "Source\BSN.Commons.Orm.EntityFrameworkCore\BSN.Commons.Orm.EntityFrameworkCore.csproj", "{335F645B-C85F-42C2-9185-A216101F60C7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BSN.Commons.Users", "Source\BSN.Commons.Users\BSN.Commons.Users.csproj", "{213ABCEF-7E9A-4CE5-A3EF-289C9781344D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -72,6 +76,10 @@ Global
{335F645B-C85F-42C2-9185-A216101F60C7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{335F645B-C85F-42C2-9185-A216101F60C7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{335F645B-C85F-42C2-9185-A216101F60C7}.Release|Any CPU.Build.0 = Release|Any CPU
{213ABCEF-7E9A-4CE5-A3EF-289C9781344D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{213ABCEF-7E9A-4CE5-A3EF-289C9781344D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{213ABCEF-7E9A-4CE5-A3EF-289C9781344D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{213ABCEF-7E9A-4CE5-A3EF-289C9781344D}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -84,6 +92,7 @@ Global
{746AF465-DE8E-41C9-B558-CFFC6E3638D4} = {DC377ADC-CC9D-4785-81BE-726DBF5F3096}
{906FEED8-23E0-4EEF-B902-C39325C50480} = {5C6BA7B5-832A-495A-AF5E-C2A74F6A1EF9}
{335F645B-C85F-42C2-9185-A216101F60C7} = {DC377ADC-CC9D-4785-81BE-726DBF5F3096}
{213ABCEF-7E9A-4CE5-A3EF-289C9781344D} = {DC377ADC-CC9D-4785-81BE-726DBF5F3096}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {BCAF76D3-AA3C-4D0F-8D10-34065F8FED09}
Expand Down
4 changes: 2 additions & 2 deletions Build/BSN.Commons.Orm.EntityFramework.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package >
<metadata>
<id>BSN.Commons.Orm.EntityFramework</id>
<version>1.7.1</version>
<version>1.7.2</version>
<authors>Seyyed Soroosh Hosseinalipour</authors>
<owners>sorosh_sabz, BSN</owners>
<license type="expression">MIT</license>
Expand All @@ -14,7 +14,7 @@
<copyright>BSN Co 2020</copyright>
<tags>Commons ORM Enterprise</tags>
<dependencies>
<dependency id="BSN.Commons" version="1.7.1" />
<dependency id="BSN.Commons" version="1.7.2" />
<dependency id="EntityFramework" version="6.2.0" />
<dependency id="Microsoft.AspNet.Identity.EntityFramework" version="2.2.3" />
</dependencies>
Expand Down
22 changes: 22 additions & 0 deletions Build/BSN.Commons.Users.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0"?>
<package >
<metadata>
<id>BSN.Commons.Users</id>
<version>1.7.2</version>
<authors>Seyyed Soroosh Hosseinalipour</authors>
<owners>sorosh_sabz, BSN</owners>
<license type="expression">MIT</license>
<projectUrl>https://github.com/BSVN/Commons</projectUrl>
<iconUrl>http://ICON_URL_HERE_OR_DELETE_THIS_LINE</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Some identity and user management facilities in enterprise application</description>
<releaseNotes>Seperate dependencies</releaseNotes>
<copyright>BSN Co 2020</copyright>
<tags>Commons Users Enterprise</tags>
<dependencies>
<dependency id="BSN.Commons" version="1.7.2" />
<dependency id="EntityFramework" version="6.2.0" />
<dependency id="Microsoft.AspNet.Identity.EntityFramework" version="2.2.3" />
</dependencies>
</metadata>
</package>
38 changes: 18 additions & 20 deletions Build/build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ var artifactsDir = "./artifacts/";
var solutionPath = "../BSN.Commons.sln";
var projectName = "BSN.Commons";
var projectFolder = "../Source/";
var solutionVersion = "1.7.1";
var solutionVersion = "1.7.2";
var projects = new List<(string path, string name, string version)>
{
("BSN.Commons/", "BSN.Commons.csproj", solutionVersion),
("BSN.Commons.Users/", "BSN.Commons.Users.csproj", solutionVersion),
("BSN.Commons.PresentationInfrastructure/", "BSN.Commons.PresentationInfrastructure.csproj", solutionVersion),
("BSN.Commons.Orm.EntityFramework/", "BSN.Commons.Orm.EntityFramework.csproj", solutionVersion),
("BSN.Commons.Orm.EntityFrameworkCore/", "BSN.Commons.Orm.EntityFrameworkCore.csproj", solutionVersion)
Expand Down Expand Up @@ -72,12 +73,16 @@ Task("Version")
foreach (var project in projects)
{
var finalVersion=project.version;
if (project.name.Contains("EntityFramework.csproj"))
if (project.name.Contains("EntityFramework.csproj") || project.name.Contains("Users.csproj"))
{
UpdateVersion("BSN.Commons.Orm.EntityFramework.nuspec", projectFolder + project.path + "/Properties/AssemblyInfo.cs", finalVersion);
string pureName = project.name.Remove(project.name.IndexOf(".csproj"));
UpdateVersion(pureName + ".nuspec", projectFolder + project.path + "/Properties/AssemblyInfo.cs", finalVersion);
continue;
}
UpdateVersion(projectFolder + project.path + project.name, finalVersion);
else
{
UpdateVersion(projectFolder + project.path + project.name, finalVersion);
}
}
});

Expand All @@ -97,9 +102,6 @@ Task("Build")
Task("Test")
.IsDependentOn("Build")
.Does(() => {
foreach (var testProject in testProjects)
{
var specificCoverageResultsFileName = testProject.name + coverageResultsFileName;
Expand Down Expand Up @@ -146,37 +148,33 @@ Task("Package")
foreach (var project in projects)
{
if (project.name.Contains("EntityFramework.csproj"))
if (project.name.Contains("EntityFramework.csproj") || project.name.Contains("Users.csproj"))
{
string pureName = project.name.Remove(project.name.IndexOf(".csproj"));
var nuGetPackSettings = new NuGetPackSettings
{
BasePath = projectFolder + project.path + "bin/" + Directory(configuration),
OutputDirectory = artifactsDir,
ArgumentCustomization = args => args.Append("-Prop Configuration=" + configuration),
Files = new [] {
new NuSpecContent {
Source = "BSN.Commons.Orm.EntityFramework.dll",
Source = pureName + ".dll",
Target = "lib"
}
}
};
NuGetPack("BSN.Commons.Orm.EntityFramework.nuspec", nuGetPackSettings);
NuGetPack(pureName + ".nuspec", nuGetPackSettings);
if (AppVeyor.IsRunningOnAppVeyor)
{
foreach (var file in GetFiles(artifactsDir + "**/*"))
AppVeyor.UploadArtifact(file.FullPath);
}
continue;
}
DotNetCorePack(projectFolder + project.path + project.name, settings);
}
if (AppVeyor.IsRunningOnAppVeyor)
{
foreach (var file in GetFiles(artifactsDir + "**/*"))
AppVeyor.UploadArtifact(file.FullPath);
}
if (AppVeyor.IsRunningOnAppVeyor)
{
foreach (var file in GetFiles(artifactsDir + "**/*"))
AppVeyor.UploadArtifact(file.FullPath);
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
[assembly: AssemblyDescription("ORM Helpers for using entity framework in enterprise application")]
[assembly: AssemblyCompany("BSN Company")]
[assembly: AssemblyProduct("BSN.Commons.Orm.EntityFramework")]
[assembly: AssemblyVersion("1.7.1")]
[assembly: AssemblyFileVersion("1.7.1")]
[assembly: AssemblyInformationalVersion("1.7.1")]
[assembly: AssemblyCopyright("Copyright © 2020 BSN Co.")]
[assembly: AssemblyVersion("1.7.2")]
[assembly: AssemblyFileVersion("1.7.2")]
[assembly: AssemblyInformationalVersion("1.7.2")]
[assembly: AssemblyCopyright("Copyright © 2020-2022 BSN Co.")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyConfiguration("")]
[assembly: Guid("20ebda57-83dc-4557-bbd2-535cf3c6751b")]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<AssemblyVersion>1.7.1</AssemblyVersion>
<FileVersion>1.7.1</FileVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyVersion>1.7.2</AssemblyVersion>
<FileVersion>1.7.2</FileVersion>
<Authors>BSN Developers</Authors>
<Company>BSN Company</Company>
<Description>ORM Helpers for using entity framework core in enterprise application</Description>
Expand All @@ -13,11 +13,11 @@
<RepositoryUrl>https://github.com/BSVN/Commons.git</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageReleaseNotes>Initial of project</PackageReleaseNotes>
<Version>1.7.1</Version>
<Version>1.7.2</Version>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.8" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.28" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Description>Presentation infrastructure layer of BSN.Commons library for enterprise application.</Description>
<AssemblyVersion>1.7.1</AssemblyVersion>
<FileVersion>1.7.1</FileVersion>
<Version>1.7.1</Version>
<AssemblyVersion>1.7.2</AssemblyVersion>
<FileVersion>1.7.2</FileVersion>
<Version>1.7.2</Version>
<Authors>BSN Developers</Authors>
<Company>BSN Company</Company>
<Copyright>BSN Co 2019</Copyright>
Expand Down
17 changes: 17 additions & 0 deletions Source/BSN.Commons.Users/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="v15.0" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
</configuration>
71 changes: 71 additions & 0 deletions Source/BSN.Commons.Users/BSN.Commons.Users.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{213ABCEF-7E9A-4CE5-A3EF-289C9781344D}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>BSN.Commons.Users</RootNamespace>
<AssemblyName>BSN.Commons.Users</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<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>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\..\packages\EntityFramework.6.1.0\lib\net45\EntityFramework.dll</HintPath>
</Reference>
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\..\packages\EntityFramework.6.1.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
</Reference>
<Reference Include="Microsoft.AspNet.Identity.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.AspNet.Identity.Core.2.2.3\lib\net45\Microsoft.AspNet.Identity.Core.dll</HintPath>
</Reference>
<Reference Include="Microsoft.AspNet.Identity.EntityFramework, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.AspNet.Identity.EntityFramework.2.2.3\lib\net45\Microsoft.AspNet.Identity.EntityFramework.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<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.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Gender.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Roles.cs" />
<Compile Include="User.cs" />
<Compile Include="UserClaim.cs" />
<Compile Include="UserLogin.cs" />
<Compile Include="UserRole.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
File renamed without changes.
23 changes: 23 additions & 0 deletions Source/BSN.Commons.Users/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Cake.
// </auto-generated>
//------------------------------------------------------------------------------
using System.Reflection;
using System.Runtime.InteropServices;
using System;

[assembly: AssemblyTitle("BSN.Commons.Users")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("BSN.Commons.Users")]
[assembly: AssemblyVersion("1.7.2")]
[assembly: AssemblyFileVersion("1.7.2")]
[assembly: AssemblyInformationalVersion("1.7.2")]
[assembly: AssemblyCopyright("Copyright © 2022 BSN Co.")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyConfiguration("")]
[assembly: Guid("213abcef-7e9a-4ce5-a3ef-289c9781344d")]
[assembly: ComVisible(false)]
[assembly: CLSCompliant(false)]

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions Source/BSN.Commons.Users/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="EntityFramework" version="6.1.0" targetFramework="net48" />
<package id="Microsoft.AspNet.Identity.Core" version="2.2.3" targetFramework="net48" />
<package id="Microsoft.AspNet.Identity.EntityFramework" version="2.2.3" targetFramework="net48" />
</packages>
Loading

0 comments on commit 1108b26

Please sign in to comment.