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

ExpressiveAnnotations core assembly not added project files #1466

Closed
jschroed opened this issue Feb 9, 2016 · 10 comments
Closed

ExpressiveAnnotations core assembly not added project files #1466

jschroed opened this issue Feb 9, 2016 · 10 comments
Labels

Comments

@jschroed
Copy link

jschroed commented Feb 9, 2016

I started having an issue adding ExpressiveAnnotations core assembly to my projects. It looks like the problem started in version 2.44.5. (Version 2.44.4 works fine.)

I have "nuget ExpressiveAnnotations.dll = 2.3.6" in my paket.dependencies file and "ExpressiveAnnotations.dll" in my paket.references. My paket.dependencies has this at the top:

content: none
import_targets: false
framework: net45
redirects: off

When I run paket update or install with version 2.44.4 of paket, ExpressiveAnnotations is added to my csproj like this:

  <Choose>
    <When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And $(TargetFrameworkVersion) == 'v4.5'">
      <ItemGroup>
        <Reference Include="ExpressiveAnnotations">
          <HintPath>..\packages\ExpressiveAnnotations.dll\lib\net45\ExpressiveAnnotations.dll</HintPath>
          <Private>True</Private>
          <Paket>True</Paket>
        </Reference>
      </ItemGroup>
    </When>
  </Choose>

Version 2.44.5 and higher do not add "ExpressiveAnnotations" to my csproj file. (Note: I haven't tried all versions and I haven't tried any of the 3.0.0 versions.) Is there something I need to change in my configuration or is this an issue with paket?

@forki
Copy link
Member

forki commented Feb 9, 2016

The issue is a bit tricky. First of all: there is no ExpressiveAnnotations.dll = 2.3.6 - see https://www.nuget.org/packages/ExpressiveAnnotations

But I assum somehow you have that version in your local nuget cache. In Paket 2.44.4 we noticed a bug changed our cache format so that 2.44.5 and above will not read older cache files and try to get everything from scratch. And since the package version is deleted (@maartenba ist that correct?) paket restore fails.

@maartenba
Copy link

I don't see a 2.3.6. It wasn't deleted, it wasn't uploaded.

@forki
Copy link
Member

forki commented Feb 9, 2016

Thx Maarten.

So where was it coming from?
On Feb 9, 2016 09:22, "Maarten Balliauw" [email protected] wrote:

I don't see a 2.3.6. It wasn't deleted, it wasn't uploaded.


Reply to this email directly or view it on GitHub
#1466 (comment).

@inosik
Copy link
Contributor

inosik commented Feb 9, 2016

I tried this, and it seems that the refactorings from d267615 broke some string stuff. The .dll in the package name breaks the install, because the new String.endsWithIgnoreCase function is faulty.

@inosik
Copy link
Contributor

inosik commented Feb 9, 2016

From fsi:

let endsWithIgnoreCase (target : string) (text : string) =
  text.IndexOf (target, System.StringComparison.OrdinalIgnoreCase) >= text.Length - target.Length

> endsWithIgnoreCase ".dll" "packages/ExpressiveAnnotations.dll/lib/net45/ExpressiveAnnotations.dll";;
val it : bool = false
> endsWithIgnoreCase ".dll" "packages/ExpressiveAnnotations.dll/lib/net45/ExpressiveAnnotations.xml";;
val it : bool = false
> endsWithIgnoreCase ".dll" "packages/ExpressiveAnnotations/lib/net45/ExpressiveAnnotations.xml";;
val it : bool = false
> endsWithIgnoreCase ".dll" "packages/ExpressiveAnnotations/lib/net45/ExpressiveAnnotations.dll";;
val it : bool = true

@forki
Copy link
Member

forki commented Feb 9, 2016

So there are two packages? One with .dll at the end?

@inosik
Copy link
Contributor

inosik commented Feb 9, 2016

Yes, the one with .dll in its id seems to be a kind of "Core" package.

@inosik
Copy link
Contributor

inosik commented Feb 9, 2016

LastIndexOf instead of IndexOf in this line should do the trick.

@forki
Copy link
Member

forki commented Feb 9, 2016

yes. already deploying fix. thanks everybody.

@forki forki closed this as completed in f2c56a7 Feb 9, 2016
@forki forki added the bug label Feb 9, 2016
@jschroed
Copy link
Author

jschroed commented Feb 9, 2016

Thanks forki (and everyone else)! The issue is resolved for me with version 2.49.8.

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

No branches or pull requests

4 participants