tag:help.appveyor.com,2012-11-13:/discussions/problems/23174-int-keyword-is-not-recognized-by-appveyor-despite-compile-ok-on-vs-2019AppVeyor: Discussion 2019-05-03T17:04:27Ztag:help.appveyor.com,2012-11-13:Comment/471972232019-04-22T18:44:05Z2019-04-22T18:44:06Zint keyword is not recognized by AppVeyor despite compile ok on VS 2019<div><p>hello,<br>
my project UsefulFunctions compiles correctly in my Visual Studio 2019 targeting 4.7.2 .net framework but it fails on AppVeyor stating that int is not a known expression :<br>
FunctionsMath.cs(364,16): error CS1525: Invalid expression term 'int' [C:\projects\usefulfunctions\FonctionsUtiles.Fred.Csharp\FunctionsUseful.Fred.Csharp.csproj]</p>
<p>here is the code :<br>
foreach (var number in result) { switch (number) { case int _ when number < 10: result[0]++; break; case int _ when number >= 10 && number <= 19: result[1]++; break; case int _ when number >= 20 && number <= 29: result[2]++; break; case int _ when number >= 30 && number <= 39: result[3]++; break; case int _ when number >= 40: result[4]++; break; } } What is the problem ?</p></div>fredtag:help.appveyor.com,2012-11-13:Comment/471972232019-04-22T19:02:58Z2019-04-22T19:02:58Zint keyword is not recognized by AppVeyor despite compile ok on VS 2019<div><p>Which build image are you using</p></div>Owen McDonnelltag:help.appveyor.com,2012-11-13:Comment/471972232019-04-24T22:37:33Z2019-04-24T22:37:34Zint keyword is not recognized by AppVeyor despite compile ok on VS 2019<div><p>I used VS2015 image and I changed it to VS 2019 preview image and I have the same error.</p></div>fredtag:help.appveyor.com,2012-11-13:Comment/471972232019-04-25T04:59:07Z2019-04-25T04:59:07Zint keyword is not recognized by AppVeyor despite compile ok on VS 2019<div><p>I forked your repo and the <a href="https://ci.appveyor.com/project/OwenMcDonnell/usefulfunctions/builds/24084881">first build</a> i tried with <code>Visual Studio 2017</code> image worked, where as default image (Visual studio 2015) failed.</p>
<p>You probably tried to change the image in the UI but since you have a configuration file it is overriding. See <a href="https://www.appveyor.com/docs/build-configuration/#appveyoryml-and-ui-coexistence">here</a> for details on the interaction between config file and UI config.</p></div>Owen McDonnelltag:help.appveyor.com,2012-11-13:Comment/471972232019-04-26T21:54:19Z2019-04-26T21:54:20Zint keyword is not recognized by AppVeyor despite compile ok on VS 2019<div><p>I have choosen VS2017 like you and<br>
I have copied your appveyor.yml file to my repo and it doesn't build.<br>
I don't know what is different ?</p></div>fredtag:help.appveyor.com,2012-11-13:Comment/471972232019-04-26T22:10:06Z2019-04-26T22:10:06Zint keyword is not recognized by AppVeyor despite compile ok on VS 2019<div><p>Point me to a build in which you have chosen VS2017.</p></div>Owen McDonnelltag:help.appveyor.com,2012-11-13:Comment/471972232019-05-01T21:14:58Z2019-05-01T21:15:00Zint keyword is not recognized by AppVeyor despite compile ok on VS 2019<div><p>If you can access to my settings,<br>
<a href="https://ci.appveyor.com/project/fredatgithub/usefulfunctions/settings/environment">https://ci.appveyor.com/project/fredatgithub/usefulfunctions/settin...</a></p>
<p>you will see that I use a VS2017 image.</p></div>fredtag:help.appveyor.com,2012-11-13:Comment/471972232019-05-01T23:25:35Z2019-05-01T23:25:35Zint keyword is not recognized by AppVeyor despite compile ok on VS 2019<div><p>A quote from my response above....</p>
<blockquote>
<p>You probably tried to change the image in the UI but since you have a configuration file it is overriding. See <a href="https://www.appveyor.com/docs/build-configuration/#appveyoryml-and-ui-coexistence">here</a> for details on the interaction between config file and UI config.</p>
</blockquote>
<p>Please follow the link and read.</p></div>Owen McDonnelltag:help.appveyor.com,2012-11-13:Comment/471972232019-05-03T16:18:25Z2019-05-03T16:18:26Zint keyword is not recognized by AppVeyor despite compile ok on VS 2019<div><p>I found it<br>
I have added<br>
image:<br>
Visual studio 2017 in my appveyor.yml file and it is ok now<br>
thanks for your help</p></div>fred