From f76d70b90c696249674a4aef64a917f9aacecb61 Mon Sep 17 00:00:00 2001 From: "Samir L. Boulema" Date: Mon, 19 Nov 2018 15:15:52 +0100 Subject: [PATCH] Add support for Visual Studio 2019, Add support for Azure Pipelines --- RunAsAdmin.sln | 7 ++- RunAsAdmin/Resources.Designer.cs | 2 +- RunAsAdmin/RunAsAdmin.csproj | 6 +- RunAsAdmin/source.extension.vsixmanifest | 5 +- appveyor.yml | 32 ---------- azure-pipelines.yml | 77 ++++++++++++++++++++++++ publish-manifest.json | 13 ++++ 7 files changed, 100 insertions(+), 42 deletions(-) delete mode 100644 appveyor.yml create mode 100644 azure-pipelines.yml create mode 100644 publish-manifest.json diff --git a/RunAsAdmin.sln b/RunAsAdmin.sln index fb90de2..903e502 100644 --- a/RunAsAdmin.sln +++ b/RunAsAdmin.sln @@ -1,11 +1,12 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26020.0 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.28210.120 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{34FFEFE9-DE5F-45DF-A277-B92ED6A1C66F}" ProjectSection(SolutionItems) = preProject - appveyor.yml = appveyor.yml + azure-pipelines.yml = azure-pipelines.yml + publish-manifest.json = publish-manifest.json README.md = README.md EndProjectSection EndProject diff --git a/RunAsAdmin/Resources.Designer.cs b/RunAsAdmin/Resources.Designer.cs index b2176e1..2c3051d 100644 --- a/RunAsAdmin/Resources.Designer.cs +++ b/RunAsAdmin/Resources.Designer.cs @@ -19,7 +19,7 @@ namespace SamirBoulema.RunAsAdmin { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { diff --git a/RunAsAdmin/RunAsAdmin.csproj b/RunAsAdmin/RunAsAdmin.csproj index e6ed8a9..adaf1cf 100644 --- a/RunAsAdmin/RunAsAdmin.csproj +++ b/RunAsAdmin/RunAsAdmin.csproj @@ -2,7 +2,7 @@ - 15.0 + 16.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) @@ -51,7 +51,7 @@ DEBUG;TRACE prompt 4 - False + False pdbonly @@ -61,7 +61,7 @@ prompt 4 true - False + False diff --git a/RunAsAdmin/source.extension.vsixmanifest b/RunAsAdmin/source.extension.vsixmanifest index 875036a..e2fdc66 100644 --- a/RunAsAdmin/source.extension.vsixmanifest +++ b/RunAsAdmin/source.extension.vsixmanifest @@ -13,16 +13,15 @@ Run As, Admin, Administrator, Root - + - - + diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index f7c53b0..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,32 +0,0 @@ -version: 1.5.{build} -skip_tags: true - -image: Visual Studio 2017 - -configuration: -- Release - -install: -- ps: (new-object Net.WebClient).DownloadString("https://raw.github.com/madskristensen/ExtensionScripts/master/AppVeyor/vsix.ps1") | iex - -before_build: -- ps: >- - Vsix-IncrementVsixVersion | Vsix-UpdateBuildVersion - - nuget restore -Verbosity quiet - -assembly_info: - patch: true - file: '**\AssemblyInfo.*' - assembly_version: '{version}' - assembly_file_version: '{version}' - assembly_informational_version: '{version}' - -build: - verbosity: minimal - -after_build: -- ps: >- - Get-ChildItem ./*.vsix -Recurse | Rename-Item -NewName {$_.basename + '_' + $env:APPVEYOR_BUILD_VERSION + $_.extension } - - Vsix-PushArtifacts | Vsix-PublishToGallery \ No newline at end of file diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..10c6062 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,77 @@ +# .NET Desktop +# Build and run tests for .NET Desktop or Windows classic desktop solutions. +# Add steps that publish symbols, save build artifacts, and more: +# https://docs.microsoft.com/vsts/pipelines/apps/windows/dot-net + +pool: + vmImage: 'VS2017-Win2016' + +trigger: + branches: + include: + - master +# tags: none + +variables: + patch: $[counter('versioncounter', 12)] + solution: '**/*.sln' + buildPlatform: 'Any CPU' + buildConfiguration: 'Release' + +name: 1.6.$(patch) + +steps: +- task: NuGetToolInstaller@0 + +- task: NuGetCommand@2 + inputs: + restoreSolution: '$(solution)' + +- task: bleddynrichards.Assembly-Info-Task.Assembly-Info-Task.Assembly-Info-Task@1 + displayName: 'Update Assembly Version' + inputs: + VersionNumber: '$(Build.BuildNumber)' + FileVersionNumber: '$(Build.BuildNumber)' + InformationalVersion: '$(Build.BuildNumber)' + +- task: VsixToolsUpdateVersion@1 + displayName: 'Update Vsix Version' + inputs: + FileName: $(Build.SourcesDirectory)\$(system.teamProject)\source.extension.vsixmanifest + VersionNumber: '$(Build.BuildNumber)' + +- task: VSBuild@1 + displayName: 'Build Vsix' + inputs: + solution: '$(solution)' + platform: '$(buildPlatform)' + configuration: '$(buildConfiguration)' + +- task: VSTest@2 + displayName: 'Run Tests' + inputs: + platform: '$(buildPlatform)' + configuration: '$(buildConfiguration)' + +- task: CopyFiles@2 + displayName: 'Copy Artifacts to Staging' + inputs: + contents: '**\?(*.vsix|publish-manifest.json|readme.md)' + targetFolder: '$(Build.ArtifactStagingDirectory)' + flattenFolders: true + +- task: PowerShell@2 + displayName: 'Rename Build Artifacts' + inputs: + targetType: 'inline' + script: 'Get-ChildItem ./*.vsix -Recurse | Rename-Item -NewName {$_.basename + "_" + $env:BUILD_BUILDNUMBER + $_.extension }' + workingDirectory: '$(Build.ArtifactStagingDirectory)' + +- task: PublishBuildArtifacts@1 + displayName: 'Publish Build Artifacts' + inputs: + pathtoPublish: '$(Build.ArtifactStagingDirectory)' + artifactName: '$(system.teamProject)' + +- task: VsixToolsUploadVsix@1 + displayName: 'Upload Vsix to Open Gallery' \ No newline at end of file diff --git a/publish-manifest.json b/publish-manifest.json new file mode 100644 index 0000000..3b449c0 --- /dev/null +++ b/publish-manifest.json @@ -0,0 +1,13 @@ +{ + "$schema": "http://json.schemastore.org/vsix-publish", + "categories": [ "testing" ], + "identity": { + "internalName": "RunAsAdmin" + }, + "overview": "readme.md", + "priceCategory": "free", + "publisher": "SamirBoulema", + "private": false, + "qna": true, + "repo": "https://github.com/sboulema/RunAsAdmin" +} \ No newline at end of file