Build strong named dotnet package (#24)

* Add strong named assembly project.

* Rename dotnet project folders.

* Add Selenium package source.

* Update azure-pipelines.yml.

* Update azure-pipelines.yml.

* Update azure-pipelines.yml.

* Use nuget.config file.

* Update azure-pipelines.yml.

* Update azure-pipelines.yml.

* Update azure-pipelines.yml.

* Fix project path typo.

* Remove powershell debug lines.

* Update project include paths.

* Update reference in test project.

* Update path in azure-pipelines.yml.
This commit is contained in:
Brandon Walderman 2020-10-07 08:54:47 -07:00 коммит произвёл GitHub
Родитель 5c1f8a32aa
Коммит 12461c80df
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
17 изменённых файлов: 70 добавлений и 5 удалений

Просмотреть файл

@ -6,11 +6,21 @@ steps:
inputs:
versionSpec:
- powershell: |
$SeleniumWebDriver = "selenium-dotnet-strongnamed-3.141.0"
$SeleniumWebDriverZip = "$SeleniumWebDriver.zip"
$SeleniumWebDriverDownloadUrl = "http://selenium-release.storage.googleapis.com/3.141/$SeleniumWebDriverZip"
$OutFile = "$env:PIPELINE_WORKSPACE/$SeleniumWebDriverZip"
Invoke-WebRequest $SeleniumWebDriverDownloadUrl -OutFile $OutFile
Expand-Archive $OutFile -DestinationPath "$env:PIPELINE_WORKSPACE/$SeleniumWebDriver"
displayName: download Selenium WebDriver strong-named package
- task: NuGetCommand@2
inputs:
command: 'restore'
restoreSolution: '**/*.sln'
feedsToUse: 'select'
feedsToUse: 'config'
nugetConfigPath: 'dotnet/nuget.config'
- task: VSBuild@1
inputs:
@ -29,10 +39,16 @@ steps:
- task: CopyFiles@2
inputs:
sourceFolder: 'dotnet\Edge\bin\Release'
sourceFolder: 'dotnet\Microsoft.Edge.SeleniumTools\bin\Release'
contents: '*.nupkg'
targetFolder: '$(Build.ArtifactStagingDirectory)\dotnet'
- task: CopyFiles@2
inputs:
sourceFolder: 'dotnet\Microsoft.Edge.SeleniumTools.StrongNamed\bin\Release'
contents: '*.nupkg'
targetFolder: '$(Build.ArtifactStagingDirectory)\dotnet-strongnamed'
- script: |
python -m pip install --upgrade pip setuptools wheel
workingDirectory: 'py'

Просмотреть файл

@ -3,9 +3,11 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29806.167
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Edge.SeleniumTools", "Edge\Microsoft.Edge.SeleniumTools.csproj", "{341F7687-6C2A-41AE-99F1-6D9A0322422A}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Edge.SeleniumTools", "Microsoft.Edge.SeleniumTools\Microsoft.Edge.SeleniumTools.csproj", "{341F7687-6C2A-41AE-99F1-6D9A0322422A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Edge.SeleniumTools.Test", "Edge.Test\Microsoft.Edge.SeleniumTools.Test.csproj", "{ED6B9F74-7228-44CD-8F1E-B1E5329AFC1A}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Edge.SeleniumTools.Test", "Microsoft.Edge.SeleniumTools.Test\Microsoft.Edge.SeleniumTools.Test.csproj", "{ED6B9F74-7228-44CD-8F1E-B1E5329AFC1A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Edge.SeleniumTools.StrongNamed", "Microsoft.Edge.SeleniumTools.StrongNamed\Microsoft.Edge.SeleniumTools.StrongNamed.csproj", "{777E682A-238F-4C1F-BE09-9B0E8B560285}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -21,6 +23,10 @@ Global
{ED6B9F74-7228-44CD-8F1E-B1E5329AFC1A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ED6B9F74-7228-44CD-8F1E-B1E5329AFC1A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ED6B9F74-7228-44CD-8F1E-B1E5329AFC1A}.Release|Any CPU.Build.0 = Release|Any CPU
{777E682A-238F-4C1F-BE09-9B0E8B560285}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{777E682A-238F-4C1F-BE09-9B0E8B560285}.Debug|Any CPU.Build.0 = Debug|Any CPU
{777E682A-238F-4C1F-BE09-9B0E8B560285}.Release|Any CPU.ActiveCfg = Release|Any CPU
{777E682A-238F-4C1F-BE09-9B0E8B560285}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

Просмотреть файл

@ -0,0 +1,36 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net45;net40;net35;netstandard2.0</TargetFrameworks>
<Authors>Microsoft</Authors>
<PackageId>Microsoft.Edge.SeleniumTools.StrongNamed</PackageId>
<Version>3.141.2</Version>
<Product>Selenium Tools for Microsoft Edge</Product>
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<Description>An updated EdgeDriver implementation for Selenium 3 with newly-added support for Edge Chromium.</Description>
<Company>Microsoft</Company>
<PackageProjectUrl>https://github.com/microsoft/edge-selenium-tools</PackageProjectUrl>
<RepositoryUrl>https://github.com/microsoft/edge-selenium-tools</RepositoryUrl>
<RepositoryType>GitHub</RepositoryType>
<PackageTags>selenium webdriver edge dotnet</PackageTags>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>WebDriver.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\Microsoft.Edge.SeleniumTools\AssemblyInfo.cs" Link="AssemblyInfo.cs" />
<Compile Include="..\Microsoft.Edge.SeleniumTools\EdgeDriver.cs" Link="EdgeDriver.cs" />
<Compile Include="..\Microsoft.Edge.SeleniumTools\EdgeDriverService.cs" Link="EdgeDriverService.cs" />
<Compile Include="..\Microsoft.Edge.SeleniumTools\EdgeMobileEmulationDeviceSettings.cs" Link="EdgeMobileEmulationDeviceSettings.cs" />
<Compile Include="..\Microsoft.Edge.SeleniumTools\EdgeNetworkConditions.cs" Link="EdgeNetworkConditions.cs" />
<Compile Include="..\Microsoft.Edge.SeleniumTools\EdgeOptions.cs" Link="EdgeOptions.cs" />
<Compile Include="..\Microsoft.Edge.SeleniumTools\EdgePerformanceLoggingPreferences.cs" Link="EdgePerformanceLoggingPreferences.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Selenium.WebDriver.StrongNamed" Version="[3.141.0]" />
</ItemGroup>
</Project>

Двоичные данные
dotnet/Microsoft.Edge.SeleniumTools.StrongNamed/WebDriver.snk Normal file

Двоичный файл не отображается.

Просмотреть файл

@ -60,7 +60,7 @@
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Edge\Microsoft.Edge.SeleniumTools.csproj">
<ProjectReference Include="..\Microsoft.Edge.SeleniumTools\Microsoft.Edge.SeleniumTools.csproj">
<Project>{341F7687-6C2A-41AE-99F1-6D9A0322422A}</Project>
<Name>Microsoft.Edge.SeleniumTools</Name>
</ProjectReference>

7
dotnet/nuget.config Normal file
Просмотреть файл

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<packageSources>
<add key="selenium" value="%PIPELINE_WORKSPACE%/selenium-dotnet-strongnamed-3.141.0/dist" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>