Tutorials
Tutorials copied to clipboard
Outdated instructions / incompatible tooling
With the releaase of .NET Core 1.1, and with the current version of Yeoman, I'm currently hitting into issues when performing a cf push to pcfdev. cf logs revealed the following.
2016-11-22T16:50:03.58-0500 [APP/0] ERR /home/vcap/app/project.json(17,70): warning NU1012: Dependency conflict. Steeltoe.Extensions.Configuration.CloudFoundry 1.0.0-dev-00057 expected Microsoft.Extensions.Configuration.EnvironmentVariables >= 1.1.0 but received 1.0.0
2016-11-22T16:50:03.58-0500 [APP/0] ERR /home/vcap/app/project.json(18,54): warning NU1012: Dependency conflict. Steeltoe.Extensions.Configuration.CloudFoundry 1.0.0-dev-00057 expected Microsoft.Extensions.Configuration.Json >= 1.1.0 but received 1.0.0
2016-11-22T16:50:03.58-0500 [APP/0] ERR /home/vcap/app/project.json(23,67): warning NU1012: Dependency conflict. Pivotal.Extensions.Configuration.ConfigServer 1.0.0-dev-00031 expected Microsoft.Extensions.Options.ConfigurationExtensions >= 1.1.0 but received 1.0.0
2016-11-22T16:50:03.58-0500 [APP/0] ERR /home/vcap/app/project.json(23,67): warning NU1012: Dependency conflict. Steeltoe.Extensions.Configuration.CloudFoundry 1.0.0-dev-00057 expected Microsoft.Extensions.Options.ConfigurationExtensions >= 1.1.0 but received 1.0.0
2016-11-22T16:50:03.58-0500 [APP/0] ERR /home/vcap/app/project.json(23,67): warning NU1012: Dependency conflict. Steeltoe.Extensions.Configuration.ConfigServer 1.0.0-dev-00057 expected Microsoft.Extensions.Options.ConfigurationExtensions >= 1.1.0 but received 1.0.0
2016-11-22T16:50:03.58-0500 [APP/0] OUT Compilation succeeded.
2016-11-22T16:50:03.58-0500 [APP/0] OUT 5 Warning(s)
2016-11-22T16:50:03.58-0500 [APP/0] OUT 0 Error(s)
2016-11-22T16:50:03.58-0500 [APP/0] OUT Time elapsed 00:00:11.6867977
2016-11-22T16:50:05.52-0500 [APP/0] OUT (The compilation time can be improved. Run "dotnet build --build-profile" for more information)
2016-11-22T16:50:06.00-0500 [APP/0] ERR Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'Microsoft.Extensions.Configuration.EnvironmentVariables, Version=1.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
2016-11-22T16:50:06.00-0500 [APP/0] ERR at Steeltoe.Extensions.Configuration.CloudFoundry.CloudFoundryConfigurationProvider.Load()
2016-11-22T16:50:06.00-0500 [APP/0] ERR at Microsoft.Extensions.Configuration.ConfigurationRoot..ctor(IList`1 providers)
2016-11-22T16:50:06.00-0500 [APP/0] ERR at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build()
2016-11-22T16:50:06.00-0500 [APP/0] ERR at Pivotal.Extensions.Configuration.ConfigServer.ConfigServerConfigurationProvider.Build(IConfigurationBuilder builder)
2016-11-22T16:50:06.00-0500 [APP/0] ERR at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build()
2016-11-22T16:50:06.00-0500 [APP/0] ERR at Steeltoe_PCF_Example.Startup..ctor(IHostingEnvironment env)
2016-11-22T16:50:06.00-0500 [APP/0] ERR --- End of stack trace from previous location where exception was thrown ---
2016-11-22T16:50:06.00-0500 [APP/0] ERR at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2016-11-22T16:50:06.00-0500 [APP/0] ERR at Microsoft.Extensions.Internal.ActivatorUtilities.ConstructorMatcher.CreateInstance(IServiceProvider provider)
2016-11-22T16:50:06.01-0500 [APP/0] ERR at Microsoft.AspNetCore.Hosting.Internal.StartupLoader.LoadMethods(IServiceProvider services, Type startupType, String environmentName)
2016-11-22T16:50:06.01-0500 [APP/0] ERR at Microsoft.AspNetCore.Hosting.WebHostBuilderExtensions.<>c__DisplayClass1_0.<UseStartup>b__1(IServiceProvider sp)
2016-11-22T16:50:06.01-0500 [APP/0] ERR at Microsoft.Extensions.DependencyInjection.ServiceProvider.ScopedCallSite.Invoke(ServiceProvider provider)
2016-11-22T16:50:06.01-0500 [APP/0] ERR at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
2016-11-22T16:50:06.01-0500 [APP/0] ERR at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
2016-11-22T16:50:06.01-0500 [APP/0] ERR at Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureStartup()
2016-11-22T16:50:06.01-0500 [APP/0] ERR at Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureApplicationServices()
2016-11-22T16:50:06.01-0500 [APP/0] ERR at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()
2016-11-22T16:50:06.01-0500 [APP/0] ERR at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()
2016-11-22T16:50:06.01-0500 [APP/0] ERR at Steeltoe_PCF_Example.Program.Main(String[] args)
2016-11-22T16:50:06.14-0500 [APP/0] OUT Exit status 134
dotnet build also failed building with following output:
Project Steeltoe PCF Example (.NETCoreApp,Version=v1.0) will be compiled because project is not safe for incremental compilation. Use --build-profile flag for more information.
Compiling Steeltoe PCF Example for .NETCoreApp,Version=v1.0
The specified framework 'Microsoft.NETCore.App', version '1.0.0' was not found.
- Check application dependencies and target a framework version installed at:
/usr/local/share/dotnet/shared/Microsoft.NETCore.App
- The following versions are installed:
1.1.0
- Alternatively, install the framework version '1.0.0'.
/usr/local/share/dotnet/dotnet compile-csc @/Users/sengs/Box Sync/Work/Code/SteeltoeOSS/src/Steeltoe PCF Example/obj/Debug/netcoreapp1.0/dotnet-compile.rsp returned Exit Code 1
/Users/sengs/Box Sync/Work/Code/SteeltoeOSS/src/Steeltoe PCF Example/project.json(17,70): warning NU1012: Dependency conflict. Steeltoe.Extensions.Configuration.CloudFoundry 1.0.0-dev-00057 expected Microsoft.Extensions.Configuration.EnvironmentVariables >= 1.1.0 but received 1.0.0
/Users/sengs/Box Sync/Work/Code/SteeltoeOSS/src/Steeltoe PCF Example/project.json(18,54): warning NU1012: Dependency conflict. Steeltoe.Extensions.Configuration.CloudFoundry 1.0.0-dev-00057 expected Microsoft.Extensions.Configuration.Json >= 1.1.0 but received 1.0.0
/Users/sengs/Box Sync/Work/Code/SteeltoeOSS/src/Steeltoe PCF Example/project.json(23,67): warning NU1012: Dependency conflict. Pivotal.Extensions.Configuration.ConfigServer 1.0.0-dev-00031 expected Microsoft.Extensions.Options.ConfigurationExtensions >= 1.1.0 but received 1.0.0
/Users/sengs/Box Sync/Work/Code/SteeltoeOSS/src/Steeltoe PCF Example/project.json(23,67): warning NU1012: Dependency conflict. Steeltoe.Extensions.Configuration.CloudFoundry 1.0.0-dev-00057 expected Microsoft.Extensions.Options.ConfigurationExtensions >= 1.1.0 but received 1.0.0
/Users/sengs/Box Sync/Work/Code/SteeltoeOSS/src/Steeltoe PCF Example/project.json(23,67): warning NU1012: Dependency conflict. Steeltoe.Extensions.Configuration.ConfigServer 1.0.0-dev-00057 expected Microsoft.Extensions.Options.ConfigurationExtensions >= 1.1.0 but received 1.0.0
/Users/sengs/Box Sync/Work/Code/SteeltoeOSS/src/Steeltoe PCF Example/error CS2001: Source file '/Users/sengs/Box Sync/Work/Code/SteeltoeOSS/src/Steeltoe PCF Example/Example.deps.json' could not be found.
/Users/sengs/Box Sync/Work/Code/SteeltoeOSS/src/Steeltoe PCF Example/error CS2001: Source file '/Users/sengs/Box Sync/Work/Code/SteeltoeOSS/src/Steeltoe PCF Example/PCF' could not be found.
Compilation failed.
5 Warning(s)
2 Error(s)
This stems from a new dotnet core app being updated, but still utilzing the old Yeoman templates.
How do I revert back to using dotnet core app 1.0.0 ? Or should the instructions be updated?
Thanks.