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

FileNotFoundException when publishing #2267

Closed
sklose opened this issue Jul 15, 2015 · 13 comments
Closed

FileNotFoundException when publishing #2267

sklose opened this issue Jul 15, 2015 · 13 comments
Assignees
Milestone

Comments

@sklose
Copy link

sklose commented Jul 15, 2015

Since a couple of days I am getting a FileNotFoundException when I run 'dnu publish'. It seems to be related to commit cae8aab where the file paths were canonicalized.

info: Exec
info:   program: dnu
info:   commandline: publish /app/src/Scheduler/Andasa.Scheduler -o /app/artifacts/publish/Andasa.Scheduler --no-source
info:   workingdir: /app

Microsoft .NET Development Utility Mono-x64-1.0.0-beta6-12232


Copying to output path /app/artifacts/publish/Andasa.Scheduler

Using Package dependency AWSSDK 2.3.47.0

Adding NuGet package /root/.dnx/packages/AWSSDK/2.3.47/AWSSDK.2.3.47.0.nupkg to /app/artifacts/publish/Andasa.Scheduler/approot/packages

System.IO.FileNotFoundException: Could not find file "/root/.dnx/packages/AWSSDK/2.3.47/AWSSDK.2.3.47.0.nupkg".

File name: '/root/.dnx/packages/AWSSDK/2.3.47/AWSSDK.2.3.47.0.nupkg'

The package acutally exists on disk, but the path is /root/.dnx/packages/AWSSDK/2.3.47/AWSSDK.2.3.47.nupkg (without the .0)

@analogrelay
Copy link
Contributor

Looks related to #2192 (cc @troydai)

We recently did some work to clean up the way we convert version numbers to strings (in order to make them more uniform). Can you try re-running dnu restore on your project to write the packages into the correct paths and see if you can publish after that?

@sklose
Copy link
Author

sklose commented Jul 15, 2015

This actually happens in a clean docker container I use for builds on my CI system. All packages are restored from scratch on each build. Restoring, compiling, running unit tests works fine, just the publish step is failing.

@sklose
Copy link
Author

sklose commented Jul 15, 2015

I might have found the issue:
https://github.com/aspnet/dnx/blob/dev/src/Microsoft.Framework.PackageManager/Publish/PublishPackage.cs line 28 ... there is no call to GetNormalizedVersionString() like in cae8aab

@troydai
Copy link
Contributor

troydai commented Jul 15, 2015

Hi @sklose. You code you point out may cause the issue, I need to take a look. In the meantime, I believe if you clean your packages folder and restore again this issue will go away.

You can use this script to clean all caches: https://github.com/troydai/k.toolkit/blob/master/clean-packages.py

@troydai
Copy link
Contributor

troydai commented Jul 15, 2015

/cc @muratg I think I can fix this in beta6 time frame.

@muratg muratg added this to the 1.0.0-beta6 milestone Jul 15, 2015
@muratg muratg added the bug label Jul 15, 2015
@muratg
Copy link
Contributor

muratg commented Jul 15, 2015

Looks like a regression, @troydai we probably try to fix it.

@adamhathcock
Copy link

I updated to beta6-12234 which fixes the dnu restore issue (#2240) which is similar to this. However, I still seem to have dnu publish problems. Just FYI.

"System.IO.FileNotFoundException: Could not find file 'C:\Users\hathcoa.dnx\packages\Unity\3.5.1404\Unity.3.5.1404.0.nupkg'.

@troydai
Copy link
Contributor

troydai commented Jul 17, 2015

@adamhathcock thanks for letting us know. The fix was checked in recently. Please try a build newer than 12251. Thanks.

@tillig
Copy link

tillig commented Jul 21, 2015

Happens with Moq, too - version 4.2.1502.911 gets an extra 0 added to the last part of the version and it fails to find C:\Users\appveyor\.dnx\packages\Moq\4.2.1502.0911\Moq.4.2.1502.0911.nupkg.sha512 when using DNX 1.0.0-beta5 as released with VS 2015. Would love to know of a workaround.

@troydai
Copy link
Contributor

troydai commented Jul 21, 2015

Hi @tillig It is fixed a newer beta6 DNX build.

@tillig
Copy link

tillig commented Jul 21, 2015

@troydai Yeah, but if I want to ship something that works against beta 5 (shipped with VS) then I'm stuck. Is there a workaround? Or do I just not get to support beta 5?

@muratg
Copy link
Contributor

muratg commented Jul 21, 2015

@tillig The plan is to ship beta 6 by next Monday (see https://github.com/aspnet/home/wiki/roadmap). Unfortunately I don't know a workaround for beta 5. I think your best bet would be to ship against beta 6.

@tillig
Copy link

tillig commented Jul 21, 2015

@muratg OK. I'll hold off until beta 6. Thanks for letting me know - I do appreciate it!

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

7 participants