Unhelpful error message when runtime store is not installed
When running a published aspnetcore app that has its output trimmed by the manifests contained in Microsoft.AspNetCore.All metapackage on a machine without the runtime store installed, the following error message is produced:
Error:
An assembly specified in the application dependencies manifest (*****.Web.deps.json) was not found:
package: 'Microsoft.ApplicationInsights.AspNetCore', version: '2.1.1'
path: 'lib/netstandard1.6/Microsoft.ApplicationInsights.AspNetCore.dll'
This assembly was expected to be in the local runtime store as the application was published using the following target manifest files:
aspnetcore-store-2.0.0-linux-x64.xml;aspnetcore-store-2.0.0-osx-x64.xml;aspnetcore-store-2.0.0-win7-x64.xml;aspnetcore-store-2.0.0-win7-x86.xml
This is misleading because it mentions ApplicationInsights which is irrelevant to the actual problem and because it does not indicate what steps to take to install the runtime store.
cc @Petermarcu
@steveharter we should figure out if we have something other than the runtime store in 2.1 or if fixing this is the right tactical approach.
I vote for a brief error message, i.e.:
Error: the ASP.NET Core 2.0.0 runtime package store is missing.
How to fix this: http://...
The human mind is put off by long, jargon-laden error messages.
In an ideal world it would be nice to see this if an SDK is present to provide the tooling (maybe the 2.1 timeframe):
Error: the ASP.NET Core 2.0.0 runtime package store is missing
We checked your machine and found these incompatible stores: 2.0.0-preview1 and 2.0.0-preview2.
To install the missing store, run this command:
`dotnet store install aspnetcore-2.0.0`
And only print out "Error Details" if a verbose flag is passed.
Agreed on needing a shorter message. We can definitely consider fixing it for 2.0.X.
I think we just need a short friendly name and probably a URL to point people to to replace that list of xml files.
This message has already gone through at least one earlier iteration. See https://github.com/dotnet/core-setup/issues/2523.
@JunTaoLuo can you please provide repro steps including the manifest so we all have the appropriate context regarding the manifest(s) used. Since the host does not have any direct knowledge of asp.net, all strings in the error must come from the manifest(s)\deps file.
We could add a URL (fwlink) to the error; is there an appropriate link today? I see https://docs.microsoft.com/en-us/dotnet/core/deploying/runtime-store but that is farily general.
I think the friendly name as well as the url need to come from the deps file.
Closing this as asp.net is no longer using the store starting with 2.1. Instead it is using the multi-level shared framework support and will exist, for example, at C:\Program Files\dotnet\Microsoft.AspNetCore.App and C:\Program Files\dotnet\Microsoft.AspNetCore.All.
When a framework is missing, or a compatible version is not installed, the current error message looks something like this:
The specified framework 'Microsoft.AspNetCore.All', version '2.1.1-preview1-28124' was not found.
- Check application dependencies and target a framework version installed at:
C:\Program Files\dotnet\
- Installing .NET Core prerequisites might help resolve this problem:
http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
- The .NET Core framework and SDK can be installed from:
https://aka.ms/dotnet-download
- The following versions are installed:
1.0.1 at [C:\Program Files\dotnet\shared]
2.1.0-preview1-28124 at [C:\Program Files\dotnet\shared]
I'm finding these at C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App and C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All.
and getting the error during attempting to run tests:
[6/19/2018 5:48:54 PM Informational] ------ Run test started ------ [6/19/2018 5:49:04 PM Informational] ========== Run test finished: 255 run (0:00:10.1299802) ========== [6/19/2018 5:49:10 PM Informational] ------ Run test started ------ [6/19/2018 5:50:10 PM Error] Microsoft.VisualStudio.TestPlatform.ObjectModel.TestPlatformException: Testhost process exited with error: It was not possible to find any compatible framework version The specified framework 'Microsoft.AspNetCore.App', version '2.1.1' was not found.
- Check application dependencies and target a framework version installed at: C:\Program Files\dotnet\
- Installing .NET Core prerequisites might help resolve this problem: http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
- The .NET Core framework and SDK can be installed from: https://aka.ms/dotnet-download
- The following versions are installed: 2.1.0 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.SetupChannel(IEnumerable`1 sources) at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyExecutionManager.StartTestRun(TestRunCriteria testRunCriteria, ITestRunEventsHandler eventHandler) [6/19/2018 5:50:10 PM Error] Microsoft.VisualStudio.TestPlatform.ObjectModel.TestPlatformException: Testhost process exited with error: It was not possible to find any compatible framework version The specified framework 'Microsoft.AspNetCore.App', version '2.1.1' was not found.
- Check application dependencies and target a framework version installed at: C:\Program Files\dotnet\
- Installing .NET Core prerequisites might help resolve this problem: http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
- The .NET Core framework and SDK can be installed from: https://aka.ms/dotnet-download
- The following versions are installed: 2.1.0 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.SetupChannel(IEnumerable`1 sources) at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyExecutionManager.StartTestRun(TestRunCriteria testRunCriteria, ITestRunEventsHandler eventHandler) [6/19/2018 5:50:10 PM Informational] ========== Run test finished: 0 run (0:01:00.3218846) ========== [6/19/2018 5:52:46 PM Informational] ------ Run test started ------ [6/19/2018 5:53:47 PM Error] Microsoft.VisualStudio.TestPlatform.ObjectModel.TestPlatformException: Testhost process exited with error: It was not possible to find any compatible framework version The specified framework 'Microsoft.AspNetCore.App', version '2.1.1' was not found.
- Check application dependencies and target a framework version installed at: C:\Program Files\dotnet\
- Installing .NET Core prerequisites might help resolve this problem: http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
- The .NET Core framework and SDK can be installed from: https://aka.ms/dotnet-download
- The following versions are installed: 2.1.0 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.SetupChannel(IEnumerable`1 sources) at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyExecutionManager.StartTestRun(TestRunCriteria testRunCriteria, ITestRunEventsHandler eventHandler) [6/19/2018 5:53:47 PM Error] Microsoft.VisualStudio.TestPlatform.ObjectModel.TestPlatformException: Testhost process exited with error: It was not possible to find any compatible framework version The specified framework 'Microsoft.AspNetCore.App', version '2.1.1' was not found.
- Check application dependencies and target a framework version installed at: C:\Program Files\dotnet\
- Installing .NET Core prerequisites might help resolve this problem: http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
- The .NET Core framework and SDK can be installed from: https://aka.ms/dotnet-download
- The following versions are installed: 2.1.0 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.SetupChannel(IEnumerable`1 sources) at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyExecutionManager.StartTestRun(TestRunCriteria testRunCriteria, ITestRunEventsHandler eventHandler) [6/19/2018 5:53:47 PM Informational] ========== Run test finished: 0 run (0:01:00.2744298) ========== [6/19/2018 5:57:07 PM Informational] ------ Run test started ------ [6/19/2018 5:58:07 PM Error] Microsoft.VisualStudio.TestPlatform.ObjectModel.TestPlatformException: Testhost process exited with error: It was not possible to find any compatible framework version The specified framework 'Microsoft.AspNetCore.App', version '2.1.1' was not found.
- Check application dependencies and target a framework version installed at: C:\Program Files\dotnet\
- Installing .NET Core prerequisites might help resolve this problem: http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
- The .NET Core framework and SDK can be installed from: https://aka.ms/dotnet-download
- The following versions are installed: 2.1.0 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.SetupChannel(IEnumerable`1 sources) at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyExecutionManager.StartTestRun(TestRunCriteria testRunCriteria, ITestRunEventsHandler eventHandler) [6/19/2018 5:58:07 PM Error] Microsoft.VisualStudio.TestPlatform.ObjectModel.TestPlatformException: Testhost process exited with error: It was not possible to find any compatible framework version The specified framework 'Microsoft.AspNetCore.App', version '2.1.1' was not found.
- Check application dependencies and target a framework version installed at: C:\Program Files\dotnet\
- Installing .NET Core prerequisites might help resolve this problem: http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
- The .NET Core framework and SDK can be installed from: https://aka.ms/dotnet-download
- The following versions are installed: 2.1.0 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.SetupChannel(IEnumerable`1 sources) at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyExecutionManager.StartTestRun(TestRunCriteria testRunCriteria, ITestRunEventsHandler eventHandler) [6/19/2018 5:58:07 PM Informational] ========== Run test finished: 0 run (0:01:00.280891) ========== [6/20/2018 8:09:22 AM Informational] ------ Run test started ------ [6/20/2018 8:10:22 AM Error] Microsoft.VisualStudio.TestPlatform.ObjectModel.TestPlatformException: Testhost process exited with error: It was not possible to find any compatible framework version The specified framework 'Microsoft.AspNetCore.App', version '2.1.1' was not found.
- Check application dependencies and target a framework version installed at: C:\Program Files\dotnet\
- Installing .NET Core prerequisites might help resolve this problem: http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
- The .NET Core framework and SDK can be installed from: https://aka.ms/dotnet-download
- The following versions are installed: 2.1.0 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.SetupChannel(IEnumerable`1 sources) at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyExecutionManager.StartTestRun(TestRunCriteria testRunCriteria, ITestRunEventsHandler eventHandler) [6/20/2018 8:10:22 AM Error] Microsoft.VisualStudio.TestPlatform.ObjectModel.TestPlatformException: Testhost process exited with error: It was not possible to find any compatible framework version The specified framework 'Microsoft.AspNetCore.App', version '2.1.1' was not found.
- Check application dependencies and target a framework version installed at: C:\Program Files\dotnet\
- Installing .NET Core prerequisites might help resolve this problem: http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
- The .NET Core framework and SDK can be installed from: https://aka.ms/dotnet-download
- The following versions are installed: 2.1.0 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.SetupChannel(IEnumerable`1 sources) at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyExecutionManager.StartTestRun(TestRunCriteria testRunCriteria, ITestRunEventsHandler eventHandler) [6/20/2018 8:10:22 AM Informational] ========== Run test finished: 0 run (0:01:00.2055377) ========== [6/20/2018 8:18:43 AM Informational] ------ Run test started ------ [6/20/2018 8:19:43 AM Error] Microsoft.VisualStudio.TestPlatform.ObjectModel.TestPlatformException: Testhost process exited with error: It was not possible to find any compatible framework version The specified framework 'Microsoft.AspNetCore.App', version '2.1.1' was not found.
- Check application dependencies and target a framework version installed at: C:\Program Files\dotnet\
- Installing .NET Core prerequisites might help resolve this problem: http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
- The .NET Core framework and SDK can be installed from: https://aka.ms/dotnet-download
- The following versions are installed: 2.1.0 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.SetupChannel(IEnumerable`1 sources) at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyExecutionManager.StartTestRun(TestRunCriteria testRunCriteria, ITestRunEventsHandler eventHandler) [6/20/2018 8:19:43 AM Error] Microsoft.VisualStudio.TestPlatform.ObjectModel.TestPlatformException: Testhost process exited with error: It was not possible to find any compatible framework version The specified framework 'Microsoft.AspNetCore.App', version '2.1.1' was not found.
- Check application dependencies and target a framework version installed at: C:\Program Files\dotnet\
- Installing .NET Core prerequisites might help resolve this problem: http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
- The .NET Core framework and SDK can be installed from: https://aka.ms/dotnet-download
- The following versions are installed: 2.1.0 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.SetupChannel(IEnumerable`1 sources) at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyExecutionManager.StartTestRun(TestRunCriteria testRunCriteria, ITestRunEventsHandler eventHandler) [6/20/2018 8:19:43 AM Informational] ========== Run test finished: 0 run (0:01:00.1682677) ==========
@ewmccarty the tests you are running are referencing 2.1.1 and you only have 2.1.0 installed, thus the error.
However, normally a framework reference specified 0 for the "patch" version (e.g. 2.1.0) since the latest patch version installed locally is always used (via "roll-forward"). A framework reference should only include a non-zero patch version if it requires that patch version (or newer).
It looks like 2.1.1 was just released (https://www.nuget.org/packages/Microsoft.AspNetCore.All)
cc @natemcmaster @rowanmiller