Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .pipelines/OneBranch.Official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ parameters: # parameters are shown up in ADO UI in a build queue time

variables:
- template: variables/version.yml
parameters:
OfficialBuild: true
- template: variables/OneBranchVariables.yml
parameters:
debug: ${{ parameters.debug }}
Expand Down Expand Up @@ -132,8 +134,7 @@ extends:
jobs:
- template: .pipelines/jobs/OneBranchNuGet.yml@self
parameters:
BuildConfiguration: $(BuildConfiguration)
BuildVersion: $(BuildVersion)
NugetPackageVersion: $(NugetPackageVersion)
OfficialBuild: true

- stage: Test
Expand All @@ -151,4 +152,5 @@ extends:
parameters:
BuildConfiguration: $(BuildConfiguration)
BuildVersion: $(BuildVersion)
NugetPackageVersion: $(NugetPackageVersion)
OfficialBuild: true
3 changes: 2 additions & 1 deletion .pipelines/OneBranch.PullRequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ extends:
- template: .pipelines/jobs/OneBranchNuGet.yml@self
parameters:
BuildConfiguration: $(BuildConfiguration)
BuildVersion: $(BuildVersion)
NugetPackageVersion: $(NugetPackageVersion)

- stage: Test
dependsOn: build
Expand All @@ -73,3 +73,4 @@ extends:
parameters:
BuildConfiguration: $(BuildConfiguration)
BuildVersion: $(BuildVersion)
NugetPackageVersion: $(NugetPackageVersion)
7 changes: 2 additions & 5 deletions .pipelines/jobs/OneBranchNuGet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
parameters:
- name: BuildConfiguration
type: string
- name: BuildVersion
- name: NugetPackageVersion
type: string
- name: OfficialBuild
type: boolean
Expand All @@ -15,10 +15,7 @@ jobs:

variables:
ob_outputDirectory: '$(Build.SourcesDirectory)\out'
${{ if eq(parameters.OfficialBuild, true) }}:
PackageVersion: ${{ parameters.BuildVersion }}
${{ else }}:
PackageVersion: ${{ parameters.BuildVersion }}-unofficial
PackageVersion: ${{ parameters.NugetPackageVersion }}

ob_sdl_prefast_enabled: true
ob_sdl_prefast_runDuring: 'Guardian'
Expand Down
9 changes: 3 additions & 6 deletions .pipelines/jobs/OneBranchVsix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ parameters:
type: string
- name: BuildVersion
type: string
- name: NugetPackageVersion
type: string
- name: OfficialBuild
type: boolean
default: false
Expand All @@ -27,11 +29,6 @@ jobs:
VsixFilename: Microsoft.Windows.CppWinRT

variables:
${{ if eq(parameters.OfficialBuild, true) }}:
PackageVersion: ${{ parameters.BuildVersion }}
${{ else }}:
PackageVersion: ${{ parameters.BuildVersion }}-unofficial

ob_outputDirectory: $(Build.SourcesDirectory)\out
ob_artifactSuffix: $(VsVersion)_$(Deployment)

Expand Down Expand Up @@ -96,7 +93,7 @@ jobs:
displayName: Build VSIX
inputs:
solution: $(Build.SourcesDirectory)\vsix\vsix.sln
msbuildArgs: /t:vsix_$(VsVersion) /m /p:CppWinRTVersion=$(PackageVersion),clean_intermediate_files=true,Deployment=$(Deployment),NatvisDirx86=$(Build.SourcesDirectory)\x86\$(Deployment)\,NatvisDirx64=$(Build.SourcesDirectory)\x64\$(Deployment)\,NatvisDirarm64=$(Build.SourcesDirectory)\arm64\$(Deployment)\,NupkgDir=$(Pipeline.Workspace)\nuget\packages /bl:$(ob_outputDirectory)\output.binlog
msbuildArgs: /t:vsix_$(VsVersion) /m /p:CppWinRTVersion=${{ parameters.BuildVersion }},NugetPackageVersion=${{ parameters.NugetPackageVersion }},clean_intermediate_files=true,Deployment=$(Deployment),NatvisDirx86=$(Build.SourcesDirectory)\x86\$(Deployment)\,NatvisDirx64=$(Build.SourcesDirectory)\x64\$(Deployment)\,NatvisDirarm64=$(Build.SourcesDirectory)\arm64\$(Deployment)\,NupkgDir=$(Pipeline.Workspace)\nuget\packages /bl:$(ob_outputDirectory)\output.binlog
platform: 'Any CPU'
configuration: ${{ parameters.BuildConfiguration }}

Expand Down
12 changes: 11 additions & 1 deletion .pipelines/variables/version.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
parameters:
- name: OfficialBuild
type: boolean
default: false

variables:
MajorVersion: "2"
MinorVersion: "0"
VersionDate: $[format('{0:yyMMdd}', pipeline.startTime)]
VersionCounter: $[counter(variables['VersionDate'], 1)]
BuildVersion: $(MajorVersion).$(MinorVersion).$(VersionDate).$(VersionCounter)
PatchVersion: $(VersionDate)$(VersionCounter)
PatchVersion: $(VersionDate)$(VersionCounter)

${{ if eq(parameters.OfficialBuild, true) }}:
NugetPackageVersion: $(BuildVersion)
${{ else }}:
NugetPackageVersion: $(BuildVersion)-unofficial
4 changes: 2 additions & 2 deletions build_vsix.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ call msbuild /p:Configuration=%target_configuration%,Platform=x86,Deployment=%ta
call msbuild /p:Configuration=%target_configuration%,Platform=arm64,Deployment=%target_deployment%,CppWinRTBuildVersion=%target_version% natvis\cppwinrtvisualizer.sln

rem Build nuget
.nuget\nuget.exe pack nuget\Microsoft.Windows.CppWinRT.nuspec -NonInteractive -OutputDirectory %this_dir%_build -Properties Configuration=%target_configuration%;cppwinrt_exe=%this_dir%_build\x86\%target_configuration%\cppwinrt.exe;cppwinrt_fast_fwd_x86=%this_dir%_build\x86\%target_configuration%\cppwinrt_fast_forwarder.lib;cppwinrt_fast_fwd_x64=%this_dir%_build\x64\%target_configuration%\cppwinrt_fast_forwarder.lib;cppwinrt_fast_fwd_arm64=%this_dir%_build\arm64\%target_configuration%\cppwinrt_fast_forwarder.lib -version %target_version% -Verbosity Detailed
.nuget\nuget.exe pack nuget\Microsoft.Windows.CppWinRT.nuspec -NonInteractive -OutputDirectory %this_dir%_build -Properties Configuration=%target_configuration%;cppwinrt_exe=%this_dir%_build\x86\%target_configuration%\cppwinrt.exe;cppwinrt_fast_fwd_x86=%this_dir%_build\x86\%target_configuration%\cppwinrt_fast_forwarder.lib;cppwinrt_fast_fwd_x64=%this_dir%_build\x64\%target_configuration%\cppwinrt_fast_forwarder.lib;cppwinrt_fast_fwd_arm64=%this_dir%_build\arm64\%target_configuration%\cppwinrt_fast_forwarder.lib;target_version=%target_version% -version %target_version% -Verbosity Detailed

rem Build vsix
call msbuild /restore /p:Configuration=%target_configuration%,Platform="Any CPU",Deployment=%target_deployment%,CppWinRTVersion=%target_version%,NatvisDirx86=%this_dir%natvis\x86\%target_configuration%\%target_deployment%,NatvisDirx64=%this_dir%natvis\x64\%target_configuration%\%target_deployment%,NatvisDirarm64=%this_dir%natvis\arm64\%target_configuration%\%target_deployment%,NupkgDir=%this_dir%_build vsix\vsix.sln
call msbuild /restore /p:Configuration=%target_configuration%,Platform="Any CPU",Deployment=%target_deployment%,CppWinRTVersion=%target_version%,NugetPackageVersion=%target_version%,NatvisDirx86=%this_dir%natvis\x86\%target_configuration%\%target_deployment%,NatvisDirx64=%this_dir%natvis\x64\%target_configuration%\%target_deployment%,NatvisDirarm64=%this_dir%natvis\arm64\%target_configuration%\%target_deployment%,NupkgDir=%this_dir%_build vsix\vsix.sln
2 changes: 1 addition & 1 deletion vsix/Dev16/Component/source.extension.vsixmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<Asset Type="DebuggerEngineExtension" Path="CppWinrtVisualizer.vsdconfig" />
<Asset Type="Microsoft.VisualStudio.ItemTemplate" Path="ItemTemplates" />
<Asset Type="Microsoft.VisualStudio.ProjectTemplate" Path="ProjectTemplates" />
<Asset Type="Microsoft.Windows.CppWinRT.|%CurrentProject%;GetCppWinRTVersion|.nupkg" Source="File" Path="Microsoft.Windows.CppWinRT.|%CurrentProject%;GetCppWinRTVersion|.nupkg" VsixSubPath="Packages" />
<Asset Type="Microsoft.Windows.CppWinRT.|%CurrentProject%;GetNugetPackageVersion|.nupkg" Source="File" Path="Microsoft.Windows.CppWinRT.|%CurrentProject%;GetNugetPackageVersion|.nupkg" VsixSubPath="Packages" />
</Assets>
<Prerequisites>
<Prerequisite Id="Microsoft.VisualStudio.Component.VC.CoreBuildTools" Version="[16.0,18.0)" DisplayName="CppWinRT" />
Expand Down
2 changes: 1 addition & 1 deletion vsix/Dev16/Standalone/source.extension.vsixmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<Asset Type="DebuggerEngineExtension" Path="CppWinrtVisualizer.vsdconfig" />
<Asset Type="Microsoft.VisualStudio.ItemTemplate" Path="ItemTemplates" />
<Asset Type="Microsoft.VisualStudio.ProjectTemplate" Path="ProjectTemplates" />
<Asset Type="Microsoft.Windows.CppWinRT.|%CurrentProject%;GetCppWinRTVersion|.nupkg" Source="File" Path="Microsoft.Windows.CppWinRT.|%CurrentProject%;GetCppWinRTVersion|.nupkg" VsixSubPath="Packages" />
<Asset Type="Microsoft.Windows.CppWinRT.|%CurrentProject%;GetNugetPackageVersion|.nupkg" Source="File" Path="Microsoft.Windows.CppWinRT.|%CurrentProject%;GetNugetPackageVersion|.nupkg" VsixSubPath="Packages" />
</Assets>
<Prerequisites>
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[16.0,)" DisplayName="Visual Studio core editor" />
Expand Down
4 changes: 2 additions & 2 deletions vsix/Dev16/vsix.Dev16.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
<Link>%(Filename)%(Extension)</Link>
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
<Content Include="$(NupkgDir)\Microsoft.Windows.CppWinRT.$(CppWinRTVersion).nupkg">
<Link>Packages\Microsoft.Windows.CppWinRT.$(CppWinRTVersion).nupkg</Link>
<Content Include="$(NupkgDir)\Microsoft.Windows.CppWinRT.$(NugetPackageVersion).nupkg">
<Link>Packages\Microsoft.Windows.CppWinRT.$(NugetPackageVersion).nupkg</Link>
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
<Content Include="$(VSIXRootDir)..\natvis\cppwinrt.natvis">
Expand Down
2 changes: 1 addition & 1 deletion vsix/Dev17/Component/source.extension.vsixmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<Asset Type="DebuggerEngineExtension" Path="CppWinrtVisualizer.vsdconfig" />
<Asset Type="Microsoft.VisualStudio.ItemTemplate" Path="ItemTemplates" />
<Asset Type="Microsoft.VisualStudio.ProjectTemplate" Path="ProjectTemplates" />
<Asset Type="Microsoft.Windows.CppWinRT.|%CurrentProject%;GetCppWinRTVersion|.nupkg" Source="File" Path="Microsoft.Windows.CppWinRT.|%CurrentProject%;GetCppWinRTVersion|.nupkg" VsixSubPath="Packages" />
<Asset Type="Microsoft.Windows.CppWinRT.|%CurrentProject%;GetNugetPackageVersion|.nupkg" Source="File" Path="Microsoft.Windows.CppWinRT.|%CurrentProject%;GetNugetPackageVersion|.nupkg" VsixSubPath="Packages" />
</Assets>
<Prerequisites>
<Prerequisite Id="Microsoft.VisualStudio.Component.VC.CoreBuildTools" Version="[17.0,18.0)" DisplayName="CppWinRT" />
Expand Down
2 changes: 1 addition & 1 deletion vsix/Dev17/Standalone/source.extension.vsixmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<Asset Type="DebuggerEngineExtension" Path="CppWinrtVisualizer.vsdconfig" />
<Asset Type="Microsoft.VisualStudio.ItemTemplate" Path="ItemTemplates" />
<Asset Type="Microsoft.VisualStudio.ProjectTemplate" Path="ProjectTemplates" />
<Asset Type="Microsoft.Windows.CppWinRT.|%CurrentProject%;GetCppWinRTVersion|.nupkg" Source="File" Path="Microsoft.Windows.CppWinRT.|%CurrentProject%;GetCppWinRTVersion|.nupkg" VsixSubPath="Packages" />
<Asset Type="Microsoft.Windows.CppWinRT.|%CurrentProject%;GetNugetPackageVersion|.nupkg" Source="File" Path="Microsoft.Windows.CppWinRT.|%CurrentProject%;GetNugetPackageVersion|.nupkg" VsixSubPath="Packages" />
</Assets>
<Prerequisites>
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[17.0,)" DisplayName="Visual Studio core editor" />
Expand Down
4 changes: 2 additions & 2 deletions vsix/Dev17/vsix.Dev17.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
<Link>%(Filename)%(Extension)</Link>
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
<Content Include="$(NupkgDir)\Microsoft.Windows.CppWinRT.$(CppWinRTVersion).nupkg">
<Link>Packages\Microsoft.Windows.CppWinRT.$(CppWinRTVersion).nupkg</Link>
<Content Include="$(NupkgDir)\Microsoft.Windows.CppWinRT.$(NugetPackageVersion).nupkg">
<Link>Packages\Microsoft.Windows.CppWinRT.$(NugetPackageVersion).nupkg</Link>
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
<Content Include="$(VSIXRootDir)..\natvis\cppwinrt.natvis">
Expand Down
4 changes: 3 additions & 1 deletion vsix/Extension.targets
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<Target Name="GetCppWinRTVersion" Outputs="$(CppWinRTVersion)" />
<Target Name="GetNugetPackageVersion" Outputs="$(NugetPackageVersion)" />
<Target Name="PrepareBuild" BeforeTargets="PrepareForBuild">
<Error Condition="'$(CppWinRTVersion)' == ''" Text="The project must be supplied with a CppWinRTVersion property value" />
<Error Condition="'$(NugetPackageVersion)' == ''" Text="The project must be supplied with a NugetPackageVersion property value" />
<Error Condition="'$(NatvisDirx86)' == ''" Text="The project must be supplied with a NatvisDirx86 property value" />
<Error Condition="'$(NatvisDirx64)' == ''" Text="The project must be supplied with a NatvisDirx64 property value" />
<Error Condition="'$(NupkgDir)' == ''" Text="The project must be supplied with a NupkgDir property value" />
Expand All @@ -27,7 +29,7 @@
<XmlPoke XmlInputPath="%(StagedTemplates.Identity)" Query="/ns:VSTemplate/ns:WizardData/ns:packages/@repositoryId" Value="$(NugetRepositoryId)" Namespaces="&lt;Namespace Prefix='ns' Uri='http://schemas.microsoft.com/developer/vstemplate/2005' /&gt;" />

<!-- Update Packages section with actual NuGet package version to restore -->
<XmlPoke XmlInputPath="%(StagedTemplates.Identity)" Query="/ns:VSTemplate/ns:WizardData/ns:packages/ns:package/@version" Value="$(CppWinRTVersion)" Namespaces="&lt;Namespace Prefix='ns' Uri='http://schemas.microsoft.com/developer/vstemplate/2005' /&gt;" />
<XmlPoke XmlInputPath="%(StagedTemplates.Identity)" Query="/ns:VSTemplate/ns:WizardData/ns:packages/ns:package/@version" Value="$(NugetPackageVersion)" Namespaces="&lt;Namespace Prefix='ns' Uri='http://schemas.microsoft.com/developer/vstemplate/2005' /&gt;" />

<!-- Update the Package GUID in the Name and Description metadata -->
<XmlPoke XmlInputPath="%(StagedTemplates.Identity)" Query="/ns:VSTemplate/ns:TemplateData/ns:Name/@Package" Value="$(PackageGuidString)" Namespaces="&lt;Namespace Prefix='ns' Uri='http://schemas.microsoft.com/developer/vstemplate/2005' /&gt;" />
Expand Down