3

I have create a sample ASP.NET 5 application (pretty much the example one from New Solution), and pushed it to GIT hosted on Visual Studio Team Services (former Visual Studio Online). I want to set up continuous integration to Azure Web App (former Azure Web Site). I have tried to set it up from Azure portal itself, it did create a new build definition, but it fails to build ASP.NET 5. I have found a guide how to do this, but it never really worked for me, I get errors like this e.g.

Error parsing solution file at C:\a\1\s\Frontend\src\Frontend\Frontend.xproj: Exception has been thrown by the target of an invocation.

Predefined type 'System.Void' is not defined or imported

Another problem is that it seems it really takes a lot of time to install dnvm, get packages, etc. So all in all it's a pain to make it work.

So are there real alternatives for that or more importantly is Microsoft is planning to implement something like a Build ASP.NET 5, Deploy ASP.NET to Azure and such to make it easy as I suppose it's easy with the current ASP.NET 4 apps. I really hope that it will be an option soon since it's quite impossible to work with current build system.

5
  • Could you please provide the code that is failing to compile? Specifically... are you using System.Void? Commented Dec 16, 2015 at 15:50
  • Also make sure to provide us your current runtime and your project.json. It really look like a runtime/package problem. Commented Dec 16, 2015 at 15:51
  • Well I know how to fix the first problem at least (you have to turn off nuget restore), not sure about the second one, I use a bit modified code of the default project and the project.json is pretty much default as well). I would like to know how to fix the Void issue, but the main question here is the MS plans of making it proper, rather than fixing it at the moment :) Commented Dec 16, 2015 at 16:00
  • What's your current runtime and what are your dependencies in your project.json? If the two don't match, it's normal for the framework to not find those dependencies. As for making it proper, stuff is still in beta/release candidate. Some people still have beta runtime on their environment. It's not unusual for it to crash. Once 1.0 hit however, things will be way cleaner. Commented Dec 16, 2015 at 16:04
  • I run update1, but for some reason there are no dependencies like that, all of them are final1, I don't know really how to fix it properly... Commented Dec 17, 2015 at 12:45

2 Answers 2

1

For "System.Void" issue, please check the runtime version in "global.json" file and make sure it is consistent with the dependencies in "project.json" file.

For dnvm install issue, since AspNet5 runtime environment isn't installed on VSTS Hosted Build Agent for now and the different users may use different runtime versions, it requires the user to add a "PreBuild" PowerShell step to read the runtime version in "global.json" file and then install it. If you can make sure that you will always only use one version (For example: 1.0.0-rc1-update1), you can deploy your own build agent and install "1.0.0-rc1-update1" on it, then you can skip the dnvm installation during the build process.

Sign up to request clarification or add additional context in comments.

10 Comments

I have rc1-final dependencies in the "project.json" and rc1-update1 in "global.json", this is the default new project. I have issues in Visual Studio with references (have to run dnvm restore manually all the time). How should I fix it and why did it happen at all? It seems there are no -update1 dependencies at all, only -final
do you know of any plans to update hosted build agents?
@IlyaChernomordik: My guess would be for ASP.NET 5 RTM, which is expected Q1 2016.
@IlyaChernomordik rc1-update1 is compatible with rc1-final. Does your app can be built on your local machine? Can you try to create a fresh new Asp.Net5 example to see if it can be built successfully? For the restore issue, do you enable the "Allow Nuget to download missing packages" option from "VS\Tools\Options\Nuget Package Manager"?
@Eddie-MSFT Thanks for the help with the tooling, it actually seems that I needed to check "Automatically check for packages during build", the other one was already enabled. This seem to be weird, since I don't really do the build, but that's what forces Visual Studio to make dnu restore properly I suppose. So it still seems more like a VS bug or at least a missing feature. I also don't have any problems building it locally for both platforms (dnx, dnxcore).
|
0

Take a look on http://riffer.eu/wordpress/?p=112. There I have a solution vor asp.net core RC_1. Amazingly you need only two powershell scripts - there is no compiling / visual studio necessary.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.