Asp.net 5 class lib does not build when publish_wap is true

michiel's Avatar

michiel

16 Jan, 2016 02:15 PM

I've got a strange problem which can be easily reproduced and I've included two github repo's for you to help. My asp.net 5 class library won't build with the following conditions:
There's an old asp.net 4 website project and a new asp.net 5 class library in the same solution
Publish_wap is set to true in appveyor.yml

Without the old asp.net 4 website in the solution the class library builds fine. It also builds fine if Publish_wap is set to false.
The strange thing is, why does Publish_wap do something with the new asp.net 5 class library?
When there is no old asp.net 4 website in the solution and Publish_wap is set to true, it also runs fine.

I've created a repository for you to replicate this behaviour. It's a simpel visual studio solution with a basic asp.net 4 / MVC 5 website and a new asp.net 5 class library.

Green build:
https://github.com/michielpost/AppVeyorBuildTest
https://ci.appveyor.com/project/michielpost/appveyorbuildtest

Red build:
https://github.com/michielpost/AppVeyorBuildTest_Broken
https://ci.appveyor.com/project/michielpost/appveyorbuildtest-broken

Note that the code in both repositories in the same. The only difference is the Publish_wap in appveyor.yml.
For your reference the appveyor.yml is included in the github repository.

We are migrating parts of our old asp.net projects to the new asp.net 5 projects and that's how I noticed this behaviour.

It's failing with this error: C:\Users\appveyor\.dnx\runtimes\dnx-clr-win-x86.1.0.0-rc1-update1\bin\dnu.cmd publish "C:\projects\appveyorbuildtest-broken\Asp5ClassLib" --out "C:\Users\appveyor\AppData\Local\Temp\1\PublishTemp\Asp5ClassLib68" --configuration Debug --runtime dnx-clr-win-x86.1.0.0-rc1-update1 --wwwroot "wwwroot" --wwwroot-out "wwwroot"
Microsoft .NET Development Utility Clr-x86-1.0.0-rc1-16231
 395C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.DNX.Publishing.targets(152,5): error : The project being published does not support the runtime 'dnx-clr-win-x86.1.0.0-rc1-update1' [C:\projects\appveyorbuildtest-broken\Asp5ClassLib\Asp5ClassLib.xproj]

It should not do a dnu publish for a class library.

Hope you can fix this!

  1. 1 Posted by michiel on 20 Jan, 2016 01:45 PM

    michiel's Avatar

    Any progress on this?

    Thanks!

  2. Support Staff 2 Posted by Feodor Fitsner on 20 Jan, 2016 06:43 PM

    Feodor Fitsner's Avatar

    I'm going to look into that.

    Why wouldn't you just disable automatic publishing and replace it with few commands: https://gist.github.com/FeodorFitsner/e33f629c8a10becd1efd

  3. 3 Posted by michiel on 21 Jan, 2016 11:51 AM

    michiel's Avatar

    Thanks for the workaround, using that for now.

    But I hope this gets fixed. We're using AppVeyor so we don't need a lot of custom build scripting. Our solution currently has 6 website projects and had 8 in the past and things might move around again.
    With AppVeyor it should just work, but with this custom buildscript things will break when we move or delete website projects.

  4. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:03 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac