diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index a7497334..6cf4dd06 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -42,32 +42,107 @@ jobs:
steps:
# step from template @ nf-tools repo
- # all build, update and publish steps
- - template: azure-pipelines-templates/class-lib-build.yml@templates
+
+ # build steps only
+ - template: azure-pipelines-templates/class-lib-build-only.yml@templates
parameters:
sonarCloudProject: 'nanoframework_lib-CoreLibrary'
- msbuildExtraParams: '/p:DefineConstants="NANOCLR_REFLECTION"'
-
-##############################
-- job: Build_mscorlib_no_reflection
- condition: eq(variables['UPDATE_DEPENDENTS'], 'false')
- pool:
- vmImage: 'VS2017-Win2016'
- variables:
- solution: '**/source/*.sln'
- buildPlatform: 'Any CPU'
- buildConfiguration: 'Release'
- nugetPackageName: 'nanoFramework.CoreLibrary.NoReflection'
- repoName: 'lib-CoreLibrary'
-
- steps:
+ # package steps
+ - template: azure-pipelines-templates/class-lib-package.yml@templates
+ parameters:
+ nugetPackageName: 'nanoFramework.CoreLibrary'
- # step from template @ nf-tools repo
- # all build, update and publish steps
- - template: azure-pipelines-templates/class-lib-build.yml@templates
+ - template: azure-pipelines-templates/class-lib-package.yml@templates
parameters:
- sonarCloudProject: 'nanoframework_lib-CoreLibrary.NoReflection'
+ nugetPackageName: 'nanoFramework.CoreLibrary.NoReflection'
+
+ - template: azure-pipelines-templates/class-lib-publish.yml@templates
+
+ # need to push the other package to NuGet because the template above can only push one package (happens on tag builds for any branch)
+ - task: NuGetCommand@2
+ inputs:
+ command: push
+ nuGetFeedType: external
+ allowPackageConflicts: true
+ packagesToPush:
+ $(Build.ArtifactStagingDirectory)/nanoFramework.CoreLibrary.NoReflection.$(MY_NUGET_VERSION).nupkg
+ publishFeedCredentials: 'AzureArtifacts-CoreLibrary'
+ condition: and( succeeded(), ne( variables['StartReleaseCandidate'], true ) )
+ continueOnError: true
+ displayName: Push "NoReflection" variant NuGet package to Azure Artifacts
+
+ - task: NuGetCommand@2
+ inputs:
+ command: push
+ nuGetFeedType: external
+ allowPackageConflicts: true
+ packagesToPush:
+ $(Build.ArtifactStagingDirectory)/nanoFramework.CoreLibrary.NoReflection.$(MY_NUGET_VERSION).nupkg
+ publishFeedCredentials: 'NuGet-CoreLibrary'
+ condition: and( succeeded(), ne( variables['StartReleaseCandidate'], true ) )
+ continueOnError: true
+ displayName: Push "NoReflection" variant NuGet package to Azure Artifacts
+
+ # create or update GitHub release
+ - task: GitHubReleasePublish@1
+ inputs:
+ githubEndpoint: 'nanoframework'
+ githubOwner: 'nanoframework'
+ githubRepositoryName: $(repoName)
+ githubTag: v$(MY_NUGET_VERSION)
+ githubReleaseTitle: '$(nugetPackageName) Library v$(MY_NUGET_VERSION)'
+ githubReleaseNotes: 'Check the [changelog]($(Build.Repository.Uri)/blob/$(Build.SourceBranchName)/CHANGELOG.md).
Install from nanoFramework Azure Artifacts development feed
The following NuGet packages are available for download from this release:
:package: [.NET](https://dev.azure.com/nanoframework/feed/_packaging?_a=package&feed=sandbox&view=overview&package=$(nugetPackageName)&protocolType=NuGet&version=$(MY_NUGET_VERSION)) v$(MY_NUGET_VERSION)
:package: [.NET (without Reflection)](https://dev.azure.com/nanoframework/feed/_packaging?_a=package&feed=sandbox&view=overview&package=$(nugetPackageName).NoReflection&protocolType=NuGet&version=$(MY_NUGET_VERSION)) v$(MY_NUGET_VERSION)'
+ githubTargetCommitsh: $(Build.SourceVersion)
+ githubReleaseDraft: $(RELEASE_DRAFT)
+ githubReleasePrerelease: true
+ githubReuseDraftOnly: false
+ githubReuseRelease: true
+ githubEditRelease: true
+ githubDeleteEmptyTag: true
+ githubReleaseAsset: '$(Build.ArtifactStagingDirectory)/*.nupkg'
+ condition: and( succeeded(), not( startsWith(variables['Build.SourceBranch'], 'refs/pull') ), not( startsWith(variables['Build.SourceBranch'], 'refs/tags/v') ) )
+ displayName: Create/Update GitHub release
+
+ # create or update GitHub release ON tags from release or master branches
+ - task: GitHubReleasePublish@1
+ inputs:
+ githubEndpoint: 'nanoframework'
+ githubOwner: 'nanoframework'
+ githubRepositoryName: $(repoName)
+ githubTag: v$(MY_NUGET_VERSION)
+ githubReleaseTitle: '$(nugetPackageName) Library v$(MY_NUGET_VERSION)'
+ githubReleaseNotes: 'Check the [changelog]($(Build.Repository.Uri)/blob/$(Build.SourceBranchName)/CHANGELOG.md).
Install from NuGet
The following NuGet packages are available for download from this release:
:package: [.NET](https://www.nuget.org/packages/$(nugetPackageName)/$(MY_NUGET_VERSION)) v$(MY_NUGET_VERSION).
:package: [.NET (without Reflection)](https://www.nuget.org/packages/$(nugetPackageName).NoReflection/$(MY_NUGET_VERSION)) v$(MY_NUGET_VERSION)'
+ githubTargetCommitsh: $(Build.SourceVersion)
+ githubReleaseDraft: $(RELEASE_DRAFT)
+ githubReleasePrerelease: true
+ githubReuseDraftOnly: false
+ githubReuseRelease: true
+ githubEditRelease: true
+ githubDeleteEmptyTag: true
+ githubReleaseAsset: '$(Build.ArtifactStagingDirectory)/*.nupkg'
+ condition: and( succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'), contains(variables['Build.SourceBranch'], 'preview') )
+ displayName: Create/Update GitHub PREVIEW release
+
+ # create or update GitHub release ON tags from release or master branches
+ - task: GitHubReleasePublish@1
+ inputs:
+ githubEndpoint: 'nanoframework'
+ githubOwner: 'nanoframework'
+ githubRepositoryName: $(repoName)
+ githubTag: v$(MY_NUGET_VERSION)
+ githubReleaseTitle: '$(nugetPackageName) Library v$(MY_NUGET_VERSION)'
+ githubReleaseNotes: 'Check the [changelog]($(Build.Repository.Uri)/blob/$(Build.SourceBranchName)/CHANGELOG.md).
Install from NuGet
The following NuGet packages are available for download from this release:
:package: [.NET](https://www.nuget.org/packages/$(nugetPackageName)/$(MY_NUGET_VERSION)) v$(MY_NUGET_VERSION).
:package: [.NET (without Reflection)](https://www.nuget.org/packages/$(nugetPackageName).NoReflection/$(MY_NUGET_VERSION)) v$(MY_NUGET_VERSION)'
+ githubTargetCommitsh: $(Build.SourceVersion)
+ githubReleaseDraft: false
+ githubReleasePrerelease: false
+ githubReuseDraftOnly: false
+ githubReuseRelease: false
+ githubEditRelease: false
+ githubDeleteEmptyTag: true
+ githubReleaseAsset: '$(Build.ArtifactStagingDirectory)/*.nupkg'
+ condition: and( succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'), not(contains(variables['Build.SourceBranch'], 'preview') ) )
+ displayName: Create/Update GitHub stable release
##############################
- job: Update_Dependencies
@@ -75,7 +150,6 @@ jobs:
dependsOn:
- Build_mscorlib
- - Build_mscorlib_no_reflection
pool:
vmImage: 'VS2017-Win2016'
@@ -126,7 +200,6 @@ jobs:
dependsOn:
- Build_mscorlib
- - Build_mscorlib_no_reflection
- Update_Dependencies
condition: or( failed('Build_mscorlib'), failed('Build_mscorlib_no_reflection'), failed('Update_Dependencies'))
diff --git a/source/nanoFramework.CoreLibrary.NoReflection/CoreLibrary.NoReflection.nfproj b/source/nanoFramework.CoreLibrary.NoReflection/CoreLibrary.NoReflection.nfproj
new file mode 100644
index 00000000..b59b75d2
--- /dev/null
+++ b/source/nanoFramework.CoreLibrary.NoReflection/CoreLibrary.NoReflection.nfproj
@@ -0,0 +1,383 @@
+
+
+
+ $(MSBuildToolsPath)..\..\..\nanoFramework\v1.0\
+
+
+
+ True
+
+
+ Debug
+ AnyCPU
+ {11A8DD76-328B-46DF-9F39-F559912D0360};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ d1dad305-bc77-4bdc-bcda-adaef1d93455
+ Library
+ 512
+
+
+ mscorlib
+ true
+ mscorlib
+ true
+ true
+ $(DefineConstants)
+ v1.0
+ bin\$(Configuration)\mscorlib.xml
+
+
+ true
+
+
+ ..\nanoFramework.CoreLibrary\key.snk
+
+
+ false
+
+
+ true
+
+ true
+ bin\$(Configuration)\Stubs
+ corlib_native
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105.The missing file is {0}.
+
+
+
+
\ No newline at end of file
diff --git a/source/nanoFramework.CoreLibrary.NoReflection/coreAssembly.rsp b/source/nanoFramework.CoreLibrary.NoReflection/coreAssembly.rsp
new file mode 100644
index 00000000..75e6f703
--- /dev/null
+++ b/source/nanoFramework.CoreLibrary.NoReflection/coreAssembly.rsp
@@ -0,0 +1,2 @@
+# CSC requires the runtimemetadataversion flag when building a core assembly (containing System.Object)
+/runtimemetadataversion:v4.0.30319
diff --git a/source/nanoFramework.CoreLibrary.NoReflection/packages.config b/source/nanoFramework.CoreLibrary.NoReflection/packages.config
new file mode 100644
index 00000000..701ac65e
--- /dev/null
+++ b/source/nanoFramework.CoreLibrary.NoReflection/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/source/nanoFramework.CoreLibrary.sln b/source/nanoFramework.CoreLibrary.sln
index 23f42021..68a1a642 100644
--- a/source/nanoFramework.CoreLibrary.sln
+++ b/source/nanoFramework.CoreLibrary.sln
@@ -5,6 +5,16 @@ VisualStudioVersion = 15.0.27130.2010
MinimumVisualStudioVersion = 10.0.40219.1
Project("{11A8DD76-328B-46DF-9F39-F559912D0360}") = "CoreLibrary", "nanoFramework.CoreLibrary\CoreLibrary.nfproj", "{BE7B95D5-087C-45F8-8197-4B438BEDFE11}"
EndProject
+Project("{11A8DD76-328B-46DF-9F39-F559912D0360}") = "CoreLibrary.NoReflection", "nanoFramework.CoreLibrary.NoReflection\CoreLibrary.NoReflection.nfproj", "{D1DAD305-BC77-4BDC-BCDA-ADAEF1D93455}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{05E83B20-2648-4807-8F3E-D656497E3481}"
+ ProjectSection(SolutionItems) = preProject
+ nanoFramework.CoreLibrary.NoReflection.nuspec = nanoFramework.CoreLibrary.NoReflection.nuspec
+ nanoFramework.CoreLibrary.nuspec = nanoFramework.CoreLibrary.nuspec
+ NuGet.Config = NuGet.Config
+ version.json = version.json
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -15,6 +25,10 @@ Global
{BE7B95D5-087C-45F8-8197-4B438BEDFE11}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BE7B95D5-087C-45F8-8197-4B438BEDFE11}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BE7B95D5-087C-45F8-8197-4B438BEDFE11}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D1DAD305-BC77-4BDC-BCDA-ADAEF1D93455}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D1DAD305-BC77-4BDC-BCDA-ADAEF1D93455}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D1DAD305-BC77-4BDC-BCDA-ADAEF1D93455}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D1DAD305-BC77-4BDC-BCDA-ADAEF1D93455}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/source/nanoFramework.CoreLibrary/CoreLibrary.nfproj b/source/nanoFramework.CoreLibrary/CoreLibrary.nfproj
index 5e41f8eb..2b38367b 100644
--- a/source/nanoFramework.CoreLibrary/CoreLibrary.nfproj
+++ b/source/nanoFramework.CoreLibrary/CoreLibrary.nfproj
@@ -21,7 +21,7 @@
mscorlib
true
true
- $(DefineConstants);
+ $(DefineConstants);NANOCLR_REFLECTION
v1.0
bin\$(Configuration)\mscorlib.xml