Skip to content

Commit

Permalink
Build strong named dotnet package (#24)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
bwalderman committed Oct 7, 2020
1 parent 5c1f8a3 commit 12461c8
Show file tree
Hide file tree
Showing 17 changed files with 70 additions and 5 deletions.
20 changes: 18 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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'
Expand Down
10 changes: 8 additions & 2 deletions dotnet/Edge.sln
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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>
Binary file not shown.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 7 additions & 0 deletions dotnet/nuget.config
Original file line number Diff line number Diff line change
@@ -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>

0 comments on commit 12461c8

Please sign in to comment.