Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ runs:
with:
dotnet-version: |
8.0.x
6.0.x
9.0.x
- if: ${{ runner.os == 'Windows' }}
uses: microsoft/setup-msbuild@v1.1

Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,43 +37,43 @@ jobs:

# framework
- name: Core
run: dotnet build src/Framework/Framework --configuration ${{ matrix.configuration }} --no-restore --no-incremental --framework net6.0 /WarnAsError
run: dotnet build src/Framework/Framework --configuration ${{ matrix.configuration }} --no-restore --no-incremental --framework net8.0 /WarnAsError
- name: Framework
run: dotnet build src/Framework/Framework --configuration ${{ matrix.configuration }} --no-restore --no-incremental --framework net6.0 /WarnAsError
run: dotnet build src/Framework/Framework --configuration ${{ matrix.configuration }} --no-restore --no-incremental --framework net8.0 /WarnAsError
- name: Testing
run: dotnet build src/Framework/Testing --configuration ${{ matrix.configuration }} --no-restore --no-incremental --framework net6.0 /WarnAsError
run: dotnet build src/Framework/Testing --configuration ${{ matrix.configuration }} --no-restore --no-incremental --framework net8.0 /WarnAsError

# hosting
- name: Hosting.AspNetCore
run: dotnet build src/Framework/Hosting.AspNetCore --configuration ${{ matrix.configuration }} --no-restore --no-incremental --framework net6.0 /WarnAsError
run: dotnet build src/Framework/Hosting.AspNetCore --configuration ${{ matrix.configuration }} --no-restore --no-incremental --framework net8.0 /WarnAsError

# command-line
- name: CommandLine
run: dotnet build src/Tools/CommandLine --configuration ${{ matrix.configuration }} --no-restore --framework net6.0 /WarnAsError
run: dotnet build src/Tools/CommandLine --configuration ${{ matrix.configuration }} --no-restore --framework net8.0 /WarnAsError

# swashbuckle
- name: Api.Swashbuckle.AspNetCore
run: dotnet build src/Api/Swashbuckle.AspNetCore --configuration ${{ matrix.configuration }} --no-restore --no-incremental --framework net6.0 /WarnAsError
run: dotnet build src/Api/Swashbuckle.AspNetCore --configuration ${{ matrix.configuration }} --no-restore --no-incremental --framework net8.0 /WarnAsError

# hot reload
- name: HotReload.Common
run: dotnet build src/Tools/HotReload/Common --configuration ${{ matrix.configuration }} --no-restore --no-incremental --framework net6.0 /WarnAsError
run: dotnet build src/Tools/HotReload/Common --configuration ${{ matrix.configuration }} --no-restore --no-incremental --framework net8.0 /WarnAsError
- name: HotReload.AspNetCore
run: dotnet build src/Tools/HotReload/AspNetCore --configuration ${{ matrix.configuration }} --no-restore --no-incremental --framework net6.0 /WarnAsError
run: dotnet build src/Tools/HotReload/AspNetCore --configuration ${{ matrix.configuration }} --no-restore --no-incremental --framework net8.0 /WarnAsError

# application insights
- name: Tracing.ApplicationInsights
run: dotnet build src/Tracing/ApplicationInsights --configuration ${{ matrix.configuration }} --no-restore --no-incremental --framework net6.0 /WarnAsError
run: dotnet build src/Tracing/ApplicationInsights --configuration ${{ matrix.configuration }} --no-restore --no-incremental --framework net8.0 /WarnAsError
- name: Tracing.ApplicationInsights.AspNetCore
run: dotnet build src/Tracing/ApplicationInsights.AspNetCore --configuration ${{ matrix.configuration }} --no-restore --no-incremental --framework net6.0 /WarnAsError
run: dotnet build src/Tracing/ApplicationInsights.AspNetCore --configuration ${{ matrix.configuration }} --no-restore --no-incremental --framework net8.0 /WarnAsError

# miniprofiler
- name: Tracing.MiniProfiler.AspNetCore
run: dotnet build src/Tracing/MiniProfiler.AspNetCore --configuration ${{ matrix.configuration }} --no-restore --no-incremental --framework net6.0 /WarnAsError
run: dotnet build src/Tracing/MiniProfiler.AspNetCore --configuration ${{ matrix.configuration }} --no-restore --no-incremental --framework net8.0 /WarnAsError

# dynamic data
- name: DynamicData
run: dotnet build src/DynamicData/DynamicData --configuration ${{ matrix.configuration }} --no-restore --no-incremental --framework net6.0 /WarnAsError
run: dotnet build src/DynamicData/DynamicData --configuration ${{ matrix.configuration }} --no-restore --no-incremental --framework net8.0 /WarnAsError

build-all:
name: Build all projects without errors
Expand Down Expand Up @@ -125,15 +125,15 @@ jobs:
title: Framework Tests
github-token: ${{ secrets.GITHUB_TOKEN }}
target-framework: net472
- name: Analyzers.Tests (net6.0)
- name: Analyzers.Tests (net8.0)
uses: ./.github/unittest
if: ${{ success() || failure() }}
with:
project: src/Analyzers/Analyzers.Tests
name: analyzers-tests
title: Analyzer Tests
github-token: ${{ secrets.GITHUB_TOKEN }}
target-framework: net6.0
target-framework: net8.0
# - name: Analyzers.Tests (net7.0)
# uses: ./.github/unittest
# with:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>$(DotnetCoreTargetVersion)</TargetFramework>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
<Nullable>enable</Nullable>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>$(DotnetCoreTargetVersion)</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.1;net6.0</TargetFrameworks>
<TargetFrameworks>$(DotnetCoreTargetVersion)</TargetFrameworks>
<PackageId>DotVVM.Api.Swashbuckle.AspNetCore</PackageId>
<Description>Swashbuckle.AspNetCore extensions for DotVVM.</Description>
</PropertyGroup>
Expand Down
8 changes: 6 additions & 2 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,12 @@
<NoWarn>$(NoWarn);CS1591;CS1573</NoWarn>
<Deterministic>true</Deterministic>
<PreserveCompilationContext>true</PreserveCompilationContext>
<DefaultTargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">netstandard2.1;net6.0;net472</DefaultTargetFrameworks>
<DefaultTargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netstandard2.1;net6.0</DefaultTargetFrameworks>
<OldFrameworkTargetVersion>net472</OldFrameworkTargetVersion>
<DotnetCoreTargetVersion>net8.0</DotnetCoreTargetVersion>
<DotnetCoreLatestTargetVersion>net9.0</DotnetCoreLatestTargetVersion>
<!-- we keep netstandard2.1 target, because it quite reliably disallows using new .NET Core APIs which would other only fail on Windows -->
<DefaultTargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">netstandard2.1;$(DotnetCoreTargetVersion);$(OldFrameworkTargetVersion)</DefaultTargetFrameworks>
<DefaultTargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netstandard2.1;$(DotnetCoreTargetVersion);</DefaultTargetFrameworks>
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
<AutomaticallyUseReferenceAssemblyPackages>false</AutomaticallyUseReferenceAssemblyPackages>
</PropertyGroup>
Expand Down
3 changes: 2 additions & 1 deletion src/Framework/Core/DotVVM.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
<EmbeddedResource Include="compiler\resources\**\*" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.Text.Json" Version="8.0.5" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.1' ">
<PackageReference Include="System.ComponentModel.Annotations" Version="4.3.0" />
<PackageReference Include="System.Text.Json" Version="8.0.5" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net472' ">
<Reference Include="System" />
Expand All @@ -28,6 +28,7 @@
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="System.Text.Json" Version="8.0.5" />
</ItemGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,6 @@ public DotvvmCompilationException(DotvvmCompilationDiagnostic primaryError, IEnu
}

public DotvvmCompilationException(string message, IEnumerable<TokenBase>? tokens) : this(message, null, tokens) { }
protected DotvvmCompilationException(
SerializationInfo info,
StreamingContext context) : base(info, context)
{
CompilationError = new DotvvmCompilationDiagnostic(this.Message, DiagnosticSeverity.Error, null, innerException: this.InnerException);
}

/// <summary> Creates a compilation error if the provided list of diagnostics contains an error. </summary>
public static DotvvmCompilationException? TryCreateFromDiagnostics(IEnumerable<DotvvmCompilationDiagnostic> diagnostics)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,5 @@ private static void BuildControlsMessage(List<DotvvmConfigurationAssertResult<Do
}
}
}

protected DotvvmConfigurationException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
}
}
2 changes: 1 addition & 1 deletion src/Framework/Framework/DotVVM.Framework.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project ToolsVersion="15.0" Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyTitle>DotVVM</AssemblyTitle>
<TargetFrameworks>$(DefaultTargetFrameworks)</TargetFrameworks>
<TargetFrameworks>$(DefaultTargetFrameworks);$(DotnetCoreLatestTargetVersion)</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyOriginatorKeyFile>dotvvmwizard.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ public class CorruptedCsrfTokenException: Exception
{
/// If the client is supposed to retry the request after renewing the CSRF token by the <see cref="DotVVM.Framework.Hosting.Middlewares.DotvvmCsrfTokenMiddleware" />
public bool RetryRequest { get; }
protected CorruptedCsrfTokenException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context)
{
}

public CorruptedCsrfTokenException(string message, bool retry = true) : base(message)
{
Expand Down
4 changes: 0 additions & 4 deletions src/Framework/Framework/Testing/TestCookieCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,5 @@ public TestCookieCollection(int capacity) : base(capacity)
public TestCookieCollection(int capacity, IEqualityComparer<string> comparer) : base(capacity, comparer)
{
}

protected TestCookieCollection(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context)
{
}
}
}
4 changes: 0 additions & 4 deletions src/Framework/Framework/Testing/TestHeaderCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ public TestHeaderCollection(int capacity, IEqualityComparer<string> comparer) :
{
}

protected TestHeaderCollection(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context)
{
}

string? IHeaderCollection.this[string key]
{
get => this.TryGetValue(key, out var headers) ? string.Join("; ", headers) : null;
Expand Down
4 changes: 0 additions & 4 deletions src/Framework/Framework/Testing/TestQueryCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ public TestQueryCollection(int capacity, IEqualityComparer<string> comparer) : b
{
}

protected TestQueryCollection(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context)
{
}

public bool Equals(TestQueryCollection? other) =>
Object.ReferenceEquals(this, other) ||
other != null && other.OrderBy(k => k.Key).SequenceEqual(this.OrderBy(k => k.Key));
Expand Down
4 changes: 4 additions & 0 deletions src/Framework/Framework/Utils/ReflectionUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,11 @@ public static Type MakeNullableType(this Type type)
return BoxingUtils.Zero;
// see https://github.com/dotnet/runtime/issues/90697
// notably we can't use Activator.CreateInstance, because C# now allows default constructors in structs
#if DotNetCore
return RuntimeHelpers.GetUninitializedObject(type);
#else
return FormatterServices.GetUninitializedObject(type);
#endif
}

public static Type UnwrapTaskType(this Type type)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project ToolsVersion="15.0" Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFrameworks>netstandard2.1;net6.0</TargetFrameworks>
<TargetFrameworks>$(DotnetCoreTargetVersion)</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyOriginatorKeyFile>dotvvmwizard.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ public bool Remove(KeyValuePair<string, string[]> item)
public bool IsReadOnly => OriginalHeaders.IsReadOnly;
public void Add(string key, string[] value)
{
#pragma warning disable ASP0019 // Don't use Add to append headers
OriginalHeaders.Add(key, new StringValues(value));
#pragma warning restore ASP0019
}

public bool ContainsKey(string key)
Expand Down Expand Up @@ -115,4 +117,4 @@ protected static KeyValuePair<string, StringValues> ConvertKeyValuePair(KeyValue
new KeyValuePair<string, StringValues>(toConvert.Key, new StringValues(toConvert.Value));
#endregion
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>$(DotnetCoreTargetVersion)</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>$(DotnetCoreLatestTargetVersion)</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project ToolsVersion="15.0" Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>$(DotnetCoreTargetVersion)</TargetFramework>
<ApplicationInsightsResourceId>/subscriptions/1f41fa3c-37d6-4b89-b5dc-913463de0d9a/resourcegroups/DotVVMWeb/providers/microsoft.insights/components/DotvvmTrackingPoints</ApplicationInsightsResourceId>
<ApplicationInsightsAnnotationResourceId>/subscriptions/1f41fa3c-37d6-4b89-b5dc-913463de0d9a/resourcegroups/DotVVMWeb/providers/microsoft.insights/components/DotvvmTrackingPoints</ApplicationInsightsAnnotationResourceId>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project ToolsVersion="15.0" Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>$(DotnetCoreTargetVersion)</TargetFramework>
<OutputType>Exe</OutputType>
</PropertyGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project ToolsVersion="15.0" Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>$(DotnetCoreLatestTargetVersion)</TargetFramework>
<OutputType>Exe</OutputType>
</PropertyGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project ToolsVersion="15.0" Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>$(DotnetCoreTargetVersion)</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Content Include="**\*.dothtml" />
Expand All @@ -14,11 +14,11 @@
<Content Include="Views\default.dotmaster" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="6.0.32" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.32" />
<PackageReference Include="MiniProfiler.AspNetCore" Version="4.2.22" />
<PackageReference Include="MiniProfiler.AspNetCore.Mvc" Version="4.2.22" />
<PackageReference Include="MiniProfiler.EntityFrameworkCore" Version="4.2.22" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.14" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.14" />
<PackageReference Include="MiniProfiler.AspNetCore" Version="4.5.4" />
<PackageReference Include="MiniProfiler.AspNetCore.Mvc" Version="4.5.4" />
<PackageReference Include="MiniProfiler.EntityFrameworkCore" Version="4.5.4" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="../../Tracing/MiniProfiler.AspNetCore/DotVVM.Tracing.MiniProfiler.AspNetCore.csproj" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>$(DotnetCoreTargetVersion)</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project ToolsVersion="15.0" Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>$(DotnetCoreTargetVersion)</TargetFramework>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFrameworkProfile />
</PropertyGroup>
Expand All @@ -19,4 +19,4 @@
<None Include="App.config" />
</ItemGroup>

</Project>
</Project>
2 changes: 1 addition & 1 deletion src/Samples/Tests/Tests/DotVVM.Samples.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>$(DotnetCoreTargetVersion)</TargetFramework>
<IsPackable>false</IsPackable>

<!-- Use this to run agains local clone of the Selenium Utils repo -->
Expand Down
10 changes: 5 additions & 5 deletions src/Tests/DotVVM.Framework.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
</PropertyGroup>
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">net8.0;net472</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">net8.0</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(DotnetCoreTargetVersion);$(OldFrameworkTargetVersion)</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">$(DotnetCoreTargetVersion)</TargetFrameworks>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
Expand All @@ -30,17 +30,17 @@
<ProjectReference Include="../Framework/Testing/DotVVM.Framework.Testing.csproj" />
<ProjectReference Include="../AutoUI/Core/DotVVM.AutoUI.csproj" />
</ItemGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<PropertyGroup Condition=" '$(TargetFramework)' != '$(OldFrameworkTargetVersion)'">
<DefineConstants>$(DefineConstants);DotNetCore</DefineConstants>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net472'">
<ItemGroup Condition="'$(TargetFramework)' == '$(OldFrameworkTargetVersion)'">
<ProjectReference Include="../Framework/Hosting.Owin/DotVVM.Framework.Hosting.Owin.csproj" />
<PackageReference Include="CheckTestOutput" Version="0.6.3" />
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="6.0.0" />
<Compile Remove="AspCore/CachingTests.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<ItemGroup Condition="'$(TargetFramework)' != '$(OldFrameworkTargetVersion)'">
<ProjectReference Include="../Framework/Hosting.AspNetCore/DotVVM.Framework.Hosting.AspNetCore.csproj" />
<PackageReference Include="CheckTestOutput" Version="0.6.3" />
</ItemGroup>
Expand Down
Loading
Loading