Skip to content

Commit

Permalink
Add Microsoft.Xbox.Services.DevTools.dll to vpack (#104)
Browse files Browse the repository at this point in the history
* Add Microsoft.Xbox.Services.DevTools.dll to vpack

* add nuget package to build artifacts

* fix nupkg name

* temp disable seccomp since it's broken

* add Microsoft.Xbox.Services.DevTools.dll to codesign

* delay sign Microsoft.Xbox.Services.DevTools with 35MSSharedLib1024.snk

* Add strong name sign to pipeline

* whitespace cleanup

* adding Microsoft.Xbox.Services.DevTools.UnitTest.dll to strong name signing - friend assemblies must also be strong name signed

* update version

* nuget artifact name

* nuget package after signing
  • Loading branch information
natiskan committed Feb 10, 2022
1 parent 460716d commit 24fff96
Show file tree
Hide file tree
Showing 8 changed files with 102 additions and 51 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@
<DocumentationFile>bin\Release\Microsoft.Xbox.Services.DevTools.xml</DocumentationFile>
<LangVersion>7.2</LangVersion>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<DelaySign>true</DelaySign>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>35MSSharedLib1024.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.Identity.Client, Version=1.1.2.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae, processorArchitecture=MSIL">
Expand Down Expand Up @@ -150,6 +159,7 @@
<Compile Include="XblConfig\XboxLiveTier.cs" />
</ItemGroup>
<ItemGroup>
<None Include="35MSSharedLib1024.snk" />
<None Include="App.config" />
<None Include="Microsoft.Xbox.Live.SDK.DevTools.nuspec" />
<None Include="packages.config" />
Expand Down
4 changes: 2 additions & 2 deletions Microsoft.Xbox.Service.DevTools/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
[assembly: AssemblyCopyright("Copyright (c) Microsoft Corporation. All rights reserved")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: InternalsVisibleTo("Microsoft.Xbox.Services.DevTools.UnitTest")]
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")]
[assembly: InternalsVisibleTo("Microsoft.Xbox.Services.DevTools.UnitTest, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,15 @@
<WarningLevel>4</WarningLevel>
<LangVersion>7.2</LangVersion>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<DelaySign>true</DelaySign>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>35MSSharedLib1024.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<HintPath>..\..\packages\Castle.Core.4.2.1\lib\net45\Castle.Core.dll</HintPath>
Expand Down Expand Up @@ -79,6 +88,7 @@
<Compile Include="XblConfigTest.cs" />
</ItemGroup>
<ItemGroup>
<None Include="35MSSharedLib1024.snk" />
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
Expand Down
22 changes: 12 additions & 10 deletions Utilities/Pipelines/Scripts/postBuildScript.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,20 @@ set LONG_SDK_RELEASE_NAME=%SDK_RELEASE_NAME%-%SDK_POINT_NAME_YEAR%%SDK_POINT_NAM
REM ------------------- TOOLS BEGIN -------------------
set TOOLS_RELEASEDIRECTORY=%TOOLS_BINARIESDIRECTORY%\%CONFIGURATION%\anycpu\bin

copy %TOOLS_RELEASEDIRECTORY%\XblConfig\XblConfig.exe %TOOLS_DROP_LOCATION%\ToolZip
copy %TOOLS_RELEASEDIRECTORY%\GlobalStorage\GlobalStorage.exe %TOOLS_DROP_LOCATION%\ToolZip
copy %TOOLS_RELEASEDIRECTORY%\XblDevAccount\XblDevAccount.exe %TOOLS_DROP_LOCATION%\ToolZip
copy %TOOLS_RELEASEDIRECTORY%\XblPlayerDataReset\XblPlayerDataReset.exe %TOOLS_DROP_LOCATION%\ToolZip
copy %TOOLS_RELEASEDIRECTORY%\XblConnectedStorage\XblConnectedStorage.exe %TOOLS_DROP_LOCATION%\ToolZip
copy %TOOLS_RELEASEDIRECTORY%\SessionHistoryViewer\MultiplayerSessionHistoryViewer.exe %TOOLS_DROP_LOCATION%\ToolZip
copy %TOOLS_RELEASEDIRECTORY%\XblConfig\XblConfig.exe %TOOLS_DROP_LOCATION%\ToolZip
copy %TOOLS_RELEASEDIRECTORY%\GlobalStorage\GlobalStorage.exe %TOOLS_DROP_LOCATION%\ToolZip
copy %TOOLS_RELEASEDIRECTORY%\XblDevAccount\XblDevAccount.exe %TOOLS_DROP_LOCATION%\ToolZip
copy %TOOLS_RELEASEDIRECTORY%\XblPlayerDataReset\XblPlayerDataReset.exe %TOOLS_DROP_LOCATION%\ToolZip
copy %TOOLS_RELEASEDIRECTORY%\XblConnectedStorage\XblConnectedStorage.exe %TOOLS_DROP_LOCATION%\ToolZip
copy %TOOLS_RELEASEDIRECTORY%\SessionHistoryViewer\MultiplayerSessionHistoryViewer.exe %TOOLS_DROP_LOCATION%\ToolZip
copy %TOOLS_BINARIESDIRECTORY%\%CONFIGURATION%\Microsoft.Xbox.Services.DevTools.2022.3.0.nupkg %TOOLS_DROP_LOCATION%

REM ------------------- OS VPACK BEGIN -------------------
copy %TOOLS_RELEASEDIRECTORY%\XblConfig\XblConfig.exe %TOOLS_DROP_LOCATION_VPACK%
copy %TOOLS_RELEASEDIRECTORY%\XblConnectedStorage\XblConnectedStorage.exe %TOOLS_DROP_LOCATION_VPACK%
copy %TOOLS_RELEASEDIRECTORY%\XblDevAccount\XblDevAccount.exe %TOOLS_DROP_LOCATION_VPACK%
copy %TOOLS_RELEASEDIRECTORY%\XblPlayerDataReset\XblPlayerDataReset.exe %TOOLS_DROP_LOCATION_VPACK%
copy %TOOLS_RELEASEDIRECTORY%\XblConfig\XblConfig.exe %TOOLS_DROP_LOCATION_VPACK%
copy %TOOLS_RELEASEDIRECTORY%\XblConnectedStorage\XblConnectedStorage.exe %TOOLS_DROP_LOCATION_VPACK%
copy %TOOLS_RELEASEDIRECTORY%\XblDevAccount\XblDevAccount.exe %TOOLS_DROP_LOCATION_VPACK%
copy %TOOLS_RELEASEDIRECTORY%\XblPlayerDataReset\XblPlayerDataReset.exe %TOOLS_DROP_LOCATION_VPACK%
copy %TOOLS_RELEASEDIRECTORY%\Microsoft.Xbox.Services.DevTools\Microsoft.Xbox.Services.DevTools.dll %TOOLS_DROP_LOCATION_VPACK%

echo.
echo Done postBuildScript.cmd
Expand Down
103 changes: 66 additions & 37 deletions Utilities/Pipelines/Tasks/vs2017-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,66 +69,61 @@ steps:
displayName: Component Detection

# Security and compliance, failure here should fail the build
- task: PkgESSecComp@10
displayName: 'Security and Compliance tasks'
inputs:
fileNewBugs: false
taskLogVerbosity: Diagnostic
scanAll: true
failOnStdErr: true
dropOverride: $(Build.ArtifactStagingDirectory)
secCompConfigFromTask: |
tools:
- toolName: CheckCFlags
enable: true
- toolName: CFGCheck
enable: false
- toolName: Policheck
enable: true
- toolName: XFGCheck
enable: true
- toolName: CredScan
enable: true
binVersion: 'PreProduction'

- task: NuGetCommand@2
displayName: 'NuGet pack'
inputs:
command: pack
packagesToPack: Microsoft.Xbox.Service.DevTools/Microsoft.Xbox.Services.DevTools.csproj
packDestination: '$(Build.BINARIESDIRECTORY)\$(CONFIGURATION)'

#- task: PkgESSecComp@10
# displayName: 'Security and Compliance tasks'
# inputs:
# fileNewBugs: false
# taskLogVerbosity: Diagnostic
# scanAll: true
# failOnStdErr: true
# dropOverride: $(Build.ArtifactStagingDirectory)
# secCompConfigFromTask: |
# tools:
# - toolName: CheckCFlags
# enable: true
# - toolName: CFGCheck
# enable: false
# - toolName: Policheck
# enable: true
# - toolName: XFGCheck
# enable: true
# - toolName: CredScan
# enable: true
# binVersion: 'PreProduction'

#ESRP Strong Name Sign. Must come before ESRP Authenticode Sign
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
displayName: 'ESRP Nuget CodeSigning'
displayName: 'ESRP Strong Name Sign'
inputs:
ConnectedServiceName: 'XboxLive.ClientSDK Connection'
FolderPath: '$(BUILD.BINARIESDIRECTORY)/'
Pattern: '*Microsoft.Xbox.Services.DevTools.*.nupkg'
Pattern: '*Microsoft.Xbox.Services.DevTools.dll, *Microsoft.Xbox.Services.DevTools.Unittest.dll'
signConfigType: inlineSignParams
inlineOperation: |
[
{
"KeyCode" : "CP-401405",
"OperationCode" : "NuGetSign",
"KeyCode" : "CP-233863-SN",
"OperationCode" : "StrongNameSign",
"Parameters" : {},
"ToolName" : "sign",
"ToolVersion" : "1.0"
},
{
"KeyCode" : "CP-401405",
"OperationCode" : "NuGetVerify",
"KeyCode" : "CP-233863-SN",
"OperationCode" : "StrongNameVerify",
"Parameters" : {},
"ToolName" : "sign",
"ToolVersion" : "1.0"
}
]
#ESRP AuthentiCode Signing
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
displayName: 'ESRP CodeSigning'
inputs:
ConnectedServiceName: 'XboxLive.ClientSDK Connection'
FolderPath: '$(BUILD.BINARIESDIRECTORY)'
Pattern: '*GlobalStorage.exe, *MultiplayerSessionHistoryViewer.exe, *XblConfig.exe, *XblConnectedStorage.exe, *XblDevAccount.exe, *XblPlayerDataReset.exe'
Pattern: '*GlobalStorage.exe, *MultiplayerSessionHistoryViewer.exe, *XblConfig.exe, *XblConnectedStorage.exe, *XblDevAccount.exe, *XblPlayerDataReset.exe, *Microsoft.Xbox.Services.DevTools.dll'
signConfigType: inlineSignParams
inlineOperation: |
[
Expand All @@ -154,6 +149,40 @@ steps:
}
]
#NuGet Package
- task: NuGetCommand@2
displayName: 'NuGet pack'
inputs:
command: pack
packagesToPack: Microsoft.Xbox.Service.DevTools/Microsoft.Xbox.Services.DevTools.csproj
packDestination: '$(Build.BINARIESDIRECTORY)\$(CONFIGURATION)'

#ESRP NuGet CodeSigning
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
displayName: 'ESRP Nuget CodeSigning'
inputs:
ConnectedServiceName: 'XboxLive.ClientSDK Connection'
FolderPath: '$(BUILD.BINARIESDIRECTORY)/'
Pattern: '*Microsoft.Xbox.Services.DevTools.*.nupkg'
signConfigType: inlineSignParams
inlineOperation: |
[
{
"KeyCode" : "CP-401405",
"OperationCode" : "NuGetSign",
"Parameters" : {},
"ToolName" : "sign",
"ToolVersion" : "1.0"
},
{
"KeyCode" : "CP-401405",
"OperationCode" : "NuGetVerify",
"Parameters" : {},
"ToolName" : "sign",
"ToolVersion" : "1.0"
}
]
- task: BatchScript@1
displayName: postBuildScript.cmd
inputs:
Expand Down
4 changes: 2 additions & 2 deletions custom.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
</Choose>

<PropertyGroup Label="Version">
<VersionMajor>2020</VersionMajor>
<VersionMinor>06</VersionMinor>
<VersionMajor>2022</VersionMajor>
<VersionMinor>03</VersionMinor>
<VersionInfoProductName>Xbox Live Dev Tools</VersionInfoProductName>
</PropertyGroup>

Expand Down

0 comments on commit 24fff96

Please sign in to comment.