Skip to content

Commit

Permalink
Revert "chore: fix dotnet build produced"
Browse files Browse the repository at this point in the history
This reverts commit 2491e03.
  • Loading branch information
mxschmitt committed Aug 23, 2022
1 parent 2491e03 commit f1702e5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 16 deletions.
6 changes: 0 additions & 6 deletions src/Playwright/API/PlaywrightException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@
*/

using System;
using System.Runtime.Serialization;

namespace Microsoft.Playwright
{
[Serializable]
public class PlaywrightException : Exception
{
public PlaywrightException()
Expand All @@ -41,9 +39,5 @@ public PlaywrightException(string message) : base(message)
public PlaywrightException(string message, Exception innerException) : base(message, innerException)
{
}

protected PlaywrightException(SerializationInfo serializationInfo, StreamingContext streamingContext)
{
}
}
}
14 changes: 7 additions & 7 deletions src/Playwright/Helpers/Driver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,16 @@ internal static string GetExecutablePath()
DirectoryInfo assemblyDirectory = new(AppContext.BaseDirectory);
if (!assemblyDirectory.Exists || !File.Exists(Path.Combine(assemblyDirectory.FullName, "Microsoft.Playwright.dll")))
{
#if NETFRAMEWORK
string assemblyLocation = null;
var assemblyLocationFileUrl = typeof(Playwright).Assembly.CodeBase;
if (string.IsNullOrEmpty(assemblyLocationFileUrl))
if (!string.IsNullOrEmpty(assemblyLocationFileUrl))
{
throw new PlaywrightException("Unable to find Microsoft.Playwright.dll");
assemblyLocation = new Uri(assemblyLocationFileUrl).LocalPath;
}
else
{
assemblyLocation = typeof(Playwright).Assembly.Location;
}
var assemblyLocation = new Uri(assemblyLocationFileUrl).LocalPath;
#else
var assemblyLocation = typeof(Playwright).Assembly.Location;
#endif
assemblyDirectory = new FileInfo(assemblyLocation).Directory;
}

Expand Down
5 changes: 2 additions & 3 deletions src/Playwright/Playwright.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<Summary>The .NET port of Playwright, used to automate Chromium, Firefox and WebKit with a single API.</Summary>
<Description>Playwright enables reliable end-to-end testing for modern web apps. It is built to enable cross-browser web automation that is ever-green, capable, reliable and fast. Learn more at https://playwright.dev/dotnet/.</Description>
<PackageIcon>icon.png</PackageIcon>
<TargetFrameworks>netstandard2.0;net471</TargetFrameworks>
<TargetFramework>netstandard2.0</TargetFramework>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<DocumentationFile>Microsoft.Playwright.xml</DocumentationFile>
<RunWithWarnings>true</RunWithWarnings>
Expand All @@ -33,8 +33,7 @@
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
<PackageReference Include="System.Text.Json" Version="6.0.5" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="6.0.0" Condition="'$(TargetFramework)' == 'netstandard2.0'" />
<Reference Include="System.Web" Condition="'$(TargetFramework)' == 'net471'" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="6.0.0" />
</ItemGroup>
<Target Name="DedupeDriver" AfterTargets="CopyFilesToOutputDirectory" BeforeTargets="CopyPlaywrightFilesToOutput">
<ItemGroup>
Expand Down

0 comments on commit f1702e5

Please sign in to comment.