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

UserSecrets #16

Open
PeterJD opened this issue Apr 26, 2019 · 6 comments
Open

UserSecrets #16

PeterJD opened this issue Apr 26, 2019 · 6 comments

Comments

@PeterJD
Copy link

PeterJD commented Apr 26, 2019

Hi
How to resolve below error?
Error CS0234 The type or namespace name 'UserSecrets' does not exist in the namespace 'Microsoft.Extensions.Configuration' (are you missing an assembly reference?) BookFast.Web C:\BWork\book-fast-service-fabric-CMS\BookFast.Web\obj\Debug\netcoreapp2.1\win7-x64\BookFast.Web.AssemblyInfo.cs 14 Active
location:-
C:\BWork\book-fast-service-fabric-CMS\BookFast.Web\obj\Debug\netcoreapp2.1\win7-x64\BookFast.Web.AssemblyInfo.cs

[assembly: Microsoft.Extensions.Configuration.UserSecrets.UserSecretsIdAttribute("a00339d6-a38f-4e12-9071-21d71a12ec62")]

I disable above which then built ok?

Next Error:Update-database from Package Manager Console

The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Cannot find path 'C:\BWork\book-fast-service-fabric-CMS\BookFast\BookFast.sfproj\bin\Debug' because it does not exist.
Kind regards
Peter

@PeterJD
Copy link
Author

PeterJD commented Apr 26, 2019

Next Error:Update-database from Package Manager Console

This error caused by not setting up correct startup project

@PeterJD
Copy link
Author

PeterJD commented Apr 26, 2019

Setup startup project to BookFast.Facility.Data
How do I setup target environment for local ?
Error:-
PM> update-database
System.ArgumentException: No target environment has been specified. Please make sure to define TargetEnv environment variable.
at BookFast.Facility.Data.DesignTimeFacilityContextFactory.CreateDbContext(String[] args) in C:\BWork\book-fast-service-fabric-CMS\BookFast.Facility.Data\DesignTimeFacilityContextFactory.cs:line 17
at Microsoft.EntityFrameworkCore.Design.Internal.DbContextOperations.CreateContext(Func`1 factory)
at Microsoft.EntityFrameworkCore.Design.Internal.DbContextOperations.CreateContext(String contextType)
at Microsoft.EntityFrameworkCore.Design.Internal.MigrationsOperations.UpdateDatabase(String targetMigration, String contextType)
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action)
No target environment has been specified. Please make sure to define TargetEnv environment variable.

@PeterJD
Copy link
Author

PeterJD commented Apr 26, 2019

Failed to run "C:\BWork\book-fast-service-fabric-CMS\BookFast.Web\Gulpfile.js"...
cmd.exe /c gulp --tasks-simple
gulp[14720]: src\node_contextify.cc:631: Assertion `args[1]->IsString()' failed.
1: 00007FF748F482F5
2: 00007FF748F24156
3: 00007FF748F24221
4: 00007FF748EFA69A
5: 00007FF749545EB2
6: 00007FF749547008
7: 00007FF74954636D
8: 00007FF74954628B
9: 000001B50A9841C1

@PeterJD
Copy link
Author

PeterJD commented Apr 26, 2019

solved Error CS0234 The type or namespace name 'UserSecrets' I am simple blind as a bat HaHa
being confused with Secrets!!

@PeterJD
Copy link
Author

PeterJD commented Apr 26, 2019

C:\WINDOWS\system32>gulp -v
CLI version: 2.2.0

C:\WINDOWS\system32>npm -v
6.4.1
Is this the reason? which version do I need to install?

@PeterJD
Copy link
Author

PeterJD commented Apr 29, 2019

SOLVED
Setup startup project to BookFast.Facility.Data
How do I setup target environment for local ?
Error:-
PM> update-database
Peter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant