Skip to content

Commit

Permalink
fix: errors after update to net7
Browse files Browse the repository at this point in the history
  • Loading branch information
matejkubinec committed May 2, 2023
1 parent 1cfe734 commit 7e854fe
Show file tree
Hide file tree
Showing 8 changed files with 16,251 additions and 63 deletions.
8 changes: 4 additions & 4 deletions src/MNCD.Data/MNCD.Data.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.5" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MNCD.Domain\MNCD.Domain.csproj" />
Expand Down
4 changes: 2 additions & 2 deletions src/MNCD.Domain/MNCD.Domain.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<None Remove="Services\IAnalysisService.cs~RFa6abf8.TMP" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/MNCD.Services/MNCD.Services.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</ItemGroup>

<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>

</Project>
16,274 changes: 16,232 additions & 42 deletions src/MNCD.Web/ClientApp/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/MNCD.Web/Controllers/VisualizationController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public async Task<IActionResult> GetAnalysisVisualization(int analysisId, Visual

private IActionResult GetSvgResult(string svg)
{
return new ContentResult()
return new Microsoft.AspNetCore.Mvc.ContentResult()
{
Content = svg,
ContentType = "image/svg+xml",
Expand Down
17 changes: 6 additions & 11 deletions src/MNCD.Web/MNCD.Web.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
<TypeScriptToolsVersion>Latest</TypeScriptToolsVersion>
<IsPackable>false</IsPackable>
<SpaRoot>ClientApp\</SpaRoot>
<DefaultItemExcludes>$(DefaultItemExcludes);$(SpaRoot)node_modules\**</DefaultItemExcludes>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AutoMapper" Version="9.0.0" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.14.0-beta2" />
Expand All @@ -17,8 +15,11 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers" Version="0.4.421302">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.32" />
</ItemGroup>

<ItemGroup>
<!-- Don't publish the SPA source files, but do show them in the project files list -->
<Compile Remove="ClientApp\src\types\**" />
Expand All @@ -29,7 +30,6 @@
<None Remove="ClientApp\src\types\**" />
<None Include="$(SpaRoot)**" Exclude="$(SpaRoot)node_modules\**" />
</ItemGroup>

<ItemGroup>
<None Remove="ClientApp\src\App.test.ts" />
<None Remove="ClientApp\src\App.ts" />
Expand All @@ -42,11 +42,9 @@
<None Remove="ClientApp\src\index.ts" />
<None Remove="ClientApp\src\registerServiceWorker.ts" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\MNCD.Services\MNCD.Services.csproj" />
</ItemGroup>

<Target Name="DebugEnsureNodeEnv" BeforeTargets="Build" Condition=" '$(Configuration)' == 'Debug' And !Exists('$(SpaRoot)node_modules') ">
<!-- Ensure Node.js is installed -->
<Exec Command="node --version" ContinueOnError="true">
Expand All @@ -56,12 +54,10 @@
<Message Importance="high" Text="Restoring dependencies using 'npm'. This may take several minutes..." />
<Exec WorkingDirectory="$(SpaRoot)" Command="npm install" />
</Target>

<Target Name="PublishRunWebpack" AfterTargets="ComputeFilesToPublish">
<!-- As part of publishing, ensure the JS resources are freshly built in production mode -->
<Exec WorkingDirectory="$(SpaRoot)" Command="npm install" />
<Exec WorkingDirectory="$(SpaRoot)" Command="npm run build" />

<!-- Include the newly-built files in the publish output -->
<ItemGroup>
<DistFiles Include="$(SpaRoot)build\**" />
Expand All @@ -72,5 +68,4 @@
</ResolvedFileToPublish>
</ItemGroup>
</Target>

</Project>
</Project>
5 changes: 4 additions & 1 deletion src/MNCD.Web/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using MNCD.Services.Impl;
using MNCD.Web.Filters;
using MNCD.Web.Mappings;
using System.Reflection;

namespace MNCD.Web
{
Expand Down Expand Up @@ -91,9 +92,11 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)

private void RegisterMapper(IServiceCollection services)
{
var assembly = Assembly.GetExecutingAssembly();
var mappingConfig = new MapperConfiguration(cfg =>
{
cfg.AddMaps(new[] { typeof(DataSetDetailViewModelProfile) });
cfg.ShouldMapMethod = (m => false);
cfg.AddMaps(assembly);
});

var mapper = mappingConfig.CreateMapper();
Expand Down
2 changes: 1 addition & 1 deletion test/MNCD.Tests/MNCD.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net7.0</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down

0 comments on commit 7e854fe

Please sign in to comment.