msbuild not recognized (win 10 and visual studio 2019)

gianpaolo's Avatar

gianpaolo

11 Nov, 2019 04:16 PM

hi
new to appveyor.
I'm trying to build a WPF app on my win10 machine with vs2019 installed.
I set the before build script like this:

set PATH="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin;C:\Program Files (x86)\NuGet;%PATH%"
nuget.exe restore

but the build fails cause msbuild "is not recognized"
I am using the cmd (without double quotes does not work either)
What am I missing?

cheers

  1. Support Staff 1 Posted by Feodor Fitsner on 11 Nov, 2019 04:58 PM

    Feodor Fitsner's Avatar

    Hi,

    Removing double quotes around variable value should do the trick:

    set PATH=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin;C:\Program Files (x86)\NuGet;%PATH%
    
  2. 2 Posted by gianpaolo on 12 Nov, 2019 10:56 AM

    gianpaolo's Avatar

    Maybe the morning reboot helped, i had tried to remove double quotes.

    I got a new error, should I open a new topic?
    I have added the nuget path and the script contains nuget restore but I still get this:

    NETSDK1004: Assets file 'C:\Users\appveyor\projects\wpfasynch\Wpfasync\obj\project.assets.json' not found. Run a NuGet package restore to generate this file. [C:\Users\appveyor\projects\wpfasynch\Wpfasync\Wpfasync.csproj]

  3. Support Staff 3 Posted by Feodor Fitsner on 12 Nov, 2019 07:20 PM

    Feodor Fitsner's Avatar

    If it's a mixed solution then do dotnet restore instead.

  4. 4 Posted by gianpaolo on 12 Nov, 2019 09:21 PM

    gianpaolo's Avatar

    hi Feodor,
    no luck with dotnet restore either.
    It 's a solution that targets netcore 3.0 only (with 2 projects: wpf app + test project)

    (I've seen there are quite a few errors like that reported on stackoverlow, so I presume the netcore environment is not stable yet)

    Cheers

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

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

Recent Discussions

05 Dec, 2019 09:12 PM
04 Dec, 2019 07:46 PM
04 Dec, 2019 12:01 AM
04 Dec, 2019 12:00 AM
03 Dec, 2019 11:00 PM