.NET4.6 changes don't compile

thomas.clegg's Avatar

thomas.clegg

23 Jul, 2015 01:32 AM

Using "os: Visual Studio 2015" and targeting framework v4.6 I get the following which, as of 4.6, shouldn't be an error:
error CS1985: Cannot await in the body of a catch clause

  1. Support Staff 1 Posted by Feodor Fitsner on 23 Jul, 2015 02:28 AM

    Feodor Fitsner's Avatar

    If your project build step is set to "MSBuild" make sure .sln file has # Visual Studio 14 header (not # Visual Studio 2013; otherwise AppVeyor will force MSBuild 12.0.

    Add MSBuild 14.0 to PATH with the following command:

    set PATH=C:\Program Files (x86)\MSBuild\14.0\Bin;%PATH%

    - Feodor

  2. 2 Posted by thomas.clegg on 23 Jul, 2015 02:57 AM

    thomas.clegg's Avatar

    That worked, thanks.

    -Tom

  3. 3 Posted by Antoine Blanche... on 07 Sep, 2015 01:00 PM

    Antoine Blanchet's Avatar

    Hi Feodor,

    I try to build a solution that contains projects that target the .NET 4.6 framework.

    In order to to that I have updated my .sln header file like this:

    Microsoft Visual Studio Solution File, Format Version 14.00
    # Visual Studio 14
    VisualStudioVersion = 14.0.23107.0
    

    And I've updated my "before build script" (cmd) with the following command:

    set PATH=C:\Program Files (x86)\MSBuild\14.0\Bin;%PATH%
    

    But even with this configuration I still have error messages like that :

    C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(991,5): warning MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.6" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.
    

    It looks like AppVeyor still try to build my solution with MSBuild 12.0

  4. Support Staff 4 Posted by Feodor Fitsner on 07 Sep, 2015 01:15 PM

    Feodor Fitsner's Avatar

    Have you selected "Visual Studio 2015" image?

    - Feodor

  5. 5 Posted by Antoine Blanche... on 07 Sep, 2015 01:25 PM

    Antoine Blanchet's Avatar

    Oups no ...
    I even didn't click on the Operating System configuration settings. I didn't expect to find Visual Studio 2015 in this list.

    Ok I've just set the VS image and retry my PR build. It still fail with the same message. (Still trying to use 12.0 version).

  6. Support Staff 6 Posted by Feodor Fitsner on 07 Sep, 2015 01:27 PM

    Feodor Fitsner's Avatar

    If you use appveyor.yml then you should  add "os: Visual Studio 2015" there.

    - Feodor

  7. 7 Posted by Antoine Blanche... on 07 Sep, 2015 01:31 PM

    Antoine Blanchet's Avatar

    I do not use the yaml configuration (yet). The OS configuration via the web UI does not work ?

  8. Support Staff 8 Posted by Feodor Fitsner on 07 Sep, 2015 01:34 PM

    Feodor Fitsner's Avatar

    It should. Can you drop a link to project build results?

    - Feodor

  9. 9 Posted by Antoine Blanche... on 07 Sep, 2015 01:41 PM

    Antoine Blanchet's Avatar

    Sure. The build result is here: https://ci.appveyor.com/project/TechABC/zebus/build/1.2.128

    FYI when I try to export the yaml configuration I see this: (seems ok to me)

    version: 1.2.{build}  
    os: Visual Studio 2015  
    before_build:  
    - set PATH=C:\Program Files (x86)\MSBuild\14.0\Bin;%PATH%
    - nuget restore src/Abc.Zebus.sln
    build:  
      verbosity: minimal
    test:  
      assemblies: Abc.Zebus.Tests.dll
      categories:
        except:
        - ManualOnly
    
  10. Support Staff 10 Posted by Feodor Fitsner on 07 Sep, 2015 01:47 PM

    Feodor Fitsner's Avatar

    There is already appveyor.yml in master branch: https://github.com/Abc-Arbitrage/Zebus/blob/master/appveyor.yml thus UI settings are ignored. You should have updated yml in your PR too.

    - Feodor

  11. 11 Posted by Antoine Blanche... on 07 Sep, 2015 01:54 PM

    Antoine Blanchet's Avatar

    Well done. I was stuck in the "src" directory and didn't check the root one.
    Thank you for your time !

    Last question : Since I now target the VS15 image, do I really still need to update the PATH with MSBuild 14.0 path ? (If VS is installed, I guess that the PATH already contains the path to MSBuild 14.0 that is shipped with VS)

  12. Support Staff 12 Posted by Feodor Fitsner on 07 Sep, 2015 01:56 PM

    Feodor Fitsner's Avatar

    Yes, the PATH should be set to MSBuild 14.0.

    - Feodor

  13. 13 Posted by Antoine Blanche... on 07 Sep, 2015 01:57 PM

    Antoine Blanchet's Avatar

    Ok. Thanks

  14. thomas.clegg closed this discussion on 29 Oct, 2015 07:08 PM.

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