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

Publishing with --no-source doesn't find the nupkg #2471

Closed
Tragetaschen opened this issue Aug 13, 2015 · 10 comments
Closed

Publishing with --no-source doesn't find the nupkg #2471

Tragetaschen opened this issue Aug 13, 2015 · 10 comments

Comments

@Tragetaschen
Copy link

I have read #2267 and got the impression this shouldn't happen with beta6.
I have cloned the dnx repository any try to build the HelloWorld sample from the 1.0.0-beta6 tag.
There is a HelloWorld.0.1-beta.nupkg available.

$ dnvm list

Active Version              Runtime Arch Location             Alias
------ -------              ------- ---- --------             -----
  *    1.0.0-beta6          mono         ~/.dnx/runtimes      default
       1.0.0-beta5          mono         ~/.dnx/runtimes

$ dnu --version
Microsoft .NET Development Utility
 Version:      1.0.0-beta6-12256
 Type:         Mono
 Architecture: x64
 OS Name:      Linux

$ pwd
/home/kai/yocto/dnx/samples/HelloWorld
$ dnu restore --quiet
Microsoft .NET Development Utility Mono-x64-1.0.0-beta6-12256

Restoring packages for /home/kai/yocto/dnx/samples/HelloWorld/project.json
Following lock file /home/kai/yocto/dnx/samples/HelloWorld/project.lock.json
Restore complete, 94ms elapsed
$ dnu publish -o ../something --no-source --quiet
Microsoft .NET Development Utility Mono-x64-1.0.0-beta6-12256

Copying to output path /home/kai/yocto/dnx/samples/kai
System.IO.FileNotFoundException: Could not find file "/home/kai/yocto/dnx/samples/HelloWorld/bin/Debug/HelloWorld.0.1.0-beta.nupkg".
File name: '/home/kai/yocto/dnx/samples/HelloWorld/bin/Debug/HelloWorld.0.1.0-beta.nupkg'
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
  at System.IO.File.OpenRead (System.String path) [0x00000] in <filename unknown>:0
  at Microsoft.Framework.PackageManager.NuGetPackageUtils.CreateLibraryFromNupkg (System.String nupkgPath) [0x00000] in <filename unknown>:0
  at Microsoft.Framework.PackageManager.Packages.AddCommand+<Execute>d__1.MoveNext () [0x00000] in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00000] in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00000] in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00000] in <filename unknown>:0
  at System.Runtime.CompilerServices.TaskAwaiter`1[System.Boolean].GetResult () [0x00000] in <filename unknown>:0
  at Microsoft.Framework.PackageManager.Publish.PublishProject.EmitNupkg (Microsoft.Framework.PackageManager.Publish.PublishRoot root) [0x00000] in <filename unknown>:0
  at Microsoft.Framework.PackageManager.Publish.PublishProject.Emit (Microsoft.Framework.PackageManager.Publish.PublishRoot root) [0x00000] in <filename unknown>:0
  at Microsoft.Framework.PackageManager.Publish.PublishRoot.Emit () [0x00000] in <filename unknown>:0
  at Microsoft.Framework.PackageManager.Publish.PublishManager.Publish () [0x00000] in <filename unknown>:0
  at Microsoft.Framework.PackageManager.PublishConsoleCommand+<>c__DisplayClass0_0.<Register>b__1 () [0x00000] in <filename unknown>:0
  at Microsoft.Framework.Runtime.Common.CommandLine.CommandLineApplication.Execute (System.String[] args) [0x00000] in <filename unknown>:0
  at Microsoft.Framework.PackageManager.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
  at Microsoft.Framework.Runtime.Common.EntryPointExecutor.Execute (System.Reflection.Assembly assembly, System.String[] args, IServiceProvider serviceProvider) [0x00000] in <filename unknown>:0
  at dnx.host.Bootstrapper.RunAsync (System.Collections.Generic.List`1 args, IRuntimeEnvironment env, System.Runtime.Versioning.FrameworkName targetFramework) [0x00000] in <filename unknown>:0
@glennc glennc added this to the 1.0.0-beta8 milestone Aug 13, 2015
@davidfowl
Copy link
Member

Does it work in beta7?

@Tragetaschen
Copy link
Author

No, exactly the same problem.

$ dnu --version
Microsoft .NET Development Utility
 Version:      1.0.0-beta7-12356
 Type:         Mono
 Architecture: x64
 OS Name:      Linux

@Tragetaschen Tragetaschen changed the title Publishing with --no-source doesn't find the nupkg on beta6 Publishing with --no-source doesn't find the nupkg Aug 14, 2015
@analogrelay
Copy link
Contributor

One thing I see that looks odd: The package you referenced is HelloWorld.0.1-beta.nupkg. Is this on a local directory/network share? Also, how did you build this package? The version number isn't normalized and it looks like our code might be just trying to directly open the file to avoid scanning the directory and parsing all the versions.

Can you confirm that this is the case? (package is on a file system, not a feed; file name is HelloWorld.0.1-beta.nupkg)

@analogrelay
Copy link
Contributor

Hang on, just read the full thing over and saw that this is on publish. Sounds like #2390.

Can you try on the latest DNX beta8 builds and see if it is fixed there? If not, can you publish your version info as you did above?

@Tragetaschen
Copy link
Author

Still no luck:

$ dnu --version
Microsoft .NET Development Utility
 Version:      1.0.0-beta8-15530
 Type:         Mono
 Architecture: x64
 OS Name:      Linux

@Tragetaschen
Copy link
Author

Hang on, that's four days old according to MyGet and so is the patch from #2390. So it's likely it hasn't made it through coherence builds yet.

@analogrelay
Copy link
Contributor

Yeah, the last successful Coherence build was Aug 28. We're actively looking in to it though so hopefully it will appear soon.

@analogrelay
Copy link
Contributor

We just got a Coherence build out that should have the change. Build 1.0.0-beta8-15548. Can you give it one last shot and let me know how it goes?

@Tragetaschen
Copy link
Author

This is fixed. There are a couple of log lines reading

Total projects built: 1
Adding NuGet package /home/kai/yocto/dnx/samples/HelloWorld/bin/Debug/HelloWorld.0.1.0-beta.nupkg to /home/kai/yocto/dnx/samples/something/approot/packages
Installing HelloWorld.0.1.0-beta
Add complete, 152ms elapsed
Removing /home/kai/yocto/dnx/samples/HelloWorld/bin/Debug/HelloWorld.0.1.0-beta.nupkg
Removing /home/kai/yocto/dnx/samples/HelloWorld/bin/Debug/HelloWorld.0.1.0-beta.symbols.nupkg

and something contains a working application.

@analogrelay
Copy link
Contributor

Yay! Glad to hear 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

4 participants