From 8478d1f70af067be9a6bae5df5e79d36eb5e0eb7 Mon Sep 17 00:00:00 2001 From: danielgreen Date: Sat, 17 Dec 2022 16:29:32 +0000 Subject: [PATCH 1/2] Ensure that a view-only page is processed even if it sits within the /Pages hierarchy. Set the SplitViewOnlyPagesIntoMultipleFiles setting to false, so that code-behind files are not generated for pages where they do not already exist. --- .../Pages/Categories/Inner/NoModel.cshtml.cs | 16 ------ .../Inner/NoModel.cshtml.generated.cs | 31 ----------- .../Pages/Categories/NoModel.cshtml.cs | 16 ------ .../Categories/NoModel.cshtml.generated.cs | 31 ----------- .../NestedPages/Index.cshtml.cs | 16 ------ .../NestedPages/Index.cshtml.generated.cs | 31 ----------- samples/AspNetSimple/Pages/NoModel.cshtml.cs | 16 ------ .../Pages/NoModel.cshtml.generated.cs | 31 ----------- samples/AspNetSimple/R4Mvc.generated.cs | 54 +++++++++++++++++++ samples/AspNetSimple/r4mvc.json | 2 +- src/R4Mvc.Tools/Commands/GenerateCommand.cs | 8 ++- .../Locators/DefaultRazorPageViewLocator.cs | 6 +-- src/R4Mvc.Tools/PageView.cs | 6 +-- .../Properties/launchSettings.json | 4 +- src/R4Mvc.Tools/Settings.cs | 2 +- 15 files changed, 70 insertions(+), 200 deletions(-) delete mode 100644 samples/AspNetSimple/Pages/Categories/Inner/NoModel.cshtml.cs delete mode 100644 samples/AspNetSimple/Pages/Categories/Inner/NoModel.cshtml.generated.cs delete mode 100644 samples/AspNetSimple/Pages/Categories/NoModel.cshtml.cs delete mode 100644 samples/AspNetSimple/Pages/Categories/NoModel.cshtml.generated.cs delete mode 100644 samples/AspNetSimple/Pages/NoDirectChildPages/AnotherEmptyLayer/NestedPages/Index.cshtml.cs delete mode 100644 samples/AspNetSimple/Pages/NoDirectChildPages/AnotherEmptyLayer/NestedPages/Index.cshtml.generated.cs delete mode 100644 samples/AspNetSimple/Pages/NoModel.cshtml.cs delete mode 100644 samples/AspNetSimple/Pages/NoModel.cshtml.generated.cs diff --git a/samples/AspNetSimple/Pages/Categories/Inner/NoModel.cshtml.cs b/samples/AspNetSimple/Pages/Categories/Inner/NoModel.cshtml.cs deleted file mode 100644 index 328fd6d..0000000 --- a/samples/AspNetSimple/Pages/Categories/Inner/NoModel.cshtml.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.CodeDom.Compiler; -using System.Diagnostics; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; -using Microsoft.AspNetCore.Routing; -using R4Mvc; -using AspNetSimple; - -namespace R4Mvc -{ - // Use this file to add custom extensions and helper methods to this page - public partial class Categories_Inner_NoModelModel - { - } -} \ No newline at end of file diff --git a/samples/AspNetSimple/Pages/Categories/Inner/NoModel.cshtml.generated.cs b/samples/AspNetSimple/Pages/Categories/Inner/NoModel.cshtml.generated.cs deleted file mode 100644 index 08ec538..0000000 --- a/samples/AspNetSimple/Pages/Categories/Inner/NoModel.cshtml.generated.cs +++ /dev/null @@ -1,31 +0,0 @@ -// -// This file was generated by R4Mvc. -// Don't change it directly as your change would get overwritten. Instead, make changes -// to the r4mvc.json file (i.e. the settings file), save it and run the generator tool again. - -// Make sure the compiler doesn't complain about missing Xml comments and CLS compliance -// 0108: suppress "Foo hides inherited member Foo.Use the new keyword if hiding was intended." when a controller and its abstract parent are both processed -#pragma warning disable 1591, 3008, 3009, 0108 -using System; -using System.CodeDom.Compiler; -using System.Diagnostics; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; -using Microsoft.AspNetCore.Mvc.RazorPages; -using Microsoft.AspNetCore.Routing; -using R4Mvc; -using AspNetSimple; - -namespace R4Mvc -{ - public partial class Categories_Inner_NoModelModel : IR4ActionResult - { - [GeneratedCode("R4Mvc", "1.0"), DebuggerNonUserCode] - string IR4ActionResult.Protocol => null; - [GeneratedCode("R4Mvc", "1.0")] - RouteValueDictionary m_RouteValueDictionary = new RouteValueDictionary{{"Page", "/Categories/Inner/NoModel"}}; - [GeneratedCode("R4Mvc", "1.0"), DebuggerNonUserCode] - RouteValueDictionary IR4ActionResult.RouteValueDictionary => m_RouteValueDictionary; - } -} -#pragma warning restore 1591, 3008, 3009, 0108 diff --git a/samples/AspNetSimple/Pages/Categories/NoModel.cshtml.cs b/samples/AspNetSimple/Pages/Categories/NoModel.cshtml.cs deleted file mode 100644 index dcec498..0000000 --- a/samples/AspNetSimple/Pages/Categories/NoModel.cshtml.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.CodeDom.Compiler; -using System.Diagnostics; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; -using Microsoft.AspNetCore.Routing; -using R4Mvc; -using AspNetSimple; - -namespace R4Mvc -{ - // Use this file to add custom extensions and helper methods to this page - public partial class Categories_NoModelModel - { - } -} \ No newline at end of file diff --git a/samples/AspNetSimple/Pages/Categories/NoModel.cshtml.generated.cs b/samples/AspNetSimple/Pages/Categories/NoModel.cshtml.generated.cs deleted file mode 100644 index 67cc836..0000000 --- a/samples/AspNetSimple/Pages/Categories/NoModel.cshtml.generated.cs +++ /dev/null @@ -1,31 +0,0 @@ -// -// This file was generated by R4Mvc. -// Don't change it directly as your change would get overwritten. Instead, make changes -// to the r4mvc.json file (i.e. the settings file), save it and run the generator tool again. - -// Make sure the compiler doesn't complain about missing Xml comments and CLS compliance -// 0108: suppress "Foo hides inherited member Foo.Use the new keyword if hiding was intended." when a controller and its abstract parent are both processed -#pragma warning disable 1591, 3008, 3009, 0108 -using System; -using System.CodeDom.Compiler; -using System.Diagnostics; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; -using Microsoft.AspNetCore.Mvc.RazorPages; -using Microsoft.AspNetCore.Routing; -using R4Mvc; -using AspNetSimple; - -namespace R4Mvc -{ - public partial class Categories_NoModelModel : IR4ActionResult - { - [GeneratedCode("R4Mvc", "1.0"), DebuggerNonUserCode] - string IR4ActionResult.Protocol => null; - [GeneratedCode("R4Mvc", "1.0")] - RouteValueDictionary m_RouteValueDictionary = new RouteValueDictionary{{"Page", "/Categories/NoModel"}}; - [GeneratedCode("R4Mvc", "1.0"), DebuggerNonUserCode] - RouteValueDictionary IR4ActionResult.RouteValueDictionary => m_RouteValueDictionary; - } -} -#pragma warning restore 1591, 3008, 3009, 0108 diff --git a/samples/AspNetSimple/Pages/NoDirectChildPages/AnotherEmptyLayer/NestedPages/Index.cshtml.cs b/samples/AspNetSimple/Pages/NoDirectChildPages/AnotherEmptyLayer/NestedPages/Index.cshtml.cs deleted file mode 100644 index 016dbfd..0000000 --- a/samples/AspNetSimple/Pages/NoDirectChildPages/AnotherEmptyLayer/NestedPages/Index.cshtml.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.CodeDom.Compiler; -using System.Diagnostics; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; -using Microsoft.AspNetCore.Routing; -using R4Mvc; -using AspNetSimple; - -namespace R4Mvc -{ - // Use this file to add custom extensions and helper methods to this page - public partial class NoDirectChildPages_AnotherEmptyLayer_NestedPages_IndexModel - { - } -} \ No newline at end of file diff --git a/samples/AspNetSimple/Pages/NoDirectChildPages/AnotherEmptyLayer/NestedPages/Index.cshtml.generated.cs b/samples/AspNetSimple/Pages/NoDirectChildPages/AnotherEmptyLayer/NestedPages/Index.cshtml.generated.cs deleted file mode 100644 index 5038f8c..0000000 --- a/samples/AspNetSimple/Pages/NoDirectChildPages/AnotherEmptyLayer/NestedPages/Index.cshtml.generated.cs +++ /dev/null @@ -1,31 +0,0 @@ -// -// This file was generated by R4Mvc. -// Don't change it directly as your change would get overwritten. Instead, make changes -// to the r4mvc.json file (i.e. the settings file), save it and run the generator tool again. - -// Make sure the compiler doesn't complain about missing Xml comments and CLS compliance -// 0108: suppress "Foo hides inherited member Foo.Use the new keyword if hiding was intended." when a controller and its abstract parent are both processed -#pragma warning disable 1591, 3008, 3009, 0108 -using System; -using System.CodeDom.Compiler; -using System.Diagnostics; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; -using Microsoft.AspNetCore.Mvc.RazorPages; -using Microsoft.AspNetCore.Routing; -using R4Mvc; -using AspNetSimple; - -namespace R4Mvc -{ - public partial class NoDirectChildPages_AnotherEmptyLayer_NestedPages_IndexModel : IR4ActionResult - { - [GeneratedCode("R4Mvc", "1.0"), DebuggerNonUserCode] - string IR4ActionResult.Protocol => null; - [GeneratedCode("R4Mvc", "1.0")] - RouteValueDictionary m_RouteValueDictionary = new RouteValueDictionary{{"Page", "/NoDirectChildPages/AnotherEmptyLayer/NestedPages/Index"}}; - [GeneratedCode("R4Mvc", "1.0"), DebuggerNonUserCode] - RouteValueDictionary IR4ActionResult.RouteValueDictionary => m_RouteValueDictionary; - } -} -#pragma warning restore 1591, 3008, 3009, 0108 diff --git a/samples/AspNetSimple/Pages/NoModel.cshtml.cs b/samples/AspNetSimple/Pages/NoModel.cshtml.cs deleted file mode 100644 index 54101ed..0000000 --- a/samples/AspNetSimple/Pages/NoModel.cshtml.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.CodeDom.Compiler; -using System.Diagnostics; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; -using Microsoft.AspNetCore.Routing; -using R4Mvc; -using AspNetSimple; - -namespace R4Mvc -{ - // Use this file to add custom extensions and helper methods to this page - public partial class NoModelModel - { - } -} \ No newline at end of file diff --git a/samples/AspNetSimple/Pages/NoModel.cshtml.generated.cs b/samples/AspNetSimple/Pages/NoModel.cshtml.generated.cs deleted file mode 100644 index b2f1c48..0000000 --- a/samples/AspNetSimple/Pages/NoModel.cshtml.generated.cs +++ /dev/null @@ -1,31 +0,0 @@ -// -// This file was generated by R4Mvc. -// Don't change it directly as your change would get overwritten. Instead, make changes -// to the r4mvc.json file (i.e. the settings file), save it and run the generator tool again. - -// Make sure the compiler doesn't complain about missing Xml comments and CLS compliance -// 0108: suppress "Foo hides inherited member Foo.Use the new keyword if hiding was intended." when a controller and its abstract parent are both processed -#pragma warning disable 1591, 3008, 3009, 0108 -using System; -using System.CodeDom.Compiler; -using System.Diagnostics; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; -using Microsoft.AspNetCore.Mvc.RazorPages; -using Microsoft.AspNetCore.Routing; -using R4Mvc; -using AspNetSimple; - -namespace R4Mvc -{ - public partial class NoModelModel : IR4ActionResult - { - [GeneratedCode("R4Mvc", "1.0"), DebuggerNonUserCode] - string IR4ActionResult.Protocol => null; - [GeneratedCode("R4Mvc", "1.0")] - RouteValueDictionary m_RouteValueDictionary = new RouteValueDictionary{{"Page", "/NoModel"}}; - [GeneratedCode("R4Mvc", "1.0"), DebuggerNonUserCode] - RouteValueDictionary IR4ActionResult.RouteValueDictionary => m_RouteValueDictionary; - } -} -#pragma warning restore 1591, 3008, 3009, 0108 diff --git a/samples/AspNetSimple/R4Mvc.generated.cs b/samples/AspNetSimple/R4Mvc.generated.cs index 56520a0..7293409 100644 --- a/samples/AspNetSimple/R4Mvc.generated.cs +++ b/samples/AspNetSimple/R4Mvc.generated.cs @@ -37,6 +37,7 @@ public static partial class MVCPages public static R4Mvc.NoDirectChildPagesPathClass NoDirectChildPages => s_NoDirectChildPages; public static readonly AspNetSimple.Pages.DefaultModel Default = new AspNetSimple.Pages.R4MVC_DefaultModel(); public static readonly R4Mvc.NoModelModel NoModel = new R4Mvc.NoModelModel(); + public static readonly R4Mvc.NotARazorPageModel NotARazorPage = new R4Mvc.NotARazorPageModel(); } namespace R4Mvc @@ -558,4 +559,57 @@ public R4Mvc_Microsoft_AspNetCore_Mvc_RazorPages_RedirectToRouteResult(string pa public RouteValueDictionary RouteValueDictionary { get; set; } } + +namespace R4Mvc +{ + public partial class NoDirectChildPages_AnotherEmptyLayer_NestedPages_IndexModel : IR4ActionResult + { + [GeneratedCode("R4Mvc", "1.0"), DebuggerNonUserCode] + string IR4ActionResult.Protocol => null; + [GeneratedCode("R4Mvc", "1.0")] + RouteValueDictionary m_RouteValueDictionary = new RouteValueDictionary{{"Page", "/NoDirectChildPages/AnotherEmptyLayer/NestedPages/Index"}}; + [GeneratedCode("R4Mvc", "1.0"), DebuggerNonUserCode] + RouteValueDictionary IR4ActionResult.RouteValueDictionary => m_RouteValueDictionary; + } + + public partial class NoModelModel : IR4ActionResult + { + [GeneratedCode("R4Mvc", "1.0"), DebuggerNonUserCode] + string IR4ActionResult.Protocol => null; + [GeneratedCode("R4Mvc", "1.0")] + RouteValueDictionary m_RouteValueDictionary = new RouteValueDictionary{{"Page", "/NoModel"}}; + [GeneratedCode("R4Mvc", "1.0"), DebuggerNonUserCode] + RouteValueDictionary IR4ActionResult.RouteValueDictionary => m_RouteValueDictionary; + } + + public partial class Categories_NoModelModel : IR4ActionResult + { + [GeneratedCode("R4Mvc", "1.0"), DebuggerNonUserCode] + string IR4ActionResult.Protocol => null; + [GeneratedCode("R4Mvc", "1.0")] + RouteValueDictionary m_RouteValueDictionary = new RouteValueDictionary{{"Page", "/Categories/NoModel"}}; + [GeneratedCode("R4Mvc", "1.0"), DebuggerNonUserCode] + RouteValueDictionary IR4ActionResult.RouteValueDictionary => m_RouteValueDictionary; + } + + public partial class Categories_Inner_NoModelModel : IR4ActionResult + { + [GeneratedCode("R4Mvc", "1.0"), DebuggerNonUserCode] + string IR4ActionResult.Protocol => null; + [GeneratedCode("R4Mvc", "1.0")] + RouteValueDictionary m_RouteValueDictionary = new RouteValueDictionary{{"Page", "/Categories/Inner/NoModel"}}; + [GeneratedCode("R4Mvc", "1.0"), DebuggerNonUserCode] + RouteValueDictionary IR4ActionResult.RouteValueDictionary => m_RouteValueDictionary; + } + + public partial class NotARazorPageModel : IR4ActionResult + { + [GeneratedCode("R4Mvc", "1.0"), DebuggerNonUserCode] + string IR4ActionResult.Protocol => null; + [GeneratedCode("R4Mvc", "1.0")] + RouteValueDictionary m_RouteValueDictionary = new RouteValueDictionary{{"Page", "/NotARazorPage"}}; + [GeneratedCode("R4Mvc", "1.0"), DebuggerNonUserCode] + RouteValueDictionary IR4ActionResult.RouteValueDictionary => m_RouteValueDictionary; + } +} #pragma warning restore 1591, 3008, 3009, 0108 diff --git a/samples/AspNetSimple/r4mvc.json b/samples/AspNetSimple/r4mvc.json index 6ee9a5e..1bec2ef 100644 --- a/samples/AspNetSimple/r4mvc.json +++ b/samples/AspNetSimple/r4mvc.json @@ -6,7 +6,7 @@ "R4MvcNamespace": "R4Mvc", "LinksNamespace": "Links", "SplitIntoMultipleFiles": true, - "SplitViewOnlyPagesIntoMultipleFiles": true, + "SplitViewOnlyPagesIntoMultipleFiles": false, "StaticFilesPath": "wwwroot", "ExcludedStaticFileExtensions": null, "ReferencedNamespaces": [ diff --git a/src/R4Mvc.Tools/Commands/GenerateCommand.cs b/src/R4Mvc.Tools/Commands/GenerateCommand.cs index ab40384..a4c4c63 100644 --- a/src/R4Mvc.Tools/Commands/GenerateCommand.cs +++ b/src/R4Mvc.Tools/Commands/GenerateCommand.cs @@ -140,9 +140,13 @@ public async Task Run(string projectPath, IConfiguration configuration, string[] if (hasPagesSupport) { var definitions = _pageRewriter.RewritePages(compilation); - pages = _pageViewLocators.SelectMany(x => x.Find(projectRoot)).Where(p => p.IsPage).ToList(); + pages = _pageViewLocators.SelectMany(x => x.Find(projectRoot)).ToList(); - foreach (var page in pages) + // Some of the entries in pages can be partial views i.e. not an actual Razor Page. + // They will have no associated code-behind class in the project, so filter them out when fetching definitions. + var razorPages = pages.Where(p => p.IsRazorPage).ToList(); + + foreach (var page in razorPages) { page.Definition = definitions.FirstOrDefault(d => d.GetFilePath() == (page.FilePath + ".cs")); } diff --git a/src/R4Mvc.Tools/Locators/DefaultRazorPageViewLocator.cs b/src/R4Mvc.Tools/Locators/DefaultRazorPageViewLocator.cs index 738fe5a..d474c80 100644 --- a/src/R4Mvc.Tools/Locators/DefaultRazorPageViewLocator.cs +++ b/src/R4Mvc.Tools/Locators/DefaultRazorPageViewLocator.cs @@ -30,7 +30,7 @@ public IEnumerable Find(string projectRoot) private PageView GetView(string projectRoot, string pagesRoot, string filePath) { - bool isPage = false; + bool isRazorPage = false; using (var file = File.OpenRead(filePath)) using (var reader = new StreamReader(file)) { @@ -44,7 +44,7 @@ private PageView GetView(string projectRoot, string pagesRoot, string filePath) break; if (trimmedLine.StartsWith("@page")) { - isPage = true; + isRazorPage = true; break; } } @@ -52,7 +52,7 @@ private PageView GetView(string projectRoot, string pagesRoot, string filePath) var relativePath = filePath.GetRelativePath(projectRoot).Replace("\\", "/"); var pagePath = filePath.GetRelativePath(pagesRoot).Replace("\\", "/").TrimEnd(".cshtml"); - return new PageView(Path.GetFileNameWithoutExtension(filePath), filePath, relativePath, pagePath, isPage); + return new PageView(Path.GetFileNameWithoutExtension(filePath), filePath, relativePath, pagePath, isRazorPage); } } } diff --git a/src/R4Mvc.Tools/PageView.cs b/src/R4Mvc.Tools/PageView.cs index ba9b838..3bceb9e 100644 --- a/src/R4Mvc.Tools/PageView.cs +++ b/src/R4Mvc.Tools/PageView.cs @@ -4,13 +4,13 @@ namespace R4Mvc.Tools { public class PageView : IView { - public PageView(string name, string filePath, string relativePath, string pagePath, bool isPage) + public PageView(string name, string filePath, string relativePath, string pagePath, bool isRazorPage) { Name = name; FilePath = filePath; RelativePath = new Uri("~" + relativePath, UriKind.Relative); PagePath = pagePath; - IsPage = isPage; + IsRazorPage = isRazorPage; var segments = pagePath.Split(new[] { '/', }, StringSplitOptions.RemoveEmptyEntries); Array.Resize(ref segments, segments.Length - 1); @@ -21,7 +21,7 @@ public PageView(string name, string filePath, string relativePath, string pagePa public string FilePath { get; } public Uri RelativePath { get; } public string PagePath { get; } - public bool IsPage { get; } + public bool IsRazorPage { get; } public string[] Segments { get; } public PageDefinition Definition { get; set; } diff --git a/src/R4Mvc.Tools/Properties/launchSettings.json b/src/R4Mvc.Tools/Properties/launchSettings.json index 5c2b558..e336738 100644 --- a/src/R4Mvc.Tools/Properties/launchSettings.json +++ b/src/R4Mvc.Tools/Properties/launchSettings.json @@ -3,8 +3,8 @@ "R4Mvc.Tools": { "commandName": "Project", "commandLineArgs_blank": "", - "commandLineArgs": "generate -p \"..\\..\\..\\..\\..\\samples\\AspNetSimple.NetCore2\\AspNetSimple.NetCore2.csproj\"", - "commandLineArgs2": "generate -p \"..\\..\\..\\..\\..\\samples\\AspNetSimple\\AspNetSimple.csproj\"", + "commandLineArgs2": "generate -p \"..\\..\\..\\..\\..\\samples\\AspNetSimple.NetCore2\\AspNetSimple.NetCore2.csproj\"", + "commandLineArgs": "generate -p \"..\\..\\..\\..\\..\\samples\\AspNetSimple\\AspNetSimple.csproj\"", "commandLineArgs_aspNetFeatureFolders": "generate -p \"..\\..\\..\\..\\..\\samples\\AspNetFeatureFolders\\AspNetFeatureFolders.csproj\"" } } diff --git a/src/R4Mvc.Tools/Settings.cs b/src/R4Mvc.Tools/Settings.cs index b902442..7793462 100644 --- a/src/R4Mvc.Tools/Settings.cs +++ b/src/R4Mvc.Tools/Settings.cs @@ -10,7 +10,7 @@ public class Settings public string R4MvcNamespace { get; set; } = "R4Mvc"; public string LinksNamespace { get; set; } = "Links"; public bool SplitIntoMultipleFiles { get; set; } = true; - public bool SplitViewOnlyPagesIntoMultipleFiles { get; set; } = true; + public bool SplitViewOnlyPagesIntoMultipleFiles { get; set; } = false; public string StaticFilesPath { get; set; } = "wwwroot"; public string[] ExcludedStaticFileExtensions { get; set; } public string[] ReferencedNamespaces { get; set; } From 7d6bfe242b80723666f846e3f831e9d33b6683ec Mon Sep 17 00:00:00 2001 From: danielgreen Date: Sat, 17 Dec 2022 17:15:23 +0000 Subject: [PATCH 2/2] Update the appveyor image to VS 2022. Remove the .NET Core 2.1 sample app. Update other apps from .NET Core 3.1 to .NET 7. Update NuGet package dependencies. --- R4MVC.sln | 11 ++------ RunGenerate.bat | 1 - appveyor.yml | 2 +- .../AspNetFeatureFolders.csproj | 2 +- .../Properties/launchSettings.json | 1 - src/R4Mvc.Tools/R4Mvc.Tools.csproj | 15 +++++------ src/R4Mvc/R4Mvc.csproj | 25 +++---------------- .../AspNetSimple.Test.csproj | 10 ++++---- test/R4Mvc.Test/R4Mvc.Test.csproj | 10 ++++---- 9 files changed, 26 insertions(+), 51 deletions(-) diff --git a/R4MVC.sln b/R4MVC.sln index 7e0cfb8..cd5cc02 100644 --- a/R4MVC.sln +++ b/R4MVC.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.29318.209 +# Visual Studio Version 17 +VisualStudioVersion = 17.4.33205.214 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".solution", ".solution", "{1E8F7AFD-5175-406A-9736-817C75DA1142}" ProjectSection(SolutionItems) = preProject @@ -33,8 +33,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AspNetSimple.Test", "test\A EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SampleModels", "samples\SampleModels\SampleModels.csproj", "{8F6D7DDE-98A0-4808-BD91-C1CF2E0AAC69}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AspNetSimple.NetCore2", "samples\AspNetSimple.NetCore2\AspNetSimple.NetCore2.csproj", "{4609AF1D-0942-43DA-9979-F92972A22A7A}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -73,10 +71,6 @@ Global {8F6D7DDE-98A0-4808-BD91-C1CF2E0AAC69}.Debug|Any CPU.Build.0 = Debug|Any CPU {8F6D7DDE-98A0-4808-BD91-C1CF2E0AAC69}.Release|Any CPU.ActiveCfg = Release|Any CPU {8F6D7DDE-98A0-4808-BD91-C1CF2E0AAC69}.Release|Any CPU.Build.0 = Release|Any CPU - {4609AF1D-0942-43DA-9979-F92972A22A7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4609AF1D-0942-43DA-9979-F92972A22A7A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4609AF1D-0942-43DA-9979-F92972A22A7A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4609AF1D-0942-43DA-9979-F92972A22A7A}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -90,7 +84,6 @@ Global {86B3FF8A-284E-4070-9120-D343366B18E2} = {B9FF7D5E-784B-4C4A-B6E6-286C1E3D131E} {75510011-133B-4A05-AD09-A399CDBFA3A5} = {30626644-0E8A-4610-A0A9-274E91F1A037} {8F6D7DDE-98A0-4808-BD91-C1CF2E0AAC69} = {B9FF7D5E-784B-4C4A-B6E6-286C1E3D131E} - {4609AF1D-0942-43DA-9979-F92972A22A7A} = {B9FF7D5E-784B-4C4A-B6E6-286C1E3D131E} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {B90C19F2-2B5E-42AD-AE1D-27AD17E4DDB4} diff --git a/RunGenerate.bat b/RunGenerate.bat index 7baf6ec..1614b9e 100644 --- a/RunGenerate.bat +++ b/RunGenerate.bat @@ -4,5 +4,4 @@ IF NOT "%1"=="" SET CONFIGURATION=%1 @ECHO ON .\src\R4Mvc.Tools\bin\%CONFIGURATION%\net472\R4Mvc.Tools.exe generate -p .\samples\AspNetSimple\AspNetSimple.csproj -.\src\R4Mvc.Tools\bin\%CONFIGURATION%\net472\R4Mvc.Tools.exe generate -p .\samples\AspNetSimple.NetCore2\AspNetSimple.NetCore2.csproj .\src\R4Mvc.Tools\bin\%CONFIGURATION%\net472\R4Mvc.Tools.exe generate -p .\samples\AspNetFeatureFolders\AspNetFeatureFolders.csproj diff --git a/appveyor.yml b/appveyor.yml index 3b29f36..e764eac 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,6 +1,6 @@ version: 1.0.0.{build} -image: Visual Studio 2019 +image: Visual Studio 2022 configuration: Release skip_tags: true diff --git a/samples/AspNetFeatureFolders/AspNetFeatureFolders.csproj b/samples/AspNetFeatureFolders/AspNetFeatureFolders.csproj index 705e2e5..6e9a7d8 100644 --- a/samples/AspNetFeatureFolders/AspNetFeatureFolders.csproj +++ b/samples/AspNetFeatureFolders/AspNetFeatureFolders.csproj @@ -1,7 +1,7 @@  - netcoreapp3.1 + net7.0 false diff --git a/src/R4Mvc.Tools/Properties/launchSettings.json b/src/R4Mvc.Tools/Properties/launchSettings.json index e336738..9b324f6 100644 --- a/src/R4Mvc.Tools/Properties/launchSettings.json +++ b/src/R4Mvc.Tools/Properties/launchSettings.json @@ -3,7 +3,6 @@ "R4Mvc.Tools": { "commandName": "Project", "commandLineArgs_blank": "", - "commandLineArgs2": "generate -p \"..\\..\\..\\..\\..\\samples\\AspNetSimple.NetCore2\\AspNetSimple.NetCore2.csproj\"", "commandLineArgs": "generate -p \"..\\..\\..\\..\\..\\samples\\AspNetSimple\\AspNetSimple.csproj\"", "commandLineArgs_aspNetFeatureFolders": "generate -p \"..\\..\\..\\..\\..\\samples\\AspNetFeatureFolders\\AspNetFeatureFolders.csproj\"" } diff --git a/src/R4Mvc.Tools/R4Mvc.Tools.csproj b/src/R4Mvc.Tools/R4Mvc.Tools.csproj index 53f0579..759aff2 100644 --- a/src/R4Mvc.Tools/R4Mvc.Tools.csproj +++ b/src/R4Mvc.Tools/R4Mvc.Tools.csproj @@ -49,13 +49,14 @@ - - - - - - - + + + + + + + + diff --git a/src/R4Mvc/R4Mvc.csproj b/src/R4Mvc/R4Mvc.csproj index c06ecad..6ee973b 100644 --- a/src/R4Mvc/R4Mvc.csproj +++ b/src/R4Mvc/R4Mvc.csproj @@ -1,7 +1,7 @@  - netstandard1.6;netstandard2.0;netcoreapp3.1;net5.0;net461 + netstandard2.0;net7.0;net461 true 1701;1702;1591 @@ -32,26 +32,9 @@ embedded - - $(DefineConstants);CORE1 - - - - $(DefineConstants);CORE2 - - - - - - - - - - - - - - + + + diff --git a/test/AspNetSimple.Test/AspNetSimple.Test.csproj b/test/AspNetSimple.Test/AspNetSimple.Test.csproj index 8dfc2e3..e4e92ae 100644 --- a/test/AspNetSimple.Test/AspNetSimple.Test.csproj +++ b/test/AspNetSimple.Test/AspNetSimple.Test.csproj @@ -1,15 +1,15 @@ - netcoreapp3.1 + net7.0 false - - - - + + + + all runtime; build; native; contentfiles; analyzers diff --git a/test/R4Mvc.Test/R4Mvc.Test.csproj b/test/R4Mvc.Test/R4Mvc.Test.csproj index 3108274..60157db 100644 --- a/test/R4Mvc.Test/R4Mvc.Test.csproj +++ b/test/R4Mvc.Test/R4Mvc.Test.csproj @@ -6,11 +6,11 @@ - - - - - + + + + + all runtime; build; native; contentfiles; analyzers