From b9eb851045c95e3cab4be82b7dcae3a46870e45b Mon Sep 17 00:00:00 2001 From: chullybun Date: Fri, 29 Mar 2024 14:08:50 -0700 Subject: [PATCH] Template fixes. --- CHANGELOG.md | 3 ++ Common.targets | 2 +- .../Cdr.Banking.Api/Cdr.Banking.Api.csproj | 2 +- .../Cdr.Banking.Business.csproj | 6 ++-- .../Cdr.Banking.Common.csproj | 2 +- .../Cdr.Banking.Test/Cdr.Banking.Test.csproj | 2 +- .../Demo/Beef.Demo.Api/Beef.Demo.Api.csproj | 2 +- .../Beef.Demo.Business.csproj | 16 +++++----- .../Validation/RobotValidator.cs | 2 +- .../Beef.Demo.Common/Beef.Demo.Common.csproj | 2 +- .../Demo/Beef.Demo.Test/Beef.Demo.Test.csproj | 4 +-- samples/My.Hr/My.Hr.Api/My.Hr.Api.csproj | 2 +- .../My.Hr.Business/My.Hr.Business.csproj | 8 ++--- .../My.Hr/My.Hr.Common/My.Hr.Common.csproj | 2 +- .../My.Hr.Database/My.Hr.Database.csproj | 2 +- samples/My.Hr/My.Hr.Test/My.Hr.Test.csproj | 4 +-- .../MyEf.Hr/MyEf.Hr.Api/MyEf.Hr.Api.csproj | 4 +-- .../MyEf.Hr.Business/MyEf.Hr.Business.csproj | 10 +++---- .../MyEf.Hr.Common/MyEf.Hr.Common.csproj | 2 +- .../MyEf.Hr.Security.Subscriptions.csproj | 6 ++-- .../MyEf.Hr.Security.Test.csproj | 2 +- .../MyEf.Hr/MyEf.Hr.Test/MyEf.Hr.Test.csproj | 4 +-- .../content/.template.config/template.json | 8 ++--- .../content/Company.AppName.Api/Startup.cs | 13 +++++++-- .../Company.AppName.Api/appsettings.json | 11 +++---- .../AppNameSettings.cs | 5 ++++ .../Company.AppName.Business.csproj | 4 +-- .../Company.AppName.CodeGen/Program.cs | 4 +++ .../entity.beef-5.yaml | 29 +------------------ .../refdata.beef-5.yaml | 3 ++ .../Company.AppName.Services.Test.csproj | 4 +-- .../Company.AppName.Services.csproj | 2 +- .../Company.AppName.Test.csproj | 4 +-- .../TemplateTest.cs | 4 +-- .../Beef.CodeGen.Core.csproj | 2 +- .../Beef.Database.Core.csproj | 4 +-- .../Beef.Database.MySql.csproj | 4 +-- .../Beef.Database.Postgres.csproj | 4 +-- .../Beef.Database.SqlServer.csproj | 4 +-- tools/Beef.Test.NUnit/Beef.Test.NUnit.csproj | 2 +- 40 files changed, 99 insertions(+), 101 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c0d34685..e45c2286c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ Represents the **NuGet** versions. +## v5.12.2 +- *Fixed:* Fixes to the Template solution to improve the initial `dotnet new beef` experience. + ## v5.12.1 - *Fixed:* Upgraded `CoreEx` (`v3.15.0`) to include all related fixes and improvements. - *Fixed:* The API Agent templates have been updated to account for the changes to the `TypedHttpClientBase` constructor signature in `CoreEx` (`v3.15.0`). diff --git a/Common.targets b/Common.targets index 38f831e25..d84eda3b4 100644 --- a/Common.targets +++ b/Common.targets @@ -1,6 +1,6 @@ - 5.12.1 + 5.12.2 preview Avanade Avanade diff --git a/samples/Cdr.Banking/Cdr.Banking.Api/Cdr.Banking.Api.csproj b/samples/Cdr.Banking/Cdr.Banking.Api/Cdr.Banking.Api.csproj index d2c8c83af..bafa71f85 100644 --- a/samples/Cdr.Banking/Cdr.Banking.Api/Cdr.Banking.Api.csproj +++ b/samples/Cdr.Banking/Cdr.Banking.Api/Cdr.Banking.Api.csproj @@ -5,7 +5,7 @@ true - + diff --git a/samples/Cdr.Banking/Cdr.Banking.Business/Cdr.Banking.Business.csproj b/samples/Cdr.Banking/Cdr.Banking.Business/Cdr.Banking.Business.csproj index fe4cb8b2a..b2d29eb7d 100644 --- a/samples/Cdr.Banking/Cdr.Banking.Business/Cdr.Banking.Business.csproj +++ b/samples/Cdr.Banking/Cdr.Banking.Business/Cdr.Banking.Business.csproj @@ -11,8 +11,8 @@ - - - + + + \ No newline at end of file diff --git a/samples/Cdr.Banking/Cdr.Banking.Common/Cdr.Banking.Common.csproj b/samples/Cdr.Banking/Cdr.Banking.Common/Cdr.Banking.Common.csproj index 7ff904b50..ce2d62bcc 100644 --- a/samples/Cdr.Banking/Cdr.Banking.Common/Cdr.Banking.Common.csproj +++ b/samples/Cdr.Banking/Cdr.Banking.Common/Cdr.Banking.Common.csproj @@ -8,6 +8,6 @@ - + \ No newline at end of file diff --git a/samples/Cdr.Banking/Cdr.Banking.Test/Cdr.Banking.Test.csproj b/samples/Cdr.Banking/Cdr.Banking.Test/Cdr.Banking.Test.csproj index 61dfc8ef9..1b774ab8a 100644 --- a/samples/Cdr.Banking/Cdr.Banking.Test/Cdr.Banking.Test.csproj +++ b/samples/Cdr.Banking/Cdr.Banking.Test/Cdr.Banking.Test.csproj @@ -39,7 +39,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/samples/Demo/Beef.Demo.Api/Beef.Demo.Api.csproj b/samples/Demo/Beef.Demo.Api/Beef.Demo.Api.csproj index 8e324e252..b36718a6d 100644 --- a/samples/Demo/Beef.Demo.Api/Beef.Demo.Api.csproj +++ b/samples/Demo/Beef.Demo.Api/Beef.Demo.Api.csproj @@ -12,7 +12,7 @@ - + diff --git a/samples/Demo/Beef.Demo.Business/Beef.Demo.Business.csproj b/samples/Demo/Beef.Demo.Business/Beef.Demo.Business.csproj index 890c4426d..14571d4fa 100644 --- a/samples/Demo/Beef.Demo.Business/Beef.Demo.Business.csproj +++ b/samples/Demo/Beef.Demo.Business/Beef.Demo.Business.csproj @@ -15,14 +15,14 @@ - - - - - - - - + + + + + + + + diff --git a/samples/Demo/Beef.Demo.Business/Validation/RobotValidator.cs b/samples/Demo/Beef.Demo.Business/Validation/RobotValidator.cs index d5c543387..9c6115c07 100644 --- a/samples/Demo/Beef.Demo.Business/Validation/RobotValidator.cs +++ b/samples/Demo/Beef.Demo.Business/Validation/RobotValidator.cs @@ -2,7 +2,7 @@ namespace Beef.Demo.Business.Validation { - public class RobotValidator : AbstractValidator + public class RobotValidator : FluentValidation.AbstractValidator { public RobotValidator() { diff --git a/samples/Demo/Beef.Demo.Common/Beef.Demo.Common.csproj b/samples/Demo/Beef.Demo.Common/Beef.Demo.Common.csproj index 8abbbd9a1..de056904f 100644 --- a/samples/Demo/Beef.Demo.Common/Beef.Demo.Common.csproj +++ b/samples/Demo/Beef.Demo.Common/Beef.Demo.Common.csproj @@ -7,7 +7,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/samples/Demo/Beef.Demo.Test/Beef.Demo.Test.csproj b/samples/Demo/Beef.Demo.Test/Beef.Demo.Test.csproj index 97009a5eb..fc5af2a53 100644 --- a/samples/Demo/Beef.Demo.Test/Beef.Demo.Test.csproj +++ b/samples/Demo/Beef.Demo.Test/Beef.Demo.Test.csproj @@ -52,7 +52,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -62,7 +62,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/samples/My.Hr/My.Hr.Api/My.Hr.Api.csproj b/samples/My.Hr/My.Hr.Api/My.Hr.Api.csproj index 62df5cc30..e8214c43c 100644 --- a/samples/My.Hr/My.Hr.Api/My.Hr.Api.csproj +++ b/samples/My.Hr/My.Hr.Api/My.Hr.Api.csproj @@ -5,7 +5,7 @@ true - + diff --git a/samples/My.Hr/My.Hr.Business/My.Hr.Business.csproj b/samples/My.Hr/My.Hr.Business/My.Hr.Business.csproj index 14d36bf3c..526b82a61 100644 --- a/samples/My.Hr/My.Hr.Business/My.Hr.Business.csproj +++ b/samples/My.Hr/My.Hr.Business/My.Hr.Business.csproj @@ -5,10 +5,10 @@ true - - - - + + + + \ No newline at end of file diff --git a/samples/My.Hr/My.Hr.Common/My.Hr.Common.csproj b/samples/My.Hr/My.Hr.Common/My.Hr.Common.csproj index 8057ddfeb..14349fd5b 100644 --- a/samples/My.Hr/My.Hr.Common/My.Hr.Common.csproj +++ b/samples/My.Hr/My.Hr.Common/My.Hr.Common.csproj @@ -4,6 +4,6 @@ enable - + \ No newline at end of file diff --git a/samples/My.Hr/My.Hr.Database/My.Hr.Database.csproj b/samples/My.Hr/My.Hr.Database/My.Hr.Database.csproj index cc375631f..2f0168d82 100644 --- a/samples/My.Hr/My.Hr.Database/My.Hr.Database.csproj +++ b/samples/My.Hr/My.Hr.Database/My.Hr.Database.csproj @@ -26,7 +26,7 @@ - + diff --git a/samples/My.Hr/My.Hr.Test/My.Hr.Test.csproj b/samples/My.Hr/My.Hr.Test/My.Hr.Test.csproj index 4e319742e..5feeb679c 100644 --- a/samples/My.Hr/My.Hr.Test/My.Hr.Test.csproj +++ b/samples/My.Hr/My.Hr.Test/My.Hr.Test.csproj @@ -32,7 +32,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -42,7 +42,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/samples/MyEf.Hr/MyEf.Hr.Api/MyEf.Hr.Api.csproj b/samples/MyEf.Hr/MyEf.Hr.Api/MyEf.Hr.Api.csproj index b0dee97c8..730a70f16 100644 --- a/samples/MyEf.Hr/MyEf.Hr.Api/MyEf.Hr.Api.csproj +++ b/samples/MyEf.Hr/MyEf.Hr.Api/MyEf.Hr.Api.csproj @@ -6,8 +6,8 @@ True - - + + diff --git a/samples/MyEf.Hr/MyEf.Hr.Business/MyEf.Hr.Business.csproj b/samples/MyEf.Hr/MyEf.Hr.Business/MyEf.Hr.Business.csproj index 9d5b55450..7d3ccde41 100644 --- a/samples/MyEf.Hr/MyEf.Hr.Business/MyEf.Hr.Business.csproj +++ b/samples/MyEf.Hr/MyEf.Hr.Business/MyEf.Hr.Business.csproj @@ -5,11 +5,11 @@ true - - - - - + + + + + diff --git a/samples/MyEf.Hr/MyEf.Hr.Common/MyEf.Hr.Common.csproj b/samples/MyEf.Hr/MyEf.Hr.Common/MyEf.Hr.Common.csproj index 8057ddfeb..14349fd5b 100644 --- a/samples/MyEf.Hr/MyEf.Hr.Common/MyEf.Hr.Common.csproj +++ b/samples/MyEf.Hr/MyEf.Hr.Common/MyEf.Hr.Common.csproj @@ -4,6 +4,6 @@ enable - + \ No newline at end of file diff --git a/samples/MyEf.Hr/MyEf.Hr.Security.Subscriptions/MyEf.Hr.Security.Subscriptions.csproj b/samples/MyEf.Hr/MyEf.Hr.Security.Subscriptions/MyEf.Hr.Security.Subscriptions.csproj index 31300cf42..3c04c7949 100644 --- a/samples/MyEf.Hr/MyEf.Hr.Security.Subscriptions/MyEf.Hr.Security.Subscriptions.csproj +++ b/samples/MyEf.Hr/MyEf.Hr.Security.Subscriptions/MyEf.Hr.Security.Subscriptions.csproj @@ -15,14 +15,14 @@ - - + + - + diff --git a/samples/MyEf.Hr/MyEf.Hr.Security.Test/MyEf.Hr.Security.Test.csproj b/samples/MyEf.Hr/MyEf.Hr.Security.Test/MyEf.Hr.Security.Test.csproj index 2cd230141..8fa967449 100644 --- a/samples/MyEf.Hr/MyEf.Hr.Security.Test/MyEf.Hr.Security.Test.csproj +++ b/samples/MyEf.Hr/MyEf.Hr.Security.Test/MyEf.Hr.Security.Test.csproj @@ -27,7 +27,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/samples/MyEf.Hr/MyEf.Hr.Test/MyEf.Hr.Test.csproj b/samples/MyEf.Hr/MyEf.Hr.Test/MyEf.Hr.Test.csproj index 2dd84d193..e842ff6a4 100644 --- a/samples/MyEf.Hr/MyEf.Hr.Test/MyEf.Hr.Test.csproj +++ b/samples/MyEf.Hr/MyEf.Hr.Test/MyEf.Hr.Test.csproj @@ -32,7 +32,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -42,7 +42,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/templates/Beef.Template.Solution/content/.template.config/template.json b/templates/Beef.Template.Solution/content/.template.config/template.json index 409f074b2..df5cc8a4e 100644 --- a/templates/Beef.Template.Solution/content/.template.config/template.json +++ b/templates/Beef.Template.Solution/content/.template.config/template.json @@ -85,7 +85,7 @@ "type": "generated", "generator": "constant", "parameters": { - "value": "3.15.0" + "value": "3.16.0" }, "replaces": "CoreExVersion" }, @@ -93,7 +93,7 @@ "type": "generated", "generator": "constant", "parameters": { - "value": "5.12.1" + "value": "5.12.2" }, "replaces": "BeefVersion" }, @@ -172,7 +172,7 @@ "modifiers": [ { "condition": "(implement_none)", - "exclude": [ "Company.AppName.Business/Validation/**/*", "Company.AppName.Business/Data/PersonData.cs" ] + "exclude": [ "Company.AppName.Business/Validation/**/*", "Company.AppName.Business/Data/PersonData.cs", "Company.AppName.Test/Apis/PersonTest.cs", "Company.AppName.Test/Resources/*", "Company.AppName.Test/Validators/*" ] }, { "condition": "(implement_cosmos || implement_httpagent || implement_none)", @@ -208,7 +208,7 @@ }, { "condition": "!(implement_services)", - "exclude": [ "Company.AppName.Services/**/*", "Company.AppName.ServicesTest/**/*" ] + "exclude": [ "Company.AppName.Services/**/*", "Company.AppName.Services.Test/**/*" ] } ] } diff --git a/templates/Beef.Template.Solution/content/Company.AppName.Api/Startup.cs b/templates/Beef.Template.Solution/content/Company.AppName.Api/Startup.cs index 506b0346c..b1ba77a88 100644 --- a/templates/Beef.Template.Solution/content/Company.AppName.Api/Startup.cs +++ b/templates/Beef.Template.Solution/content/Company.AppName.Api/Startup.cs @@ -107,7 +107,16 @@ public void ConfigureServices(IServiceCollection services) services.AddControllers(); // Add health checks. - services.AddHealthChecks(); + services.AddHealthChecks() +#if (implement_services) +#if (implement_database || implement_sqlserver) + .AddEventPublisherHealthCheck("ServiceBus", sp => new EventPublisher(sp.GetRequiredService(), sp.GetRequiredService(), sp.GetRequiredService())); +#else + .AddEventPublisherHealthCheck("EventSender", sp => new EventPublisher(sp.GetRequiredService(), sp.GetRequiredService(), sp.GetRequiredService())); +#endif +#else + .AddEventPublisherHealthCheck("EventSender", sp => new EventPublisher(sp.GetRequiredService(), sp.GetRequiredService(), sp.GetRequiredService())); +#endif // Add Azure monitor open telemetry. services.AddOpenTelemetry().UseAzureMonitor().WithTracing(b => b.AddSource("CoreEx.*", "MyEf.Hr.*", "Microsoft.EntityFrameworkCore.*", "EntityFrameworkCore.*")); @@ -140,7 +149,7 @@ public void Configure(IApplicationBuilder app) // Add health checks. app.UseHealthChecks("/health"); - app.UseHealthChecks("/health/detail"); // Secure with permissions / or remove given data returned. + app.UseHealthChecks("/health/detailed", new HealthCheckOptions { ResponseWriter = HealthReportStatusWriter.WriteJsonResults }); // Secure with permissions / or remove given data returned. // Use controllers. app.UseRouting(); diff --git a/templates/Beef.Template.Solution/content/Company.AppName.Api/appsettings.json b/templates/Beef.Template.Solution/content/Company.AppName.Api/appsettings.json index 7c9e664a7..0a2b20795 100644 --- a/templates/Beef.Template.Solution/content/Company.AppName.Api/appsettings.json +++ b/templates/Beef.Template.Solution/content/Company.AppName.Api/appsettings.json @@ -9,8 +9,8 @@ // Set using environment variable: 'AppName_ConnectionStrings__Database' "ConnectionStrings": { //#if (implement_services) - "ServiceBus": "Endpoint=sb://top-secret.servicebus.windows.net/;SharedAccessKeyName=top-secret;SharedAccessKey=top-encrypted-secret;", - "Storage": "DefaultEndpointsProtocol=https;AccountName=top-secret;AccountKey=top-secret;EndpointSuffix=core.windows.net", + "ServiceBus": "Endpoint=sb://top-secret.servicebus.windows.net/;SharedAccessKeyName=top-secret;SharedAccessKey=top-encrypted-secret;EntityPath=event-stream", + "Storage": "UseDevelopmentStorage=true;", //#endif "Database": "Data Source=.;Initial Catalog=Company.AppName;Integrated Security=True;TrustServerCertificate=true" }, @@ -19,7 +19,7 @@ // Set using environment variable: 'AppName_ConnectionStrings__Database' "ConnectionStrings": { //#if (implement_services) - "ServiceBus": "Endpoint=sb://top-secret.servicebus.windows.net/;SharedAccessKeyName=top-secret;SharedAccessKey=top-encrypted-secret;", + "ServiceBus": "Endpoint=sb://top-secret.servicebus.windows.net/;SharedAccessKeyName=top-secret;SharedAccessKey=top-encrypted-secret;EntityPath=event-stream", //#endif "Database": "Server=localhost; Port=3306; Database=Company.AppName; Uid=dbuser; Pwd=dbpassword; AllowUserVariables=true; UseAffectedRows=false" }, @@ -28,7 +28,7 @@ // Set using environment variable: 'AppName_ConnectionStrings__Database' "ConnectionStrings": { //#if (implement_services) - "ServiceBus": "Endpoint=sb://top-secret.servicebus.windows.net/;SharedAccessKeyName=top-secret;SharedAccessKey=top-encrypted-secret;", + "ServiceBus": "Endpoint=sb://top-secret.servicebus.windows.net/;SharedAccessKeyName=top-secret;SharedAccessKey=top-encrypted-secret;EntityPath=event-stream", //#endif "Database": "Server=localhost; Database=Company.AppName; Username=postgres; Password=dbpassword;" }, @@ -54,5 +54,6 @@ "Default": { "TracingEnabled": true } - } + }, + "IncludeExceptionInResult": true } \ No newline at end of file diff --git a/templates/Beef.Template.Solution/content/Company.AppName.Business/AppNameSettings.cs b/templates/Beef.Template.Solution/content/Company.AppName.Business/AppNameSettings.cs index 61bdecb1e..a9844eaa2 100644 --- a/templates/Beef.Template.Solution/content/Company.AppName.Business/AppNameSettings.cs +++ b/templates/Beef.Template.Solution/content/Company.AppName.Business/AppNameSettings.cs @@ -38,6 +38,11 @@ public class AppNameSettings(IConfiguration configuration) : SettingsBase(config /// Gets the Azure Service Bus connection string. /// public string ServiceBusConnectionString => GetRequiredValue("ConnectionStrings__ServiceBus"); + + /// + /// Gets the Azure Service Bus queue or topic name for the sender. + /// + public string ServiceBusQueueOrTopicName => GetRequiredValue("ServiceBusSender__QueueOrTopicName"); #if (implement_database || implement_sqlserver) /// diff --git a/templates/Beef.Template.Solution/content/Company.AppName.Business/Company.AppName.Business.csproj b/templates/Beef.Template.Solution/content/Company.AppName.Business/Company.AppName.Business.csproj index ce7737da7..359e0534c 100644 --- a/templates/Beef.Template.Solution/content/Company.AppName.Business/Company.AppName.Business.csproj +++ b/templates/Beef.Template.Solution/content/Company.AppName.Business/Company.AppName.Business.csproj @@ -23,10 +23,10 @@ - + - + diff --git a/templates/Beef.Template.Solution/content/Company.AppName.CodeGen/Program.cs b/templates/Beef.Template.Solution/content/Company.AppName.CodeGen/Program.cs index 9f201575d..5d13d4878 100644 --- a/templates/Beef.Template.Solution/content/Company.AppName.CodeGen/Program.cs +++ b/templates/Beef.Template.Solution/content/Company.AppName.CodeGen/Program.cs @@ -11,8 +11,12 @@ public static class Program /// The startup arguments. /// The status code whereby zero indicates success. #if (!implement_cosmos) +#if (implement_none) + public static Task Main(string[] args) => Beef.CodeGen.CodeGenConsole.Create("Company", "AppName").Supports(entity: true, refData: false).RunAsync(args); +#else public static Task Main(string[] args) => Beef.CodeGen.CodeGenConsole.Create("Company", "AppName").Supports(entity: true, refData: true).RunAsync(args); #endif +#endif #if (implement_cosmos) public static Task Main(string[] args) => Beef.CodeGen.CodeGenConsole.Create("Company", "AppName").Supports(entity: true, refData: true, dataModel: true).RunAsync(args); #endif diff --git a/templates/Beef.Template.Solution/content/Company.AppName.CodeGen/entity.beef-5.yaml b/templates/Beef.Template.Solution/content/Company.AppName.CodeGen/entity.beef-5.yaml index 0c1ec7eb7..c4b23f822 100644 --- a/templates/Beef.Template.Solution/content/Company.AppName.CodeGen/entity.beef-5.yaml +++ b/templates/Beef.Template.Solution/content/Company.AppName.CodeGen/entity.beef-5.yaml @@ -152,32 +152,5 @@ eventSourceRoot: Company/AppName eventSourceKind: Relative webApiAutoLocation: true refDataText: true -entities: - # The following is an example Entity with CRUD operations with no auto implementation. -- { name: Person, text: Person, collection: true, collectionResult: true, validator: PersonValidator, webApiRoutePrefix: persons, behavior: crupd, - properties: [ - { name: Id, type: Guid, primaryKey: true }, - { name: FirstName }, - { name: LastName }, - { name: Gender, type: ^Gender }, - { name: Birthday, type: DateTime, dateTimeTransform: DateOnly }, - { name: ETag, type: string }, - { name: ChangeLog, type: ChangeLog } - ], - operations: [ - { name: GetByArgs, type: GetColl, paging: true, - parameters: [ - { name: Args, type: PersonArgs, validator: PersonArgsValidator } - ] - } - ] - } - -- { name: PersonArgs, - properties: [ - { name: FirstName }, - { name: LastName }, - { name: Genders, type: ^Gender, refDataList: true } - ] - } +//entities: //#endif \ No newline at end of file diff --git a/templates/Beef.Template.Solution/content/Company.AppName.CodeGen/refdata.beef-5.yaml b/templates/Beef.Template.Solution/content/Company.AppName.CodeGen/refdata.beef-5.yaml index 138c746e8..1450eff3d 100644 --- a/templates/Beef.Template.Solution/content/Company.AppName.CodeGen/refdata.beef-5.yaml +++ b/templates/Beef.Template.Solution/content/Company.AppName.CodeGen/refdata.beef-5.yaml @@ -43,4 +43,7 @@ refDataType: Guid entities: # The following is an example read-only reference data Entity accessing data with no auto implementation. - { name: Gender } +//#endif +//#if (implement_none) +refDataType: Guid //#endif \ No newline at end of file diff --git a/templates/Beef.Template.Solution/content/Company.AppName.Services.Test/Company.AppName.Services.Test.csproj b/templates/Beef.Template.Solution/content/Company.AppName.Services.Test/Company.AppName.Services.Test.csproj index da27a53c4..489b80dda 100644 --- a/templates/Beef.Template.Solution/content/Company.AppName.Services.Test/Company.AppName.Services.Test.csproj +++ b/templates/Beef.Template.Solution/content/Company.AppName.Services.Test/Company.AppName.Services.Test.csproj @@ -31,8 +31,8 @@ - - + + diff --git a/templates/Beef.Template.Solution/content/Company.AppName.Services/Company.AppName.Services.csproj b/templates/Beef.Template.Solution/content/Company.AppName.Services/Company.AppName.Services.csproj index b6f174ee9..706f86891 100644 --- a/templates/Beef.Template.Solution/content/Company.AppName.Services/Company.AppName.Services.csproj +++ b/templates/Beef.Template.Solution/content/Company.AppName.Services/Company.AppName.Services.csproj @@ -18,7 +18,7 @@ - + diff --git a/templates/Beef.Template.Solution/content/Company.AppName.Test/Company.AppName.Test.csproj b/templates/Beef.Template.Solution/content/Company.AppName.Test/Company.AppName.Test.csproj index 43171300d..e8a693e2a 100644 --- a/templates/Beef.Template.Solution/content/Company.AppName.Test/Company.AppName.Test.csproj +++ b/templates/Beef.Template.Solution/content/Company.AppName.Test/Company.AppName.Test.csproj @@ -31,8 +31,8 @@ - - + + diff --git a/tests/Beef.Template.Solution.UnitTest/TemplateTest.cs b/tests/Beef.Template.Solution.UnitTest/TemplateTest.cs index 04be82095..cdddbcbfd 100644 --- a/tests/Beef.Template.Solution.UnitTest/TemplateTest.cs +++ b/tests/Beef.Template.Solution.UnitTest/TemplateTest.cs @@ -91,13 +91,13 @@ private static void OneTimeSetUp() } // Build Beef and package (nuget) - only local package, no deployment. - Assert.That(ExecuteCommand("powershell", $"{Path.Combine(_rootDir.FullName, "nuget-publish.ps1")} -configuration 'Debug' -IncludeSymbols -IncludeSource").exitCode, Is.AtLeast(0), "nuget publish"); + Assert.That(ExecuteCommand("powershell", $"{Path.Combine(_rootDir.FullName, "nuget-publish.ps1")} -configuration 'Release' -IncludeSymbols -IncludeSource").exitCode, Is.AtLeast(0), "nuget publish"); // Uninstall any previous beef templates (failure is ok here) ExecuteCommand("dotnet", "new uninstall beef.template.solution"); // Determine the "actual" version to publish so we are explicit. - var pf = Directory.GetFiles(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "nuget-publish"), "Beef.Template.Solution.*.nupkg").FirstOrDefault(); + var pf = Directory.GetFiles(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "nuget-publish"), "Beef.Template.Solution.*.nupkg").LastOrDefault(); Assert.That(pf, Is.Not.Null, "Beef.Template.Solution.*.nupkg could not be found."); // Install the Beef template solution from local package. diff --git a/tools/Beef.CodeGen.Core/Beef.CodeGen.Core.csproj b/tools/Beef.CodeGen.Core/Beef.CodeGen.Core.csproj index 01298388f..c49d8cd73 100644 --- a/tools/Beef.CodeGen.Core/Beef.CodeGen.Core.csproj +++ b/tools/Beef.CodeGen.Core/Beef.CodeGen.Core.csproj @@ -32,7 +32,7 @@ - + diff --git a/tools/Beef.Database.Core/Beef.Database.Core.csproj b/tools/Beef.Database.Core/Beef.Database.Core.csproj index a263238ea..925733fe0 100644 --- a/tools/Beef.Database.Core/Beef.Database.Core.csproj +++ b/tools/Beef.Database.Core/Beef.Database.Core.csproj @@ -14,8 +14,8 @@ - - + + diff --git a/tools/Beef.Database.MySql/Beef.Database.MySql.csproj b/tools/Beef.Database.MySql/Beef.Database.MySql.csproj index 213da96e1..02a4f3ab5 100644 --- a/tools/Beef.Database.MySql/Beef.Database.MySql.csproj +++ b/tools/Beef.Database.MySql/Beef.Database.MySql.csproj @@ -14,8 +14,8 @@ - - + + diff --git a/tools/Beef.Database.Postgres/Beef.Database.Postgres.csproj b/tools/Beef.Database.Postgres/Beef.Database.Postgres.csproj index fb9046fe7..395f26517 100644 --- a/tools/Beef.Database.Postgres/Beef.Database.Postgres.csproj +++ b/tools/Beef.Database.Postgres/Beef.Database.Postgres.csproj @@ -14,8 +14,8 @@ - - + + diff --git a/tools/Beef.Database.SqlServer/Beef.Database.SqlServer.csproj b/tools/Beef.Database.SqlServer/Beef.Database.SqlServer.csproj index fc5ac5e06..8970513f7 100644 --- a/tools/Beef.Database.SqlServer/Beef.Database.SqlServer.csproj +++ b/tools/Beef.Database.SqlServer/Beef.Database.SqlServer.csproj @@ -14,8 +14,8 @@ - - + + diff --git a/tools/Beef.Test.NUnit/Beef.Test.NUnit.csproj b/tools/Beef.Test.NUnit/Beef.Test.NUnit.csproj index 8f7ed1f95..dbf1c4175 100644 --- a/tools/Beef.Test.NUnit/Beef.Test.NUnit.csproj +++ b/tools/Beef.Test.NUnit/Beef.Test.NUnit.csproj @@ -8,7 +8,7 @@ - +