Skip to content

Commit 5ff5589

Browse files
authored
Cleanup csproj files (#1865)
1 parent 396f9b7 commit 5ff5589

File tree

14 files changed

+13
-21
lines changed

14 files changed

+13
-21
lines changed

Directory.Build.props

+3
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
2525
<UseArtifactsOutput>true</UseArtifactsOutput>
2626

27+
<LangVersion>latest</LangVersion>
28+
<ImplicitUsings>enable</ImplicitUsings>
29+
2730
</PropertyGroup>
2831

2932
<ItemGroup>

Jint.Benchmark/Jint.Benchmark.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<LangVersion>latest</LangVersion>
1818
<IsPackable>false</IsPackable>
1919
<ImplicitUsings>enable</ImplicitUsings>
20+
<NoWarn>$(NoWarn);CS8002</NoWarn>
2021
</PropertyGroup>
2122
<ItemGroup>
2223
<None Include=".\Scripts\*.*" CopyToOutputDirectory="PreserveNewest" />

Jint.Tests.CommonScripts/Jint.Tests.CommonScripts.csproj

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net8.0</TargetFrameworks>
5-
<TargetFrameworks Condition="'$(OS)' == 'Windows_NT'">$(TargetFrameworks);net462</TargetFrameworks>
4+
<TargetFrameworks>net462;net8.0</TargetFrameworks>
65
<IsPackable>false</IsPackable>
76
<ImplicitUsings>enable</ImplicitUsings>
87
<LangVersion>latest</LangVersion>

Jint.Tests.PublicInterface/Jint.Tests.PublicInterface.csproj

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net8.0</TargetFrameworks>
5-
<TargetFrameworks Condition="'$(OS)' == 'Windows_NT'">$(TargetFrameworks);net462</TargetFrameworks>
4+
<TargetFrameworks>net462;net8.0</TargetFrameworks>
65
<AssemblyOriginatorKeyFile>..\Jint\Jint.snk</AssemblyOriginatorKeyFile>
76
<SignAssembly>true</SignAssembly>
87
<IsPackable>false</IsPackable>
@@ -17,10 +16,6 @@
1716
<ProjectReference Include="..\Jint\Jint.csproj" />
1817
</ItemGroup>
1918

20-
<ItemGroup>
21-
<Reference Include="Microsoft.CSharp" Condition=" '$(TargetFramework)' == 'net462' " />
22-
</ItemGroup>
23-
2419
<ItemGroup>
2520
<PackageReference Include="Acornima.Extras" />
2621
<PackageReference Include="Flurl.Http.Signed" />

Jint.Tests.Test262/Jint.Tests.Test262.csproj

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
<PropertyGroup>
44
<TargetFramework>net8.0</TargetFramework>
5-
<!--<TargetFrameworks Condition="'$(OS)' == 'Windows_NT'">$(TargetFrameworks);net461</TargetFrameworks>-->
65
<AssemblyOriginatorKeyFile>..\Jint\Jint.snk</AssemblyOriginatorKeyFile>
76
<SignAssembly>true</SignAssembly>
87
<IsPackable>false</IsPackable>

Jint.Tests/Jint.Tests.csproj

-4
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@
1919
<ProjectReference Include="..\Jint\Jint.csproj" />
2020
</ItemGroup>
2121

22-
<ItemGroup>
23-
<Reference Include="Microsoft.CSharp" Condition=" '$(TargetFramework)' == 'net462' " />
24-
</ItemGroup>
25-
2622
<ItemGroup>
2723
<PackageReference Include="Acornima.Extras" />
2824
<PackageReference Include="FluentAssertions" />

Jint.Tests/Parser/JavascriptParserTests.cs

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
using Jint.Runtime;
2-
3-
namespace Jint.Tests.Parsing;
1+
namespace Jint.Tests.Parsing;
42

53
public class JavascriptParserTests
64
{

Jint.Tests/Runtime/InteropTests.MemberAccess.cs

+2
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,9 @@ public void CanAccessBaseClassStaticFields()
183183

184184
private class BaseClassWithStatics
185185
{
186+
#pragma warning disable CS0414 // Field is assigned but its value is never used
186187
public static int a = 42;
188+
#pragma warning restore CS0414 // Field is assigned but its value is never used
187189
}
188190

189191
private class InheritingFromClassWithStatics : BaseClassWithStatics

Jint.Tests/Runtime/InteropTests.cs

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
using System.Reflection;
44
using System.Runtime.CompilerServices;
55
using Jint.Native;
6-
using Jint.Native.Symbol;
76
using Jint.Runtime;
87
using Jint.Runtime.Interop;
98
using Jint.Tests.Runtime.Converters;

Jint/AstExtensions.cs

+2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ namespace Jint
1313
{
1414
public static class AstExtensions
1515
{
16+
#pragma warning disable CS0649 // Field is never assigned to, and will always have its default value
1617
internal static readonly SourceLocation DefaultLocation;
18+
#pragma warning restore CS0649 // Field is never assigned to, and will always have its default value
1719

1820
public static JsValue GetKey<T>(this T property, Engine engine) where T : IProperty => GetKey(property.Key, engine, property.Computed);
1921

Jint/Jint.csproj

-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
<SignAssembly>true</SignAssembly>
88
<IsPackable>true</IsPackable>
99

10-
<LangVersion>latest</LangVersion>
11-
<ImplicitUsings>enable</ImplicitUsings>
1210
<Nullable>enable</Nullable>
1311
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
1412

Jint/Native/Generator/GeneratorInstance.cs

+2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ internal sealed class GeneratorInstance : ObjectInstance
1313
{
1414
internal GeneratorState _generatorState;
1515
private ExecutionContext _generatorContext;
16+
#pragma warning disable CS0649 // Field is never assigned to, and will always have its default value
1617
private readonly JsValue? _generatorBrand;
18+
#pragma warning restore CS0649 // Field is never assigned to, and will always have its default value
1719
private JintStatementList _generatorBody = null!;
1820

1921
public JsValue? _nextValue;

Jint/Runtime/Interpreter/Expressions/JintLiteralExpression.cs

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
using System.Numerics;
21
using System.Text.RegularExpressions;
32
using Jint.Native;
43

Jint/Runtime/Interpreter/Expressions/JintUpdateExpression.cs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using Jint.Native;
22
using Jint.Runtime.Environments;
3-
using Environment = Jint.Runtime.Environments.Environment;
43

54
namespace Jint.Runtime.Interpreter.Expressions
65
{

0 commit comments

Comments
 (0)