dnx icon indicating copy to clipboard operation
dnx copied to clipboard

dnu publish on xproj referencing a csproj fails

Open glennc opened this issue 11 years ago • 14 comments

xproj referencing a csproj. xproj is dnx451 only csproj has some NuGet package dependencies that only have lib/net451 assemblies

Project can run fine, but running publish gives an error about being unable to resolve the package dependencies in the wrapped project.json. It was reported that modifying the wrapper project.jsons tfm from net451 to dnx451 made it work. No idea why that is.

Need some root cause analysis to find out what's really happening here.

glennc avatar Oct 10 '15 00:10 glennc

Even when the wrapped project doesn't have a nuget reference the publish is failing for me silently. The only reason I can tell it fails is the exit code and the wwwroot folder and the contents are not published.

JasonRowe avatar Oct 10 '15 02:10 JasonRowe

@pakrym Could you investigate this on Monday? Sync-up with @glennc if you have any questions.

muratg avatar Oct 10 '15 02:10 muratg

@muratg Sure, will do.

pakrym avatar Oct 10 '15 02:10 pakrym

Just a note. I am experiencing the same problem (with csprojects not using nuget-packages).

Manually changing the framework in project.json in the wrap-folder from net451 to dnx451 will allow me to publish (after running "dnu restore"), but my error list in VS2015 will show a lot of errors ("The type or namespace name ‘abc’ does not exist in the namespace"). The solution builds fine, but shows a lot errors.

Looking forward to a fix :)

feldskov avatar Oct 13 '15 10:10 feldskov

I have this problem as well: https://github.com/aspnet/dnx/issues/2842 I also managed it to publish by updating it from net451 to dnx451, and it also shows a lot of errors.

promontis avatar Oct 17 '15 07:10 promontis

Is this already pushed to the dev branch myget feed? Would love to try it out!

promontis avatar Oct 26 '15 19:10 promontis

@pakrym checked in a fix, though we do not yet have the packages on vnext feed.

muratg avatar Oct 26 '15 19:10 muratg

I have this exact same problem with Beta8. Is this problem corrected? If so, where can I find the fixes?

Thanks.

miragejb avatar Nov 05 '15 16:11 miragejb

Could you guys try this out with the current set of vnext packages (RC1-*)

muratg avatar Nov 09 '15 18:11 muratg

I would love to test it out for you. Do you have any instructions on how to get and use the latest rc1 version of vnext?

From: Murat Girgin [mailto:[email protected]] Sent: Monday, November 9, 2015 1:45 PM To: aspnet/dnx [email protected] Cc: ICSharp [email protected] Subject: Re: [dnx] dnu publish on xproj referencing a csproj fails (#2954)

Could you guys try this out with the current set of vnext packages (RC1-*)

— Reply to this email directly or view it on GitHub https://github.com/aspnet/dnx/issues/2954#issuecomment-155151875 . https://github.com/notifications/beacon/AJwJcPpZ_ncfbvl79YhRH3LLa9LEUhSCks5pEOE6gaJpZM4GMd02.gif

miragejb avatar Nov 09 '15 19:11 miragejb

Try dnvm upgrade -u to install unstable bits.

muratg avatar Nov 09 '15 20:11 muratg

@muratg dnu publish is working with beta8 with the following workaround

Use a beta8 project with publish problem from above dnvm upgrade -u installs: dnx-clr-win-x86.1.0.0-rc2-16128 (tried to get rc1-* but not succeeded) dnu publish --out ... --runtime dnx-clr-win-x86.1.0.0-rc2-16128 After publish copy dnx-clr-win-x64.1.0.0-beta8 runtime to approot/runtimes Edit run files to use dnx-clr-win-x64.1.0.0-beta8 Result a working published version running on beta8

Lakerfield avatar Nov 11 '15 12:11 Lakerfield

@muratg I found a bug in the workaround publish process with the rc2 bits. If the project wrap a console app instead of a class library. The publish doesn't copy the .exe file to the packages location. The .nuspec and project.json are there, but the lib/net45 directory doesn't exists

Lakerfield avatar Nov 13 '15 12:11 Lakerfield

cc @anurse. We'll be revisiting publish in RC2 and we should look into this.

muratg avatar Nov 13 '15 17:11 muratg