Skip to content
This repository has been archived by the owner on Dec 18, 2017. It is now read-only.

Appbase passed to dnx cannot have trailing slash if there is no global.json #1488

Closed
ChengTian opened this issue Mar 24, 2015 · 3 comments
Closed
Assignees
Milestone

Comments

@ChengTian
Copy link
Contributor

Repro steps:
(1) git clone Home repo
(2) cd Home/samples/ConsoleApp
(3) dnu restore
(4) dnx . run, works well
(5) dnx ./ run, fails with the following exception:

System.InvalidOperationException: Unable to resolve project 'ConsoleApp' from C:\AspNet\Home\samples\ConsoleApp\
   at Microsoft.Framework.Runtime.ApplicationHostContext..ctor(IServiceProvider serviceProvider, String projectDirectory
, String packagesDirectory, String configuration, FrameworkName targetFramework, ICache cache, ICacheContextAccessor cac
heContextAccessor, INamedCacheDependencyProvider namedCacheDependencyProvider, IAssemblyLoadContextFactory loadContextFa
ctory, Boolean skipLockFileValidation) in C:\AspNet\dnx\src\Microsoft.Framework.Runtime\ApplicationHostContext.cs:line 5
7
   at Microsoft.Framework.Runtime.DefaultHost.Initialize(DefaultHostOptions options, IServiceProvider hostServices) in C
:\AspNet\dnx\src\Microsoft.Framework.Runtime\DefaultHost.cs:line 116
   at Microsoft.Framework.Runtime.DefaultHost..ctor(DefaultHostOptions options, IServiceProvider hostServices) in C:\Asp
Net\dnx\src\Microsoft.Framework.Runtime\DefaultHost.cs:line 37
   at Microsoft.Framework.ApplicationHost.Program.Main(String[] args) in C:\AspNet\dnx\src\Microsoft.Framework.Applicati
onHost\Program.cs:line 42

(6) Add a global.json to root of Home repo with the following contents:

{
  "projects": ["samples"]
}

Then dnx ./ run works.

@davidfowl , looks like a project dependency resolver bug? Need to investigate why there is difference between using . and ./ as appbase.

@ChengTian ChengTian added the bug label Mar 24, 2015
@ChengTian ChengTian added this to the 1.0.0-beta4 milestone Mar 24, 2015
@ChengTian ChengTian changed the title Appbase passed to dnx cannot have trailing slash if there is not global.json Appbase passed to dnx cannot have trailing slash if there is no global.json Mar 24, 2015
@ChengTian
Copy link
Contributor Author

/cc @muratg

@davidfowl
Copy link
Member

Is this a regression?

@ChengTian
Copy link
Contributor Author

Yes, I remember I was able to run klr ./ run in KRE/samples/HelloWorld

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

No branches or pull requests

2 participants