-
Notifications
You must be signed in to change notification settings - Fork 325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert TestPlatform.vsix from V2 to V3 format. #316
Conversation
IEnumerable<string> files = Directory.EnumerateFiles(inputDirectory, "*.*", SearchOption.AllDirectories); | ||
int inputDirectoryLength = inputDirectory.Length; | ||
|
||
using (ZipArchive vsixFile = ZipFile.Open(vsixFilePath, ZipArchiveMode.Create)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: always better to use var instead.
@@ -19,4 +20,7 @@ | |||
<Assets> | |||
<Asset Type="Microsoft.TestPlatform.V2" Path="vstest.console.exe" /> | |||
</Assets> | |||
</PackageManifest> | |||
<Prerequisites> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Explain this dependency please.
And should it be "Visual Studio Core Editor".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add a comment here that it is by default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
…ch is needed for V3 format VSIX
@@ -263,11 +263,17 @@ function Create-VsixPackage | |||
|
|||
Write-Log "Create-VsixPackage: Started." | |||
$packageDir = Get-FullCLRPackageDirectory | |||
$tpSrcDir = Join-Path $env:TP_ROOT_DIR "src" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion : remove whitespace.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in next commit.
|
||
# Copy vsix manifests | ||
$vsixManifests = @("*Content_Types*.xml", | ||
"extension.vsixmanifest", | ||
"License.rtf", | ||
"catalog.json", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion : update alignment for this and the line below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of writing custom steps to copy these items, can we add these files as content to package.csproj so that they could get copied while publishing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sense. Fix in next commit
ZipFile.CreateFromDirectory(inputDirectory, vsixFilePath, CompressionLevel.Fastest, false); | ||
} | ||
// Get all files to put in vsix | ||
IEnumerable<string> files = Directory.EnumerateFiles(inputDirectory, "*.*", SearchOption.AllDirectories); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use var instead of "IEnumerable" as per resharper stylecop conventions.
@dotnet-bot test this please |
Due to limitation with dotnet core tooling, we are going through zip approach.