diff --git a/R4MVC.sln b/R4MVC.sln index 7e0cfb8..270d517 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.3.32825.248 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/samples/AspNetFeatureFolders/AspNetFeatureFolders.csproj b/samples/AspNetFeatureFolders/AspNetFeatureFolders.csproj index 705e2e5..271d7bb 100644 --- a/samples/AspNetFeatureFolders/AspNetFeatureFolders.csproj +++ b/samples/AspNetFeatureFolders/AspNetFeatureFolders.csproj @@ -1,7 +1,7 @@  - netcoreapp3.1 + net6.0 false diff --git a/src/R4Mvc.Tools.Cli/R4Mvc.Tools.Cli.csproj b/src/R4Mvc.Tools.Cli/R4Mvc.Tools.Cli.csproj index e165d1d..de1e02e 100644 --- a/src/R4Mvc.Tools.Cli/R4Mvc.Tools.Cli.csproj +++ b/src/R4Mvc.Tools.Cli/R4Mvc.Tools.Cli.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp2.1 + net6.0 r4mvc tools true diff --git a/src/R4Mvc.Tools/Locators/DefaultRazorViewLocator.cs b/src/R4Mvc.Tools/Locators/DefaultRazorViewLocator.cs index 3a10b3e..ab0153a 100644 --- a/src/R4Mvc.Tools/Locators/DefaultRazorViewLocator.cs +++ b/src/R4Mvc.Tools/Locators/DefaultRazorViewLocator.cs @@ -65,11 +65,22 @@ protected virtual IEnumerable FindViews(string projectRoot, string areaNam yield return GetView(projectRoot, file, controllerName, areaName); } - foreach (var directory in _fileLocator.GetDirectories(controllerPath)) + foreach (var view in FindViewsRecursively(projectRoot, areaName, controllerName, controllerPath)) + yield return view; + + IEnumerable FindViewsRecursively(string projectRoot, string areaName, string controllerName, string controllerPath) { - foreach (var file in _fileLocator.GetFiles(directory, "*.cshtml")) + foreach (var directory in _fileLocator.GetDirectories(controllerPath)) { - yield return GetView(projectRoot, file, controllerName, areaName, Path.GetFileName(directory)); + foreach (var file in _fileLocator.GetFiles(directory, "*.cshtml")) + { + yield return GetView(projectRoot, file, controllerName, areaName, Path.GetFileName(directory)); + } + + foreach (var file in FindViewsRecursively(projectRoot, areaName, controllerName, directory)) + { + yield return file; + } } } } diff --git a/src/R4Mvc.Tools/R4Mvc.Tools.csproj b/src/R4Mvc.Tools/R4Mvc.Tools.csproj index 53f0579..f2d58de 100644 --- a/src/R4Mvc.Tools/R4Mvc.Tools.csproj +++ b/src/R4Mvc.Tools/R4Mvc.Tools.csproj @@ -9,7 +9,13 @@ False - + + true + true + + + + R4Mvc.Tools Kevin Kuszyk, Scott Mackay, Artiom Chilaru false @@ -49,12 +55,13 @@ - - - + + + + diff --git a/src/R4Mvc/R4Mvc.csproj b/src/R4Mvc/R4Mvc.csproj index c06ecad..b41a617 100644 --- a/src/R4Mvc/R4Mvc.csproj +++ b/src/R4Mvc/R4Mvc.csproj @@ -1,7 +1,7 @@  - netstandard1.6;netstandard2.0;netcoreapp3.1;net5.0;net461 + netstandard1.6;netstandard2.0;net6.0 true 1701;1702;1591 diff --git a/test/R4Mvc.Test/R4Mvc.Test.csproj b/test/R4Mvc.Test/R4Mvc.Test.csproj index 3108274..6f97f61 100644 --- a/test/R4Mvc.Test/R4Mvc.Test.csproj +++ b/test/R4Mvc.Test/R4Mvc.Test.csproj @@ -1,4 +1,4 @@ - + net472 @@ -6,7 +6,7 @@ - +