Skip to content
This repository has been archived by the owner on Nov 9, 2018. It is now read-only.

Test host can explode when dependencies change now #149

Closed
davidfowl opened this issue Sep 4, 2015 · 6 comments
Closed

Test host can explode when dependencies change now #149

davidfowl opened this issue Sep 4, 2015 · 6 comments

Comments

@davidfowl
Copy link
Member

------ Discover test started ------
------ Test started: Project: ClassLibrary72 ------
Starting  Microsoft.Dnx.TestHost [C:\Users\davifowl\.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta8-15562\bin\dnx.exe --appbase "C:\Users\davifowl\Documents\Visual Studio 2015\Projects\ClassLibrary72\src\ClassLibrary72" Microsoft.Dnx.ApplicationHost --port 39457 Microsoft.Dnx.TestHost --port 39495]

System.InvalidOperationException: Dependencies in project.json were modified. Please run "dnu restore" to generate a new lock file.
   at Microsoft.Dnx.Runtime.ApplicationHostContext.GetRuntimeLibraries(ApplicationHostContext context, Boolean throwOnInvalidLockFile)
   at Microsoft.Dnx.ApplicationHost.DefaultHost.Initialize(RuntimeOptions options, IServiceProvider hostServices, IAssemblyLoadContextAccessor loadContextAccessor, IFileWatcher fileWatcher)
   at Microsoft.Dnx.ApplicationHost.DefaultHost..ctor(RuntimeOptions options, IServiceProvider hostServices, IAssemblyLoadContextAccessor loadContextAccessor, IFileWatcher fileWatcher)
   at Microsoft.Dnx.ApplicationHost.Program.Main(String[] args)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.Dnx.Runtime.Common.EntryPointExecutor.Execute(Assembly assembly, String[] args, IServiceProvider serviceProvider)
   at Microsoft.Dnx.Host.Bootstrapper.RunAsync(List`1 args, IRuntimeEnvironment env, FrameworkName targetFramework)
   at Microsoft.Dnx.Host.RuntimeBootstrapper.ExecuteAsync(String[] args, FrameworkName targetFramework)
   at Microsoft.Dnx.Host.RuntimeBootstrapper.Execute(String[] args, FrameworkName targetFramework)
Unable to start Microsoft.Dnx.TestHost
========== Discover test finished: 0 found (0:00:01.4336816) ==========

This is because of my changes to the dnx. We might need to hide this from the user but I'll see if it makes sense to throw it in all cases.

@davidfowl
Copy link
Member Author

@vijayrkn @rynowak

@rynowak
Copy link
Member

rynowak commented Sep 4, 2015

Would you see the same thing if you ran dnx test at the commandline?

@Eilon
Copy link
Member

Eilon commented Sep 14, 2015

@davidfowl doesn't the user just have to run dnu restore (from command line or VS)? Is there a bug anywhere?

@davidfowl
Copy link
Member Author

Can close, it's expected

@ShaneCourtrille
Copy link

An ugly exception method is expected? Wouldn't it make a lot more sense to handle this a little more gracefully with just the dnu restore message?

@davidfowl
Copy link
Member Author

We're going to change the handling in dnx

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

No branches or pull requests

4 participants