Skip to content

Commit 112d4f2

Browse files
nvborisenkodiemol
andauthored
[dotnet] Make WebDriver.csproj file more friendly with native pack command (#12235)
Make csproj file more friendly with native pack command Co-authored-by: Diego Molina <diemol@users.noreply.github.com>
1 parent 787694b commit 112d4f2

File tree

1 file changed

+49
-8
lines changed

1 file changed

+49
-8
lines changed

dotnet/src/webdriver/WebDriver.csproj

Lines changed: 49 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,36 @@
88

99
<PropertyGroup>
1010
<AssemblyTitle>WebDriver</AssemblyTitle>
11-
<Description>Selenium WebDriver API .NET Bindings</Description>
1211
<Company>Selenium Committers</Company>
1312
<Copyright>Copyright © Software Freedom Conservancy 2018</Copyright>
1413
<Product>Selenium</Product>
1514
<Version>4.0.0</Version>
16-
<PackageId>Selenium.WebDriver</PackageId>
1715
<AssemblyVersion>4.0.0.0</AssemblyVersion>
1816
<FileVersion>4.0.0.0</FileVersion>
1917

18+
<PackageId>Selenium.WebDriver</PackageId>
19+
<Authors>Selenium Committers</Authors>
20+
21+
<Title>Selenium WebDriver</Title>
22+
23+
<PackageProjectUrl>https://selenium.dev</PackageProjectUrl>
24+
<RepositoryType>GitHub</RepositoryType>
25+
<RepositoryUrl>https://github.com/SeleniumHQ/selenium</RepositoryUrl>
26+
<Description>
27+
Selenium is a set of different software tools each with a different approach
28+
to supporting browser automation. These tools are highly flexible, allowing
29+
many options for locating and manipulating elements within a browser, and one
30+
of its key features is the support for automating multiple browser platforms.
31+
This package contains the .NET bindings for the concise and object-based
32+
Selenium WebDriver API, which uses native OS-level events to manipulate the
33+
browser, bypassing the JavaScript sandbox, and does not require the Selenium
34+
Server to automate the browser.
35+
</Description>
36+
<PackageTags>selenium webdriver browser automation</PackageTags>
37+
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
38+
<PackageIconUrl>https://selenium.dev/images/selenium_logo_square_green.png</PackageIconUrl>
39+
<PackageIcon>logo.png</PackageIcon>
40+
2041
<GenerateDocumentationFile>true</GenerateDocumentationFile>
2142
</PropertyGroup>
2243

@@ -47,9 +68,19 @@
4768
<Compile Include="..\..\..\bazel-bin\dotnet\src\webdriver\cdp\**\*.cs" LinkBase="DevTools\generated" />
4869
</ItemGroup>
4970

50-
<ItemGroup>
71+
<ItemGroup Condition="$(TargetFramework) == 'netstandard2.0' or $(TargetFramework) == 'netstandard2.1' or $(TargetFramework) == 'net5.0' or $(TargetFramework) == 'net6.0'">
5172
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
52-
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="6.19.0" />
73+
</ItemGroup>
74+
75+
<ItemGroup Condition="$(TargetFramework) == 'net45' or $(TargetFramework) == 'net46' or $(TargetFramework) == 'net47' or $(TargetFramework) == 'net48'">
76+
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" PrivateAssets="All" />
77+
78+
<Reference Include="System.Net.Http" />
79+
<Reference Include="System.IO.Compression" />
80+
</ItemGroup>
81+
82+
<ItemGroup>
83+
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="6.19.0" PrivateAssets="All"/>
5384
</ItemGroup>
5485

5586
<ItemGroup>
@@ -75,13 +106,23 @@
75106
</EmbeddedResource>
76107
</ItemGroup>
77108

78-
<ItemGroup Condition="'$(TargetFramework)'!='net6.0' And '$(TargetFramework)'!='net5.0' And '$(TargetFramework)'!='netstandard2.0' And '$(TargetFramework)'!='netstandard2.1'">
79-
<Reference Include="System.Net.Http" />
80-
<Reference Include="System.IO.Compression" />
109+
<ItemGroup>
110+
<Folder Include="Remote\JsonConverters\" />
81111
</ItemGroup>
82112

113+
<PropertyGroup>
114+
<BaseSeleniumManagerPath>..\..\..\common\manager</BaseSeleniumManagerPath>
115+
</PropertyGroup>
116+
83117
<ItemGroup>
84-
<Folder Include="Remote\JsonConverters\" />
118+
<None Include="build\Selenium.WebDriver.targets" Pack="true" PackagePath="build\" />
119+
<None Include="build\Selenium.WebDriver.targets" Pack="true" PackagePath="buildTransitive\" />
120+
121+
<None Include="..\..\..\common\images\selenium_logo_small.png" Pack="true" PackagePath="\logo.png" Visible="false" />
122+
123+
<None Include="$(BaseSeleniumManagerPath)\linux\selenium-manager" Pack="true" PackagePath="\manager\linux" Visible="false" />
124+
<None Include="$(BaseSeleniumManagerPath)\macos\selenium-manager" Pack="true" PackagePath="manager\macos" Visible="false" />
125+
<None Include="$(BaseSeleniumManagerPath)\windows\selenium-manager.exe" Pack="true" PackagePath="manager\windows" Visible="false" />
85126
</ItemGroup>
86127

87128
<Target Name="PreBuild" BeforeTargets="PreBuildEvent" Condition="'$(OS)' == 'Windows_NT'">

0 commit comments

Comments
 (0)