diff --git a/CSharpFunctionalExtensions.StrongName/CSharpFunctionalExtensions.StrongName.csproj b/CSharpFunctionalExtensions.StrongName/CSharpFunctionalExtensions.StrongName.csproj
new file mode 100644
index 00000000..89d6ced9
--- /dev/null
+++ b/CSharpFunctionalExtensions.StrongName/CSharpFunctionalExtensions.StrongName.csproj
@@ -0,0 +1,48 @@
+
+
+
+
+ CSharpFunctionalExtensions.StrongName
+ CSharpFunctionalExtensions.snk
+ true
+
+
+
+ CSharpFunctionalExtensions (with a strong name) .NET 4.5
+
+
+ CSharpFunctionalExtensions (with a strong name) .NET 4.6.1
+
+
+ CSharpFunctionalExtensions (with a strong name) .NET Standard 2.0
+
+
+ CSharpFunctionalExtensions (with a strong name) .NET 5.0
+
+
+ CSharpFunctionalExtensions (with a strong name) .NET 6.0
+
+
+
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CSharpFunctionalExtensions.StrongName/CSharpFunctionalExtensions.snk b/CSharpFunctionalExtensions.StrongName/CSharpFunctionalExtensions.snk
new file mode 100644
index 00000000..431c9cf2
Binary files /dev/null and b/CSharpFunctionalExtensions.StrongName/CSharpFunctionalExtensions.snk differ
diff --git a/CSharpFunctionalExtensions.sln b/CSharpFunctionalExtensions.sln
index 08d4cad7..ef8c13b3 100644
--- a/CSharpFunctionalExtensions.sln
+++ b/CSharpFunctionalExtensions.sln
@@ -17,8 +17,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
Dockerfile = Dockerfile
README.md = README.md
version.txt = version.txt
+ Common.Build.props = Common.Build.props
EndProjectSection
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpFunctionalExtensions.StrongName", "CSharpFunctionalExtensions.StrongName\CSharpFunctionalExtensions.StrongName.csproj", "{A86176EF-DCC2-44E5-8F0F-D5F58006DEBB}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -37,6 +40,10 @@ Global
{AAC59D01-6546-4366-B990-4A765EF4D796}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AAC59D01-6546-4366-B990-4A765EF4D796}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AAC59D01-6546-4366-B990-4A765EF4D796}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A86176EF-DCC2-44E5-8F0F-D5F58006DEBB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A86176EF-DCC2-44E5-8F0F-D5F58006DEBB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A86176EF-DCC2-44E5-8F0F-D5F58006DEBB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A86176EF-DCC2-44E5-8F0F-D5F58006DEBB}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/CSharpFunctionalExtensions/CSharpFunctionalExtensions.csproj b/CSharpFunctionalExtensions/CSharpFunctionalExtensions.csproj
index 2545f550..173716db 100644
--- a/CSharpFunctionalExtensions/CSharpFunctionalExtensions.csproj
+++ b/CSharpFunctionalExtensions/CSharpFunctionalExtensions.csproj
@@ -1,23 +1,8 @@
+
+
- net40;net45;net461;netstandard2.0;net5.0;net6.0
CSharpFunctionalExtensions
- Vladimir Khorikov
- CSharpFunctionalExtensions - functional extensions for C#
- false
- C# Functional
- MIT
- https://enterprisecraftsmanship.com/ps-func
- https://github.com/vkhorikov/CSharpFunctionalExtensions/
- en-US
- false
- 9.0
- false
- true
- true
- true
- $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb
- 1591;1701;1702
@@ -38,14 +23,14 @@
- <_Parameter1>CSharpFunctionalExtensions.Tests
+ <_Parameter1>CSharpFunctionalExtensions.Tests
-
+
-
+
all
@@ -54,9 +39,9 @@
-
-
-
+
+
+
BindIf.cs
@@ -118,13 +103,13 @@
GetValueOrDefault.cs
- Map.cs
+ Map.cs
- AsMaybe.cs
+ AsMaybe.cs
- AsMaybe.cs
+ AsMaybe.cs
MapIf.cs
@@ -664,7 +649,7 @@
MapTry.ValueTask.cs
- GetValueOrDefault.cs
+ GetValueOrDefault.cs
GetValueOrDefault.Task.cs
diff --git a/Common.Build.props b/Common.Build.props
new file mode 100644
index 00000000..fb3e81c0
--- /dev/null
+++ b/Common.Build.props
@@ -0,0 +1,21 @@
+
+
+ net40;net45;net461;netstandard2.0;net5.0;net6.0
+ Vladimir Khorikov
+ CSharpFunctionalExtensions - functional extensions for C#
+ false
+ C# Functional
+ MIT
+ https://enterprisecraftsmanship.com/ps-func
+ https://github.com/vkhorikov/CSharpFunctionalExtensions/
+ en-US
+ false
+ 9.0
+ false
+ true
+ true
+ true
+ $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb
+ 1591;1701;1702
+
+
\ No newline at end of file
diff --git a/Dockerfile b/Dockerfile
index 552509f2..35f818f0 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -3,16 +3,22 @@ FROM mcr.microsoft.com/dotnet/sdk:6.0 as build
ARG Version
WORKDIR /app
+COPY ./Common.Build.props ./
COPY ./CSharpFunctionalExtensions/CSharpFunctionalExtensions.csproj ./CSharpFunctionalExtensions/
+COPY ./CSharpFunctionalExtensions.StrongName/CSharpFunctionalExtensions.StrongName.csproj ./CSharpFunctionalExtensions.StrongName/
COPY ./CSharpFunctionalExtensions.Tests/CSharpFunctionalExtensions.Tests.csproj ./CSharpFunctionalExtensions.Tests/
RUN dotnet restore ./CSharpFunctionalExtensions/CSharpFunctionalExtensions.csproj
+RUN dotnet restore ./CSharpFunctionalExtensions.StrongName/CSharpFunctionalExtensions.StrongName.csproj
RUN dotnet restore ./CSharpFunctionalExtensions.Tests/CSharpFunctionalExtensions.Tests.csproj
COPY ./CSharpFunctionalExtensions ./CSharpFunctionalExtensions
+COPY ./CSharpFunctionalExtensions.StrongName ./CSharpFunctionalExtensions.StrongName
COPY ./CSharpFunctionalExtensions.Tests ./CSharpFunctionalExtensions.Tests
RUN dotnet build -c Release --no-restore "./CSharpFunctionalExtensions/CSharpFunctionalExtensions.csproj" /p:Version=$Version
+RUN dotnet build -c Release --no-restore "./CSharpFunctionalExtensions.StrongName/CSharpFunctionalExtensions.StrongName.csproj" /p:Version=$Version
RUN dotnet build -c Release --no-restore "./CSharpFunctionalExtensions.Tests/CSharpFunctionalExtensions.Tests.csproj" /p:Version=$Version
RUN dotnet test "./CSharpFunctionalExtensions.Tests/CSharpFunctionalExtensions.Tests.csproj" -c Release --no-build --no-restore --logger "trx;LogFileName=testresults.trx"; exit 0
RUN dotnet pack "./CSharpFunctionalExtensions/CSharpFunctionalExtensions.csproj" -c Release --no-restore --no-build -o /app/out /p:Version=$Version
+RUN dotnet pack "./CSharpFunctionalExtensions.StrongName/CSharpFunctionalExtensions.StrongName.csproj" -c Release --no-restore --no-build -o /app/out-sn /p:Version=$Version
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 649dc632..8c250557 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -17,7 +17,7 @@ stages:
displayName: Read versions
steps:
- powershell: |
- $newVersion = Get-Content "$(Build.SourcesDirectory)/$(versionFileName)" -First 1
+ $newVersion = Get-Content "$(Build.SourcesDirectory)/$(versionFileName)" -First 1
$releaseInfo = (Get-Content "$(Build.SourcesDirectory)/$(versionFileName)" | Select-Object -Skip 1).Replace('\r\n', '\n')
echo "##vso[task.setvariable variable=newVersion;isOutput=true]$($newVersion)"
echo "##vso[task.setvariable variable=releaseInfo;isOutput=true]$($releaseInfo)"
@@ -34,6 +34,7 @@ stages:
- job: BuildAndTest
displayName: Build and test
dependsOn: Version
+ condition: succeeded('Version')
variables:
newVersion: $[ dependencies.Version.outputs['readNewVersionStep.newVersion'] ]
steps:
@@ -56,11 +57,15 @@ stages:
- script: |
docker create --name build-container build-image
docker cp build-container:./app/out ./out
+ docker cp build-container:./app/out-sn ./out-sn
displayName: Copy artifacts
- publish: ./out
artifact: NuGetPackage
+ - publish: ./out-sn
+ artifact: NuGetPackageStrongName
+
- job: Publish
dependsOn:
- Version
@@ -71,9 +76,9 @@ stages:
currentVersion: $[ dependencies.Version.outputs['readCurrentVersionStep.currentVersion'] ]
contentTypeHeader1: 'Content-Type: application/json'
contentTypeHeader2: 'Content-Type: application/octet-stream'
- authHeader: 'Authorization: token $(gitHubToken)'
+ authHeader: 'Authorization: Bearer $(gitHubToken)'
createReleaseRequest: '{ "tag_name": "v$(newVersion)", "target_commitish": "master", "name": "v$(newVersion)", "body": "$(releaseInfo)", "draft": false, "prerelease": false }'
- condition: ne(dependencies.Version.outputs['readNewVersionStep.newVersion'], dependencies.Version.outputs['readCurrentVersionStep.currentVersion'])
+ condition: and(succeeded('Version'), succeeded('BuildAndTest'), ne(dependencies.Version.outputs['readNewVersionStep.newVersion'], dependencies.Version.outputs['readCurrentVersionStep.currentVersion']))
steps:
- script: |
echo $(newVersion)
@@ -84,13 +89,24 @@ stages:
- download: current
artifact: NuGetPackage
+ - download: current
+ artifact: NuGetPackageStrongName
+
- script: |
curl -X POST -s -H '$(contentTypeHeader1)' -H '$(authHeader)' https://api.github.com/repos/vkhorikov/CSharpFunctionalExtensions/releases -d '$(createReleaseRequest)'
$json = Invoke-RestMethod -Method 'GET' -Uri "https://api.github.com/repos/vkhorikov/CSharpFunctionalExtensions/releases/latest"
$releaseId = $json.id
- curl -X POST -s -H '$(contentTypeHeader2)' -H '$(authHeader)' -F 'data=@$(Pipeline.Workspace)/NuGetPackage/CSharpFunctionalExtensions.$(newVersion).nupkg' https://uploads.github.com/repos/vkhorikov/CSharpFunctionalExtensions/releases/$(releaseId)/assets?name=CSharpFunctionalExtensions.$(newVersion).nupkg
+ curl -X POST -s -H '$(contentTypeHeader2)' -H '$(authHeader)' --data-binary '$(Pipeline.Workspace)/NuGetPackage/CSharpFunctionalExtensions.$(newVersion).nupkg' 'https://uploads.github.com/repos/vkhorikov/CSharpFunctionalExtensions/releases/$(releaseId)/assets?name=CSharpFunctionalExtensions.$(newVersion).nupkg'
+ curl -X POST -s -H '$(contentTypeHeader2)' -H '$(authHeader)' --data-binary '$(Pipeline.Workspace)/NuGetPackageStrongName/CSharpFunctionalExtensions.StrongName.$(newVersion).nupkg' 'https://uploads.github.com/repos/vkhorikov/CSharpFunctionalExtensions/releases/$(releaseId)/assets?name=CSharpFunctionalExtensions.StrongName.$(newVersion).nupkg'
displayName: Publish to GitHub
+ condition: and(succeeded(), ne(variables.gitHubToken, ''))
- script: |
dotnet nuget push $(Pipeline.Workspace)/NuGetPackage/CSharpFunctionalExtensions.$(newVersion).nupkg --source https://api.nuget.org/v3/index.json --api-key $(nugetToken)
displayName: Publish to NuGet
+ condition: and(succeeded(), ne(variables.nugetToken, ''))
+
+ - script: |
+ dotnet nuget push $(Pipeline.Workspace)/NuGetPackage/CSharpFunctionalExtensions.StrongName.$(newVersion).nupkg --source https://api.nuget.org/v3/index.json --api-key $(nugetToken)
+ displayName: Publish strong named package to NuGet
+ condition: and(succeeded(), ne(variables.nugetToken, ''))
diff --git a/version.txt b/version.txt
index d5511937..22722a8d 100644
--- a/version.txt
+++ b/version.txt
@@ -1,6 +1,6 @@
-2.42.0
+2.42.1
New features:
-* #540 Add BindZip to return the Tuple of merged Binds
+* None
Fixed issues:
-* None
\ No newline at end of file
+* #27 Add strong named assembly
\ No newline at end of file