aspnetcore icon indicating copy to clipboard operation
aspnetcore copied to clipboard

kpm build command: global.json

Open kscott5 opened this issue 11 years ago • 2 comments

Is it possible to run kpm build command using the global.json. If so, what is the correct format for the global.json file and command to execute.

THIS DOESN"T WORK

PS C:\apps\pcsc\GreenShelter> kpm build global.json --out bin
System.ArgumentException: The path is not of a legal form.
   at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
   at System.IO.Path.GetFullPathInternal(String path)
   at System.IO.Path.GetFullPath(String path)
   at Microsoft.Framework.PackageManager.BuildManager.Normalize(String projectDir)
   at Microsoft.Framework.PackageManager.BuildManager..ctor(IServiceProvider hostServices, BuildOptions buildOptions)
   at Microsoft.Framework.PackageManager.Program.<>c__DisplayClass3_4.<Main>b__8()
   at Microsoft.Framework.Runtime.Common.CommandLine.CommandLineApplication.Execute(String[] args)
   at Microsoft.Framework.PackageManager.Program.Main(String[] args)
PS C:\apps\pcsc\GreenShelter>

global.json in my repository

{
    "sources": ["%project:Directory%/src/Mvc", "%project.Directory%/test/Mvc"]  
}

Also tried with global.json like this

{
    "projects": [ "%project:Directory/src/Mvc/project.json", "%project:Directory%/test/Mvc/project.json"],
    "sources": ["%project:Directory%/src/Mvc", "%project:Directory%/test/Mvc"]
}

I reviewed Issue #243 and it links to the [scheme store for global.jsonl | http//json.schemastore.org/global] but looking at aspnet/MVC global.json there's a disconnect.

kscott5 avatar Feb 25 '15 17:02 kscott5

Currenty .NET Core 1.0.1 restoring as expected on global.json

kscott5 avatar Sep 26 '16 21:09 kscott5

Awesome and congrats! 😄

MaximRouiller avatar Sep 27 '16 12:09 MaximRouiller