Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

K pack produces error: System.NullReferenceException #6

Closed
tugberkugurlu opened this issue Apr 27, 2014 · 3 comments
Closed

K pack produces error: System.NullReferenceException #6

tugberkugurlu opened this issue Apr 27, 2014 · 3 comments

Comments

@tugberkugurlu
Copy link
Contributor

I completed all the steps as described inside the readme of this project and now discovering other stuff such as Command Line usage. I ran K pack and I can see that it outputs into the bin/output directory but I'm getting the following exception at the end of the command:

System.NullReferenceException: Object reference not set to an instance of an obj
ect.
at Microsoft.Net.Project.Packing.PackRuntime.Emit(PackRoot root)
at Microsoft.Net.Project.Packing.PackRoot.Emit()
at Microsoft.Net.Project.PackManager.Package()
at Microsoft.Net.Project.Program.Main(String[] args)

Here is the console output I got by running K pack > log.txt:

klr.exe Information: 0 : RootHost.Load name=Microsoft.Net.Project
klr.exe Information: 0 : RootHost Assembly.LoadFile(C:\Users\Tugberk.k\packages\ProjectK.0.1-alpha-353\tools\net45\Microsoft.Net.Project.dll)
klr.exe Information: 0 : RootHost.Load name=Microsoft.Net.Runtime
klr.exe Information: 0 : RootHost Assembly.LoadFile(C:\Users\Tugberk.k\packages\ProjectK.0.1-alpha-353\tools\net45\Microsoft.Net.Runtime.dll)
klr.exe Information: 0 : RootHost.Load name=Newtonsoft.Json
klr.exe Information: 0 : RootHost Assembly.LoadFile(C:\Users\Tugberk.k\packages\ProjectK.0.1-alpha-353\tools\net45\Newtonsoft.Json.dll)
klr.exe Information: 0 : Walking dependency graph for 'HelloWebFx .NETFramework,Version=v4.5.1'.
klr.exe Information: 0 : [ProjectReferenceDependencyProvider]: HelloWebFx 0.1-alpha-SNAPSHOT
klr.exe Information: 0 : [NuGetDependencyResolver]: Microsoft.AspNet.Abstractions 0.1-alpha-279, Microsoft.AspNet.Hosting 0.1-alpha-300, Microsoft.AspNet.Server.WebListener 0.1-alpha-245, Microsoft.AspNet.DependencyInjection 0.1-alpha-267, Microsoft.AspNet.RequestContainer 0.1-alpha-300, Microsoft.AspNet.Routing 0.1-alpha-281, Microsoft.ComponentModel.DataAnnotations 4.0.10.0, Microsoft.AspNet.Mvc.ModelBinding 0.1-alpha-699, Microsoft.AspNet.Mvc.Core 0.1-alpha-699, Microsoft.AspNet.Mvc 0.1-alpha-699, Microsoft.AspNet.Mvc.Razor 0.1-alpha-699, Microsoft.AspNet.ConfigurationModel 0.1-alpha-180, Microsoft.AspNet.Diagnostics 0.1-alpha-192, Microsoft.AspNet.FeatureModel 0.1-alpha-279, Microsoft.AspNet.PipelineCore 0.1-alpha-279, Microsoft.AspNet.Security.DataProtection 0.1-alpha-144, Microsoft.Net.Runtime.Interfaces 0.1-alpha-325, Microsoft.AspNet.HttpFeature 0.1-alpha-279, Microsoft.AspNet.Logging 0.1-alpha-159, Common 1.0.0, Newtonsoft.Json 5.0.8, Microsoft.AspNet.FileSystems 0.1-alpha-152, Microsoft.AspNet.Mvc.Razor.Host 0.1-alpha-699, Microsoft.AspNet.Razor 0.1-alpha-181, Microsoft.Bcl.Immutable 1.1.18-beta-097, Microsoft.CodeAnalysis.Common 0.7-beta-097, Microsoft.CodeAnalysis.CSharp 0.7-beta-097, System.Reflection.Metadata.Ecma335 0.7-beta-097
klr.exe Information: 0 : RootHost.Load name=Microsoft.Net.Runtime.resources
klr.exe Information: 0 : RootHost.Load name=Microsoft.Net.Runtime.resources
klr.exe Information: 0 : RootHost.Load name=Microsoft.Net.Runtime.resources
klr.exe Information: 0 : RootHost.Load name=Microsoft.Net.Runtime.resources
klr.exe Information: 0 : [ReferenceAssemblyDependencyResolver]: System.ComponentModel.DataAnnotations 4.0.0.0, mscorlib 4.0.0.0, System 4.0.0.0, System.Core 4.0.0.0, Microsoft.CSharp 4.0.0.0
klr.exe Information: 0 : Resolved dependencies for HelloWebFx in 1927ms
Copying to output path D:\Apps\nda\Preview\samples\HelloWebFx\bin\output
Packing nupkg dependency Microsoft.AspNet.Abstractions 0.1-alpha-279
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.AspNet.Abstractions.0.1-alpha-279 already exists.
Packing nupkg dependency Microsoft.AspNet.Hosting 0.1-alpha-300
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.AspNet.Hosting.0.1-alpha-300 already exists.
Packing nupkg dependency Microsoft.AspNet.Server.WebListener 0.1-alpha-245
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.AspNet.Server.WebListener.0.1-alpha-245 already exists.
Packing nupkg dependency Microsoft.AspNet.DependencyInjection 0.1-alpha-267
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.AspNet.DependencyInjection.0.1-alpha-267 already exists.
Packing nupkg dependency Microsoft.AspNet.RequestContainer 0.1-alpha-300
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.AspNet.RequestContainer.0.1-alpha-300 already exists.
Packing nupkg dependency Microsoft.AspNet.Routing 0.1-alpha-281
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.AspNet.Routing.0.1-alpha-281 already exists.
Packing nupkg dependency Microsoft.ComponentModel.DataAnnotations 4.0.10.0
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.ComponentModel.DataAnnotations.4.0.10.0 already exists.
Packing nupkg dependency Microsoft.AspNet.Mvc.ModelBinding 0.1-alpha-699
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.AspNet.Mvc.ModelBinding.0.1-alpha-699 already exists.
Packing nupkg dependency Microsoft.AspNet.Mvc.Core 0.1-alpha-699
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.AspNet.Mvc.Core.0.1-alpha-699 already exists.
Packing nupkg dependency Microsoft.AspNet.Mvc 0.1-alpha-699
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.AspNet.Mvc.0.1-alpha-699 already exists.
Packing nupkg dependency Microsoft.AspNet.Mvc.Razor 0.1-alpha-699
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.AspNet.Mvc.Razor.0.1-alpha-699 already exists.
Packing nupkg dependency Microsoft.AspNet.ConfigurationModel 0.1-alpha-180
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.AspNet.ConfigurationModel.0.1-alpha-180 already exists.
Packing nupkg dependency Microsoft.AspNet.Diagnostics 0.1-alpha-192
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.AspNet.Diagnostics.0.1-alpha-192 already exists.
Packing nupkg dependency Microsoft.AspNet.FeatureModel 0.1-alpha-279
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.AspNet.FeatureModel.0.1-alpha-279 already exists.
Packing nupkg dependency Microsoft.AspNet.PipelineCore 0.1-alpha-279
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.AspNet.PipelineCore.0.1-alpha-279 already exists.
Packing nupkg dependency Microsoft.AspNet.Security.DataProtection 0.1-alpha-144
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.AspNet.Security.DataProtection.0.1-alpha-144 already exists.
Packing nupkg dependency Microsoft.Net.Runtime.Interfaces 0.1-alpha-325
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.Net.Runtime.Interfaces.0.1-alpha-325 already exists.
Packing nupkg dependency Microsoft.AspNet.HttpFeature 0.1-alpha-279
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.AspNet.HttpFeature.0.1-alpha-279 already exists.
Packing nupkg dependency Microsoft.AspNet.Logging 0.1-alpha-159
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.AspNet.Logging.0.1-alpha-159 already exists.
Packing nupkg dependency Common 1.0.0
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Common.1.0.0 already exists.
Packing nupkg dependency Newtonsoft.Json 5.0.8
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Newtonsoft.Json.5.0.8 already exists.
Packing nupkg dependency Microsoft.AspNet.FileSystems 0.1-alpha-152
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.AspNet.FileSystems.0.1-alpha-152 already exists.
Packing nupkg dependency Microsoft.AspNet.Mvc.Razor.Host 0.1-alpha-699
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.AspNet.Mvc.Razor.Host.0.1-alpha-699 already exists.
Packing nupkg dependency Microsoft.AspNet.Razor 0.1-alpha-181
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.AspNet.Razor.0.1-alpha-181 already exists.
Packing nupkg dependency Microsoft.Bcl.Immutable 1.1.18-beta-097
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.Bcl.Immutable.1.1.18-beta-097 already exists.
Packing nupkg dependency Microsoft.CodeAnalysis.Common 0.7-beta-097
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.CodeAnalysis.Common.0.7-beta-097 already exists.
Packing nupkg dependency Microsoft.CodeAnalysis.CSharp 0.7-beta-097
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.CodeAnalysis.CSharp.0.7-beta-097 already exists.
Packing nupkg dependency System.Reflection.Metadata.Ecma335 0.7-beta-097
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\System.Reflection.Metadata.Ecma335.0.7-beta-097 already exists.
Packing project dependency HelloWebFx
Source D:\Apps\nda\Preview\samples\HelloWebFx
Target D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\HelloWebFx
Loaded Module: klr.net45.dll

Found DLL Export: CallApplicationMain

@Eilon
Copy link
Member

Eilon commented Apr 28, 2014

@lodejard any idea what's going on here?

@glennc
Copy link
Contributor

glennc commented Apr 28, 2014

There is a bug in k pack in that it assumes there is a kruntime package in the packages folder and throws if it isn't there.

To work around this for now you can copy and paste the kruntime package from %USERPROFILE%.k\packages to the packages folder for the app.

@glennc
Copy link
Contributor

glennc commented May 13, 2014

This should be resolved with the new KPM pack

@glennc glennc closed this as completed May 13, 2014
ryanbrandenburg pushed a commit that referenced this issue Nov 21, 2018
ASP.NET vNext -> ASP.NET 5
natemcmaster pushed a commit that referenced this issue Nov 30, 2018
- Added tool to generate a set of known culture names from the OS/Fx
- CultureInfoCache is now limited to only caching/returning cultures from the known list
- #6
ryanbrandenburg added a commit that referenced this issue Jul 8, 2019
merge

Co-authored-by: Brennan <brecon@microsoft.com>
Co-authored-by: dotnet bot <dotnet-bot@microsoft.com>
Co-authored-by: Nate McMaster <natemcmaster@users.noreply.github.com>
Co-authored-by: dotnet-maestro <@dotnet-maestro>
Co-authored-by: Matt Mitchell <mmitche@microsoft.com>
Co-authored-by: Pranav K <prkrishn@hotmail.com>
Co-authored-by: John Luo <johluo@microsoft.com>
Co-authored-by: null <shawn@saluce.com>
Co-authored-by: Mikael Mengistu <mikaelm12@users.noreply.github.com>
Co-authored-by: Ryan Brandenburg <rybrande@microsoft.com>
Co-authored-by: David Fowler <davidfowl@gmail.com>
Co-authored-by: null <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Jacques Eloff <joeloff@users.noreply.github.com>
Co-authored-by: Arthur Vickers <ajcvickers@hotmail.com>
Co-authored-by: Steve Sanderson <SteveSandersonMS@users.noreply.github.com>
Co-authored-by: Justin Kotalik <jukotali@microsoft.com>
Co-authored-by: Cory Nelson <phrosty@gmail.com>
Co-authored-by: null <dotnet-maestro-bot@microsoft.com>
Co-authored-by: Stephen Halter <halter73@gmail.com>
Co-authored-by: Andrew Stanton-Nurse <andrew@stanton-nurse.com>
Co-authored-by: null <distinctiveangle@outlook.com>
Co-authored-by: Kahbazi <A.Kahbazi@gmail.com>
Co-authored-by: Javier Calvarro Nelson <jacalvar@microsoft.com>
Co-authored-by: Daniel Roth <daroth@microsoft.com>
Co-authored-by: Chris Ross <Tratcher@Outlook.com>
Co-authored-by: Ben Adams <thundercat@illyriad.co.uk>
Co-authored-by: Artak <34246760+mkArtakMSFT@users.noreply.github.com>
@ghost ghost locked as resolved and limited conversation to collaborators Dec 4, 2019
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

3 participants