From 40ef11cf54fa65f9e79d630b1f187ae3f8961f4d Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Wed, 21 Nov 2018 09:12:06 -0800 Subject: [PATCH] Fix UserSecretsIdAttribute generation when using FrameworkReference to Microsoft.AspNetCore.App (#4177) When only Microsoft.AspNetCore.App is referenced, the project will no longer have MSBuild imports from the Microsoft.Extensions.Configuration.UserSecrets package, which takes care of generating the UserSecretsIdAttribute. This ensures the attribute is still generated in default project templates without needing a new package ref to Config.UserSecrets. --- .../pkg/Microsoft.AspNetCore.App.targets | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/Framework/pkg/Microsoft.AspNetCore.App.targets b/src/Framework/pkg/Microsoft.AspNetCore.App.targets index 9e85ffd055..be73b09622 100644 --- a/src/Framework/pkg/Microsoft.AspNetCore.App.targets +++ b/src/Framework/pkg/Microsoft.AspNetCore.App.targets @@ -4,4 +4,27 @@ Text="This version of Microsoft.AspNetCore.App is only compatible with the netcoreapp3.0 target framework. Please target netcoreapp3.0 or choose a version of Microsoft.AspNetCore.App compatible with $(TargetFramework)." Condition="'$(TargetFramework)' != 'netcoreapp3.0'"/> + + + + + + + + <_Parameter1>$(UserSecretsId.Trim()) + + +