Skip to content

Commit

Permalink
Add support for Visual Studio 2019, Add support for Azure Pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
sboulema committed Nov 19, 2018
1 parent 0b9b38c commit f76d70b
Show file tree
Hide file tree
Showing 7 changed files with 100 additions and 42 deletions.
7 changes: 4 additions & 3 deletions RunAsAdmin.sln
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion RunAsAdmin/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions RunAsAdmin/RunAsAdmin.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">
<Import Project="..\packages\Microsoft.VSSDK.BuildTools.15.0.26201\build\Microsoft.VSSDK.BuildTools.props" Condition="Exists('..\packages\Microsoft.VSSDK.BuildTools.15.0.26201\build\Microsoft.VSSDK.BuildTools.props')" />
<PropertyGroup>
<MinimumVisualStudioVersion>15.0</MinimumVisualStudioVersion>
<MinimumVisualStudioVersion>16.0</MinimumVisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
<FileUpgradeFlags>
</FileUpgradeFlags>
Expand Down Expand Up @@ -51,7 +51,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DeployExtension>False</DeployExtension>
<DeployExtension Condition=" '$(AppVeyor)' != '' Or '$(TF_BUILD)' != '' ">False</DeployExtension>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand All @@ -61,7 +61,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<RunCodeAnalysis>true</RunCodeAnalysis>
<DeployExtension>False</DeployExtension>
<DeployExtension Condition=" '$(AppVeyor)' != '' Or '$(TF_BUILD)' != '' ">False</DeployExtension>
</PropertyGroup>
<ItemGroup>
<Reference Include="EnvDTE, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
Expand Down
5 changes: 2 additions & 3 deletions RunAsAdmin/source.extension.vsixmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,15 @@
<Tags>Run As, Admin, Administrator, Root</Tags>
</Metadata>
<Installation InstalledByMsi="false">
<InstallationTarget Id="Microsoft.VisualStudio.Pro" Version="[14.0,15.0]" />
<InstallationTarget Id="Microsoft.VisualStudio.Pro" Version="[14.0,17.0)" />
</Installation>
<Dependencies>
<Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" d:Source="Manual" Version="[4.5,)" />
<Dependency Id="Microsoft.VisualStudio.MPF.14.0" DisplayName="Visual Studio MPF 14.0" d:Source="Installed" Version="[14.0]" />
</Dependencies>
<Assets>
<Asset Type="Microsoft.VisualStudio.VsPackage" d:Source="Project" d:ProjectName="%CurrentProject%" Path="|%CurrentProject%;PkgdefProjectOutputGroup|" />
</Assets>
<Prerequisites>
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[15.0.26004.1,16.0)" DisplayName="Visual Studio core editor" />
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[15.0,)" DisplayName="Visual Studio core editor" />
</Prerequisites>
</PackageManifest>
32 changes: 0 additions & 32 deletions appveyor.yml

This file was deleted.

77 changes: 77 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -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'
13 changes: 13 additions & 0 deletions publish-manifest.json
Original file line number Diff line number Diff line change
@@ -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"
}

0 comments on commit f76d70b

Please sign in to comment.