Need to build Asp.Net Core project using devenv.exe

leecheneler1's Avatar

leecheneler1

02 Sep, 2016 02:56 PM

Hi,

I need to build a solution using devenv.exe that contains an Asp.Net Core project.

It needs to be built using devenv.exe as a part of the solution because it references non Core .NET projects in the solution. To do this Visual Studio 2015 would need the latest web tooling installed so that it can load and build Asp.Net Core projects.

Any chance of this happening any time soon on the build worker image?

Thanks,
Lee

Showing page 2 out of 2. View the first page

  1. Support Staff 31 Posted by Feodor Fitsner on 18 Sep, 2016 03:50 AM

    Feodor Fitsner's Avatar

    We've added Visual Studio 2015 - GCE build worker image under your account. It allows running builds on GCE where the latest updates are already available. You can specify it in appveyor.yml as image: Visual Studio 2015 - GCE. Note that it takes 3-4 minutes to provision a new VM instance and start the build.

    When the update is rolled out to Hyper-V environment you will be able to run on default build worker image.

  2. 32 Posted by leecheneler1 on 18 Sep, 2016 09:29 AM

    leecheneler1's Avatar

    Hmm, I added image: Visual Studio 2015 - GCE to our yml and I'm guessing it used the correct image it took several minutes to provision instead of seconds. However the build still failed with:

    14>  Compiling <project> for .NETFramework,Version=v4.5.2
    14>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Common.Targets(262,5): error : Object reference not set to an instance of an object.
    14>  C:\Program Files\dotnet\dotnet.exe compile-csc @<projectpath>\obj\Release\net452\dotnet-compile.rsp returned Exit Code 1
    14>  Compilation failed.
    14>      0 Warning(s)
    14>      0 Error(s)
    

    Any thoughts?

  3. Support Staff 33 Posted by Feodor Fitsner on 18 Sep, 2016 03:32 PM

    Feodor Fitsner's Avatar

    We've been testing with that sample project you provided and it worked: https://ci.appveyor.com/project/appveyor-tests/mixed-net-core-solution/build/1.0.2

    Do you use appveyor.yml for configuring the project? Image should be specified there if so, not on UI.

    Also, try RDPing into build worker and see if it works there while running from command line or IDE: https://www.appveyor.com/docs/how-to/rdp-to-build-worker/

    -Feodor Fitsner, AppVeyor

  4. Support Staff 34 Posted by Feodor Fitsner on 18 Sep, 2016 04:08 PM

    Feodor Fitsner's Avatar

    The interesting part is that you are getting 0 warning(s), 0 error(s) yet the build fails. Compare to the build results of your sample app on the current image: https://ci.appveyor.com/project/appveyor-tests/mixed-net-core-solut...

  5. 35 Posted by leecheneler1 on 18 Sep, 2016 05:22 PM

    leecheneler1's Avatar

    Yes it is odd...

    I created an issue on the aspnet tooling repo in GitHub ages ago but they haven't responded yet :/

    So the work around no longer works?

    I'm just about to rdp onto a build

  6. Support Staff 36 Posted by Feodor Fitsner on 18 Sep, 2016 05:24 PM

    Feodor Fitsner's Avatar

    You mean workaround of creating an empty app in IDE? It works, but for this "test" repository you provided. I guess somethings is different in your main "bigger" app.

    Look around via RDP - maybe you'll spot something unusual.

  7. 37 Posted by leecheneler1 on 18 Sep, 2016 05:28 PM

    leecheneler1's Avatar

    Yeah hopefully something will stick out... Its strange though, fundamentally our app is no different, just contains 20 or 30 projects in the solution, and one happens to be aspnetcore and reference a couple of full dotnet projects.

    If can't get it to work I'll have to have the dependant libraries build to a single folder on debug and release and reference the dlls explicitly in a relevant path... never done it with core but you must be able to!

    Pah, hopefully they sort this out before the tooling comes out of preview :P

  8. 38 Posted by oleg.burov on 13 Oct, 2016 03:12 AM

    oleg.burov's Avatar

    Hi Guys,

    I was experiencing the same issue with my 'ASP.NET Core Web Application (.NET Framework)' solution. I was able to fix it after changing my 'appveyor.yml' file like shown below:

    From:

    before_build:
      - nuget restore .\AnnetKatan.sln

    To:

    before_build:
      - dotnet restore

  9. 39 Posted by Daniel15 on 19 Oct, 2016 06:14 AM

    Daniel15's Avatar

    > Msbuild doesn't support building Asp.Net Core projects

    It should; you just need to call msbuild on the sln file. I'm doing this for ReactJS.NET and it's working fine: https://ci.appveyor.com/project/Daniel15/react-net/build/168

  10. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:09 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