dotnet-cli

How to apply database code first migrations in an azure deployed application?

跟風遠走 提交于 2019-11-26 18:39:32
问题 I just deployed an application into an azure App Service. My project does has migrations to be applied. But I was not able to apply them by using azure app command line dotnet ef database update D:\home\site\wwwroot> No executable found matching command "dotnet-ef" How can I apply them remotely? 回答1: For dotnet-ef , I assumed that you are talking about Entity Framework Core. I have tried to run dotnet ef database update under D:\home\site\wwwroot of KUDU and Package Manager Console of VS, I

The library hostpolicy.dll was not found

假装没事ソ 提交于 2019-11-26 14:26:10
问题 I have a simple .NET Core project (console app) that I'm trying to compile and run. dotnet build succeeds, but I get the following error when I do dotnet run : λ dotnet run Project RazorPrecompiler (.NETCoreApp,Version=v1.0) was previously compiled. Skipping compilation. A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in [path]. My project.json looks like this: { "buildOptions": { "warningsAsErrors": true }, "dependencies": {

dotnet publish doesn´t publish correct appsettings.{env.EnvironmentName}.json

偶尔善良 提交于 2019-11-26 09:31:31
问题 When I issue the following command in the command line: dotnet publish -o \"./../output\" -c Release The dotnetcli publishes the project correctly. However, it does not copy the appsettings.Production.json file, only the appsettings.json . Why is this? I have googled around and read the official core docs, but haven\'t found how the correct environment appsettings.json is supposed to end up in the publish output. Should I copy appsettings.Production.json manually to the published folder? 回答1: