Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Got it compiling #445

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
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
10 changes: 5 additions & 5 deletions CoreWiki.Application/Articles/Managing/ArticleManagingProfile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,23 @@ public ArticleManagingProfile()
{
CreateMap<CreateNewArticleCommand, Article>()
.ForMember(d => d.Id, m=> m.Ignore())
.ForMember(d => d.Version, m => m.UseValue(1))
.ForMember(d => d.Version, m => m.MapFrom(_ => 1))
.ForMember(d => d.Published, m => m.Ignore())
.ForMember(d => d.Comments, m => m.Ignore())
.ForMember(d => d.History, m => m.Ignore())
.ForMember(d => d.ViewCount, m => m.UseValue(0))
.ForMember(d => d.ViewCount, m => m.MapFrom(_ => 0))
.ForMember(d => d.Slug, m => m.Ignore())
;

CreateMap<CreateSkeletonArticleCommand, Article>()
.ForMember(d => d.Id, m => m.Ignore())
.ForMember(d => d.Version, m => m.UseValue(1))
.ForMember(d => d.Version, m => m.MapFrom(_ => 1))
.ForMember(d => d.Published, m => m.Ignore())
.ForMember(d => d.Comments, m => m.Ignore())
.ForMember(d => d.History, m => m.Ignore())
.ForMember(d => d.ViewCount, m => m.UseValue(0))
.ForMember(d => d.ViewCount, m => m.MapFrom(_ => 0))
.ForMember(d => d.Topic, m => m.MapFrom(s => Article.SlugToTopic(s.Slug)))
.ForMember(d => d.Content, m => m.UseValue(""));
.ForMember(d => d.Content, m => m.MapFrom(_ => ""));

CreateMap<Article, ArticleManageDto>();
}
Expand Down
16 changes: 5 additions & 11 deletions CoreWiki.Application/CoreWiki.Application.csproj
Original file line number Diff line number Diff line change
@@ -1,27 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AutoMapper" Version="7.0.1" />
<PackageReference Include="MediatR" Version="5.1.0" />
<PackageReference Include="AutoMapper" Version="10.1.1" />
<PackageReference Include="MediatR" Version="9.0.0" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="MediatR" Version="5.1.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.1.1" />
<PackageReference Include="MediatR" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="3.1.10" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\CoreWiki.Data.Abstractions\CoreWiki.Data.Abstractions.csproj" />
</ItemGroup>

<ItemGroup>
<Reference Include="System">
<HintPath>System</HintPath>
</Reference>
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion CoreWiki.Core/CoreWiki.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="NodaTime" Version="2.4.1" />
<PackageReference Include="NodaTime" Version="3.0.3" />
</ItemGroup>

</Project>
14 changes: 7 additions & 7 deletions CoreWiki.Data/CoreWiki.Data.EntityFramework.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TieredCompilation>true</TieredCompilation>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Identity" Version="2.1.3" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="2.1.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.1.4" />
<PackageReference Include="NodaTime" Version="2.4.1" />
<PackageReference Include="Npgsql" Version="4.0.3" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="2.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Identity" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="3.1.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.10" />
<PackageReference Include="NodaTime" Version="3.0.3" />
<PackageReference Include="Npgsql" Version="5.0.1.1" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="3.1.4" />
</ItemGroup>

<ItemGroup>
Expand Down
9 changes: 4 additions & 5 deletions CoreWiki.FirstStart/CoreWiki.FirstStart.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.1.3" />
<PackageReference Include="Microsoft.AspNetCore.Identity" Version="2.1.3" />
<PackageReference Include="Microsoft.Extensions.Options" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Identity" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="3.1.10" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor" Version="2.1.3" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor" Version="2.2.0" />
</ItemGroup>

</Project>
15 changes: 7 additions & 8 deletions CoreWiki.Notifications/CoreWiki.Notifications.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Hosting.Abstractions" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor" Version="2.1.3" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Options" Version="2.1.1" />
<PackageReference Include="sendgrid" Version="9.10.0" />
<PackageReference Include="Microsoft.AspNetCore.Hosting.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="3.1.10" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="3.1.10" />
<PackageReference Include="Microsoft.Extensions.Options" Version="3.1.10" />
<PackageReference Include="sendgrid" Version="9.22.0" />
</ItemGroup>

<ItemGroup>
Expand Down
15 changes: 9 additions & 6 deletions CoreWiki.Test/CoreWiki.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.5" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.8.0" />
<PackageReference Include="Moq" Version="4.9.0" />
<PackageReference Include="xunit" Version="2.4.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.3" />
<PackageReference Include="Moq" Version="4.15.2" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
<PackageReference Include="XunitXml.TestLogger" Version="2.0.0" />
<PackageReference Include="XunitXml.TestLogger" Version="2.1.26" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion CoreWiki/Configuration/Startup/ConfigureMediator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public static class ConfigureMediator
{
public static IServiceCollection AddMediator(this IServiceCollection services)
{
services.AddMediatR();
services.AddMediatR(System.Reflection.Assembly.GetExecutingAssembly());
return services;
}
}
Expand Down
2 changes: 1 addition & 1 deletion CoreWiki/Configuration/Startup/CoreWikiWebsiteProfile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public CoreWikiWebsiteProfile()


CreateMap<ArticleEdit, EditArticleCommand>(MemberList.Source)
.ForSourceMember(d => d.Slug, m => m.Ignore());
.ForSourceMember(d => d.Slug, m => m.DoNotValidate());
CreateMap<ClaimsPrincipal, EditArticleCommand>(MemberList.None)
.ForMember(d => d.AuthorId, m => m.MapFrom(s => Guid.Parse(s.FindFirstValue(ClaimTypes.NameIdentifier))))
.ForMember(d => d.AuthorName, m => m.MapFrom(s => s.Identity.Name));
Expand Down
41 changes: 21 additions & 20 deletions CoreWiki/CoreWiki.csproj
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<UserSecretsId>7b1e67c2-befb-4e2e-957d-603f8b2e5491</UserSecretsId>
<UseRazorBuildServer>false</UseRazorBuildServer>
<TieredCompilation>true</TieredCompilation>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AutoMapper" Version="7.0.1" />
<PackageReference Include="BuildBundlerMinifier" Version="2.8.391" />
<PackageReference Include="DiffPlex" Version="1.4.2" />
<PackageReference Include="HtmlSanitizer" Version="4.0.187" />
<PackageReference Include="Humanizer" Version="2.5.1" />
<PackageReference Include="MediatR" Version="5.1.0" />
<PackageReference Include="MediatR.Extensions.Microsoft.DependencyInjection" Version="5.1.0" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.5.1" />
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.1.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.1.4" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.1.5" />
<PackageReference Include="Microsoft.Web.LibraryManager.Build" Version="1.0.163" />
<PackageReference Include="NodaTime" Version="2.4.1" />
<PackageReference Include="NWebsec.AspNetCore.Middleware" Version="2.0.0" />
<PackageReference Include="NWebsec.AspNetCore.Mvc.TagHelpers" Version="2.0.0" />
<PackageReference Include="Snickler.RSSCore" Version="1.0.3" />
<PackageReference Include="WebEssentials.AspNetCore.PWA" Version="1.0.49" />
<PackageReference Include="Westwind.AspNetCore.Markdown" Version="3.0.36" />
<PackageReference Include="AutoMapper" Version="10.1.1" />
<PackageReference Include="BuildBundlerMinifier" Version="3.2.449" />
<PackageReference Include="DiffPlex" Version="1.6.3" />
<PackageReference Include="HtmlSanitizer" Version="5.0.372" />
<PackageReference Include="Humanizer" Version="2.8.26" />
<PackageReference Include="MediatR" Version="9.0.0" />
<PackageReference Include="MediatR.Extensions.Microsoft.DependencyInjection" Version="9.0.0" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.16.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.MicrosoftAccount" Version="3.1.10" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Twitter" Version="3.1.10" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="3.1.10" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="3.1.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.10" />
<PackageReference Include="Microsoft.Web.LibraryManager.Build" Version="2.1.113" />
<PackageReference Include="NodaTime" Version="3.0.3" />
<PackageReference Include="NWebsec.AspNetCore.Middleware" Version="3.0.0" />
<PackageReference Include="NWebsec.AspNetCore.Mvc.TagHelpers" Version="3.0.0" />
<PackageReference Include="Snickler.RSSCore" Version="2.0.0" />
<PackageReference Include="WebEssentials.AspNetCore.PWA" Version="1.0.65" />
<PackageReference Include="Westwind.AspNetCore.Markdown" Version="3.5.0" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions CoreWiki/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions CoreWiki/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"version": "1.0.0",
"description": "",
"dependencies": {
"bootstrap": "^4.1.3",
"@fortawesome/fontawesome-free": "^5.2.0"
"@fortawesome/fontawesome-free": "^5.2.0",
"bootstrap": "^4.5.3"
},
"devDependencies": {},
"scripts": {
Expand Down
5 changes: 0 additions & 5 deletions global.json

This file was deleted.