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

Can't publish combined project of DNX and 'traditional' class library to Azure #2467

Closed
gabrielvdk opened this issue Aug 12, 2015 · 4 comments

Comments

@gabrielvdk
Copy link

Hi,

I've added my 'traditional' DAL project to an ASP.NET vNext and worked/debugged with it locally without any problems. But when I tried to publish it to Azure it would not. It states '3>Publish failed due to build errors. Check the error list for more details.', but there are 0 in the Error List, also the project runs just fine.

So is it possible to combine 'old' 4.5.1 projects with DNX targetted projects? If so, is Publishing now just an issue at the moment or something else?

As a workaround I tried to create a DNX class library, but that wouldn't allow me (in VS 2015) to add References using the Browse button, so I couldn't port my old class library to the new format as I also require 2 DLL's.

The log of the build

3>------ Publish started: Project: Example.Kitchen, Configuration: Release Any CPU ------
Project "Example.Kitchen.xproj" (MSDeployPublish target(s)):
    Building with tools version "14.0".
    Task "Error" skipped, due to false condition; ( '$(_InvalidConfigurationError)' == 'true' ) was evaluated as ( '' == 'true' ).
    Task "Warning" skipped, due to false condition; ( '$(_InvalidConfigurationWarning)' == 'true' ) was evaluated as ( '' == 'true' ).
    Configuration=Debug
    Platform=AnyCPU
    Task "Error" skipped, due to false condition; ('$(OutDir)' != '' and !HasTrailingSlash('$(OutDir)')) was evaluated as ('..\artifacts\bin\Example.Kitchen\' != '' and !HasTrailingSlash('..\artifacts\bin\Example.Kitchen\')).
    Task "Error" skipped, due to false condition; ('$(BaseIntermediateOutputPath)' != '' and !HasTrailingSlash('$(BaseIntermediateOutputPath)')) was evaluated as ('..\artifacts\obj\Example.Kitchen\' != '' and !HasTrailingSlash('..\artifacts\obj\Example.Kitchen\')).
    Task "Error" skipped, due to false condition; ('$(IntermediateOutputPath)' != '' and !HasTrailingSlash('$(IntermediateOutputPath)')) was evaluated as ('..\artifacts\obj\Example.Kitchen\Debug\' != '' and !HasTrailingSlash('..\artifacts\obj\Example.Kitchen\Debug\')).
    Using "GetRuntimeToolingPath" task from assembly "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DNX\Microsoft.DNX.Tasks.dll".
    Task "Error" skipped, due to false condition; (!Exists('$(RuntimeToolingExe)')) was evaluated as (!Exists('C:\Users\Gabriel\.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta6\bin\dnx.exe')).
    Using "DefaultExternalToolsPath" task from assembly "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DNX\Microsoft.DNX.Tasks.dll".
    Using "GetRuntimeVersion" task from assembly "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DNX\Microsoft.DNX.Tasks.dll".
    rmdir /S /Q "C:\Users\Gabriel\AppData\Local\Temp\PublishTemp\"
    Using "Dnu" task from assembly "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\..\DNX\Microsoft.DNX.Tasks.dll".
    Environment variables:
    Path=D:\Development\dotnet\Example\Example.Kitchen\node_modules\.bin;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\extensions\microsoft\web tools\external;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\NativeBinaries\x86;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Git\cmd;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Skype\Phone\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files (x86)\Microsoft Emulator Manager\1.0\;C:\Program Files (x86)\nodejs\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Users\Gabriel\.dnx\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Git\cmd;C:\Program Files\nodejs\;C:\Python27\;C:\Python27\Scripts;C:\Users\Gabriel\AppData\Roaming\npm";C:\Users\Gabriel\AppData\Roaming\npm;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\extensions\microsoft\web tools\external\.git
    C:\Users\Gabriel\.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta6\bin\dnu.cmd publish "D:\Development\dotnet\Example\Example.Kitchen" --out "C:\Users\Gabriel\AppData\Local\Temp\PublishTemp" --configuration Debug --runtime dnx-clr-win-x86.1.0.0-beta6 --wwwroot-out "wwwroot" --quiet
    Microsoft .NET Development Utility CLR-x86-1.0.0-beta6-12256
    Copying to output path C:\Users\Gabriel\AppData\Local\Temp\PublishTemp
    Time elapsed 00:00:03.4408766
Done building project "Example.Kitchen.xproj" -- FAILED.

3>Publish failed due to build errors. Check the error list for more details.
========== Build: 2 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Publish: 0 succeeded, 1 failed, 0 skipped ==========
@petrsvihlik
Copy link

I'm having the exact same issue. I've created a testing repo to help reproduce it:
https://github.com/petrsvihlik/aspnet5_deploytest

It's an ASP.NET5 web app referencing a good old class library. When I remove the reference to the library, publishing works just fine. Otherwise i get the error above.

@gabrielvdk You can try creating nuget packages out of your old libs as a workaround.

@gabrielvdk
Copy link
Author

Hi,

Just tried your suggestion by adding a 'normal' NuGet package to the project, same issue. I would build and work fine on my Dev machine, but wouldn't publish to Azure.

Here are the publish logs, the first is the failure, the second the succcess.

The NuGet package that I used: SD.LLBLGen.Pro.ORMSupportClasses

Fail:
Project "ExampleProj.Kitchen.xproj" (MSDeployPublish target(s)): Building with tools version "14.0". Task "Error" skipped, due to false condition; ( '$(_InvalidConfigurationError)' == 'true' ) was evaluated as ( '' == 'true' ). Task "Warning" skipped, due to false condition; ( '$(_InvalidConfigurationWarning)' == 'true' ) was evaluated as ( '' == 'true' ). Configuration=Debug Platform=AnyCPU Task "Error" skipped, due to false condition; ('$(OutDir)' != '' and !HasTrailingSlash('$(OutDir)')) was evaluated as ('..\artifacts\bin\ExampleProj.Kitchen\' != '' and !HasTrailingSlash('..\artifacts\bin\ExampleProj.Kitchen\')). Task "Error" skipped, due to false condition; ('$(BaseIntermediateOutputPath)' != '' and !HasTrailingSlash('$(BaseIntermediateOutputPath)')) was evaluated as ('..\artifacts\obj\ExampleProj.Kitchen\' != '' and !HasTrailingSlash('..\artifacts\obj\ExampleProj.Kitchen\')). Task "Error" skipped, due to false condition; ('$(IntermediateOutputPath)' != '' and !HasTrailingSlash('$(IntermediateOutputPath)')) was evaluated as ('..\artifacts\obj\ExampleProj.Kitchen\Debug\' != '' and !HasTrailingSlash('..\artifacts\obj\ExampleProj.Kitchen\Debug\')). Using "GetRuntimeToolingPath" task from assembly "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DNX\Microsoft.DNX.Tasks.dll". Task "Error" skipped, due to false condition; (!Exists('$(RuntimeToolingExe)')) was evaluated as (!Exists('C:\Users\Gabriel\.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta6\bin\dnx.exe')). Using "DefaultExternalToolsPath" task from assembly "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DNX\Microsoft.DNX.Tasks.dll". Using "GetRuntimeVersion" task from assembly "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DNX\Microsoft.DNX.Tasks.dll". rmdir /S /Q "C:\Users\Gabriel\AppData\Local\Temp\PublishTemp\" Using "Dnu" task from assembly "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\..\DNX\Microsoft.DNX.Tasks.dll". Environment variables: Path=D:\Development\dotnet\ExampleProj\ExampleProj.Kitchen\node_modules\.bin;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\extensions\microsoft\web tools\external;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\NativeBinaries\x86;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Git\cmd;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Skype\Phone\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files (x86)\Microsoft Emulator Manager\1.0\;C:\Program Files (x86)\nodejs\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Users\Gabriel\.dnx\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Git\cmd;C:\Program Files\nodejs\;C:\Python27\;C:\Python27\Scripts;C:\Users\Gabriel\AppData\Roaming\npm";C:\Users\Gabriel\AppData\Roaming\npm;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\extensions\microsoft\web tools\external\.git C:\Users\Gabriel\.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta6\bin\dnu.cmd publish "D:\Development\dotnet\ExampleProj\ExampleProj.Kitchen" --out "C:\Users\Gabriel\AppData\Local\Temp\PublishTemp" --configuration Debug --runtime dnx-clr-win-x86.1.0.0-beta6 --wwwroot-out "wwwroot" --quiet Microsoft .NET Development Utility CLR-x86-1.0.0-beta6-12256 Copying to output path C:\Users\Gabriel\AppData\Local\Temp\PublishTemp Time elapsed 00:00:03.1951602 Done building project "ExampleProj.Kitchen.xproj" -- FAILED.

Success:

`Project "ExampleProj.Kitchen.xproj" (MSDeployPublish target(s)):
Building with tools version "14.0".
Task "Error" skipped, due to false condition; ( '$(_InvalidConfigurationError)' == 'true' ) was evaluated as ( '' == 'true' ).
Task "Warning" skipped, due to false condition; ( '$(_InvalidConfigurationWarning)' == 'true' ) was evaluated as ( '' == 'true' ).
Configuration=Debug
Platform=AnyCPU
Task "Error" skipped, due to false condition; ('$(OutDir)' != '' and !HasTrailingSlash('$(OutDir)')) was evaluated as ('..\artifacts\bin\ExampleProj.Kitchen' != '' and !HasTrailingSlash('..\artifacts\bin\ExampleProj.Kitchen')).
Task "Error" skipped, due to false condition; ('$(BaseIntermediateOutputPath)' != '' and !HasTrailingSlash('$(BaseIntermediateOutputPath)')) was evaluated as ('..\artifacts\obj\ExampleProj.Kitchen' != '' and !HasTrailingSlash('..\artifacts\obj\ExampleProj.Kitchen')).
Task "Error" skipped, due to false condition; ('$(IntermediateOutputPath)' != '' and !HasTrailingSlash('$(IntermediateOutputPath)')) was evaluated as ('..\artifacts\obj\ExampleProj.Kitchen\Debug' != '' and !HasTrailingSlash('..\artifacts\obj\ExampleProj.Kitchen\Debug')).
Using "GetRuntimeToolingPath" task from assembly "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DNX\Microsoft.DNX.Tasks.dll".
Task "Error" skipped, due to false condition; (!Exists('$(RuntimeToolingExe)')) was evaluated as (!Exists('C:\Users\Gabriel.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta6\bin\dnx.exe')).
Using "DefaultExternalToolsPath" task from assembly "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DNX\Microsoft.DNX.Tasks.dll".
Using "GetRuntimeVersion" task from assembly "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DNX\Microsoft.DNX.Tasks.dll".
rmdir /S /Q "C:\Users\Gabriel\AppData\Local\Temp\PublishTemp"
Using "Dnu" task from assembly "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web..\DNX\Microsoft.DNX.Tasks.dll".
Environment variables:
Path=D:\Development\dotnet\ExampleProj\ExampleProj.Kitchen\node_modules.bin;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\extensions\microsoft\web tools\external;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\NativeBinaries\x86;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files\Microsoft SQL Server\110\Tools\Binn;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0;C:\Program Files\Microsoft SQL Server\120\Tools\Binn;C:\Program Files (x86)\Git\cmd;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn;C:\Program Files\Microsoft SQL Server\120\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn;C:\Program Files (x86)\Skype\Phone;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit;C:\Program Files (x86)\Microsoft Emulator Manager\1.0;C:\Program Files (x86)\nodejs;C:\Program Files\Microsoft\Web Platform Installer;C:\Users\Gabriel.dnx\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit;C:\Program Files\Microsoft SQL Server\110\Tools\Binn;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0;C:\Program Files\Microsoft SQL Server\120\Tools\Binn;C:\Program Files (x86)\Git\cmd;C:\Program Files\nodejs;C:\Python27;C:\Python27\Scripts;C:\Users\Gabriel\AppData\Roaming\npm";C:\Users\Gabriel\AppData\Roaming\npm;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\extensions\microsoft\web tools\external.git
C:\Users\Gabriel.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta6\bin\dnu.cmd publish "D:\Development\dotnet\ExampleProj\ExampleProj.Kitchen" --out "C:\Users\Gabriel\AppData\Local\Temp\PublishTemp" --configuration Debug --runtime dnx-clr-win-x86.1.0.0-beta6 --wwwroot-out "wwwroot" --quiet
Microsoft .NET Development Utility CLR-x86-1.0.0-beta6-12256
Copying to output path C:\Users\Gabriel\AppData\Local\Temp\PublishTemp
Time elapsed 00:00:03.6036367
Target "GenerateSkipRuleForAppData" skipped, due to false condition; ($(ExcludeApp_Data) == 'true') was evaluated as (False == 'true').
Project "ExampleProj.Kitchen.xproj" (VSMSDeployPublish target(s)):
Building with tools version "14.0".
Target "_CheckForInvalidConfigurationAndPlatform" skipped. Previously built successfully.
Target "VSMSDeployPublish" skipped, due to false condition; ( '$(FilePreview)' == 'true' Or '$(UsePowerShell)' != 'true') was evaluated as ( '' == 'true' Or 'True' != 'true').
Done building project "ExampleProj.Kitchen.xproj".
Project "ExampleProj.Kitchen.xproj" (PowerShellPublish target(s)):
Building with tools version "14.0".
Target "_CheckForInvalidConfigurationAndPlatform" skipped. Previously built successfully.
Using "GetAllPublishProperties" task from assembly "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.Web.Publishing.Tasks.dll".
Using "InvokePowerShell" task from assembly "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.Web.Publishing.Tasks.dll".
Publishing with publish method [MSDeploy]
Executing command ["C:\Program Files (x86)\IIS\Microsoft Web Deploy V3\msdeploy.exe" -source:IisApp='C:\Users\Gabriel\AppData\Local\Temp\PublishTemp\wwwroot' -dest:IisApp='ExampleProjKitchenDev',ComputerName='https://ExampleProjkitchendev.scm.azurewebsites.net/msdeploy.axd',UserName='$ExampleProjKitchenDev',Password='{PASSWORD-REMOVED-FROM-LOG}',IncludeAcls='False',AuthType='Basic' -verb:sync -enableLink:contentLibExtension -enableRule:DoNotDeleteRule -retryAttempts:2]
Info: Using ID '2b815b5a-de70-43aa-93c8-d2ac459beb26' for connections to the remote server.
Info: Using ID 'd6474275-87fd-4552-b0ce-71f69e8c81a3' for connections to the remote server.
Info: Updating file (ExampleProjKitchenDev\web.config).
Info: Updating file (ExampleProjKitchenDev\global.json).
Info: Updating file (ExampleProjKitchenDev\src\ExampleProj.Kitchen\project.json).
Info: Updating file (ExampleProjKitchenDev\src\ExampleProj.Kitchen\project.lock.json).
Total changes: 4 (0 added, 0 deleted, 4 updated, 0 parameters changed, 119388 bytes copied)

Done building project "ExampleProj.Kitchen.xproj".

Done building project "ExampleProj.Kitchen.xproj".`

@janpieterz
Copy link

I have replicated this using a normal file system publish as well, so it seems like it's not purely an Azure publish.

@analogrelay
Copy link
Contributor

It looks like this is caused by a combination of aspnet/Tooling#193 and a real issue in publish. I was able to get a repro of the publish issue in the latest dev code by creating a new xproj and a csproj, adding a reference, restoring the wrapper proj (to work around the tooling issue), and then publishing. Both command-line and VS publish fail with is not specified in project.json because the input framework is "dnx451" and the wrapper project uses "net45"

I'll have a fix for the publish issue soon. Until the tooling issue is fixed, you'll have to manually restore the wrapper project (it's in the wrap folder under the solution root) before you can publish a wrapped project.

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