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

Casing behavior between KPM and KRE is different #581

Closed
kirthik opened this issue Aug 26, 2014 · 3 comments
Closed

Casing behavior between KPM and KRE is different #581

kirthik opened this issue Aug 26, 2014 · 3 comments
Assignees
Milestone

Comments

@kirthik
Copy link
Contributor

kirthik commented Aug 26, 2014

Here is my project.json

{
    "dependencies": {
        "Xunit.KRunner": "1.0.0-*",
        "Microsoft.AspNet.Server.IIS": "1.0.0-alpha3",
        "Microsoft.Aspnet.SignalR.Client": "2.1.1"
    },
    "commands": {
        "test": "Xunit.KRunner"
    },
    "frameworks" : {
        "net451" : { }
      }
}

I have MyClass.cs which has a test. It calls HubConnection class from signalr client

      [Fact]
      public void MyTest()
      {
          HubConnection c = new HubConnection("www.bing.com");
      }

When I run k test from command line, I see compilation exception

Microsoft.Framework.Runtime.CompilationException: E:\E2EApps\WebApplication3\WebApplication3\MyClass.cs(14,13): error CS0246: The type or namespace name 'HubConnection' could not be found (are you missing a using directive or an assembly reference?)
E:\E2EApps\WebApplication3\WebApplication3\MyClass.cs(14,35): error CS0246: The type or namespace name 'HubConnection' could not be found (are you missing a using directive or an assembly reference?)

I see the package in .kpm folder

@glennc
Copy link
Member

glennc commented Aug 26, 2014

The problem here is that the n in AspNet is lowercase in the project.json but not in the NuSpec. If you change the package name to Microsoft.AspNet.SignalR.Client in the project.json it will work.

We need to solve this problem with inconsistent casing rules.

I'm going to update the title of this to reflect the problem.

@glennc glennc changed the title net45 assemblies are not added as references when they are included in project.json Casing behavior between KPM and KRE is different Aug 26, 2014
@glennc glennc added this to the Backlog milestone Aug 26, 2014
@glennc glennc added the bug label Aug 26, 2014
@glennc
Copy link
Member

glennc commented Aug 26, 2014

We think that we should be case sensitive, and so in this case restore should've failed.

We should be able to give an error message that tells the user that the case of the package Id is different to what was typed in the project.json and let people fix it. or at least that it could be different and show the two strings.

@davidfowl davidfowl assigned ChengTian and unassigned davidfowl Aug 28, 2014
@davidfowl davidfowl modified the milestones: Backlog, 1.0.0-alpha4 Aug 28, 2014
@desdesdes
Copy link

If names are case sensitive you might run into some .net and mono inconsistencies. System.Configuration.dll is named System.configuration.dll on windows and System.Configuration.dll on mono. So on windows the exact name should be System.configuration, but that would fail on mono. On mono the name should be System.Configuration. I currently use System.Configuration because windows is not case sensitive and mono on *nix is, but that would stop working if you decide to check casing.

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

5 participants