Skip to content
This repository has been archived by the owner on Apr 11, 2020. It is now read-only.

dnu publish fails with nested dependencies #120

Closed
glatzert opened this issue Jul 28, 2015 · 7 comments
Closed

dnu publish fails with nested dependencies #120

glatzert opened this issue Jul 28, 2015 · 7 comments

Comments

@glatzert
Copy link

glatzert commented Jul 28, 2015

I tried to publish an Asp.Net project to the file system and got an error in that it cannot find a referenced assembly. But "building" the project works fine.

The Project layout (minimal for presentation purposes)

  1. New ASP.NET 5 WebAPI Project (WebApplication1)
  2. New Class Library (legacy) (ClassLibrary1)
  3. Add some package via nuget package manager (I used AutoMapper here, but other packages will have similar problems)
  4. Add a reference from WebApplication1 to ClassLibrary1
  5. wrap folder was created and ClassLibrary1/project.json exists now - Automapper is listed as dependency

Now build the project or run it in IIS - it will work fine.
Then I added a publish profile for local file-system (just default settings)
Hitting the publish button now will throw an Error:

The dependency AutoMapper >= 3.3.1 could not be resolved.

Now I thought I would be clever:
I created a folder "wrap/AutoMapper" and a project.json file with the information, so it'll look like the other project.json file, which VS created. And whooohoo my ErrorList was empty and the publish.. did not throw any error, but told me the publish failed.

I copied the dnu command line from the vs output and ran it inside a cmd.exe - with the following result (took this from another project, where I first saw the error):

Restoring packages for C:\Users...AppData...\EntityFramework.CodeFirstStoreFunctions\1.0.0\root\project.json

System.ArgumentNullException: Der Wert darf nicht NULL sein. [The value may not be NULL]

@sayedihashimi
Copy link
Contributor

@glatzert could you share a sample solution?

@glatzert
Copy link
Author

@sayedihashimi
Copy link
Contributor

@glatzert thanks. I've created an internal TFS bug to track this. We will get back to you.

TFSID 1206645

@vijayrkn
Copy link
Contributor

This is a known issue. Tracked by aspnet/dnx#2352

@sayedihashimi
Copy link
Contributor

Thanks @vijayrkn, from the issue it looks like it is currently slated to beta8.
@glazert Can we close this?

@webtools-bot
Copy link

The GitHub Issue Tracker for the aspnet/Tooling repo is being deprecated in favor of Visual Studio's Report a Problem tool.

If this issue is still a problem with the RTW release of Visual Studio 2017, please report a new issue using the Report a Problem tool. While you can still use .NET Core and ASP.NET Preview tools with Visual Studio 2015, Visual Studio 2017 is now the officially supported tool for developing .NET Core and ASP.NET Core projects.

By using the Report a Problem tool (available in both VS 2017 and VS 2015), you can collect detailed information about the problem, and send it to Microsoft with just a few button clicks. See Visual Studio's Talk to Us page for more details.

Please use the discussion topic here for feedback and questions on the deprecation of this issue tracker. Thanks!

@mlorbetske
Copy link

Closing this as dnu publish is no longer the way to publish .NET Core projects

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