0

I develop an application that has to run on Windows XP (so the .Net Framework has to be 4.0). I need to reference Async BCL packages in order to use async/await in some of my projects.

I have correctly referenced the following packages to the targeted projects as mentioned by ThomasArdal in his answer (Async Targeting Pack without Visual Studio 2012 on BuildServer):

Microsoft.BCL

Microsoft.BCL.Async

Microsoft.BCL.Build

Unfortunately the build fails when it is run from TeamCity on my CI server (running Microsoft Windows Server 2003) because async/await keywords are not recognized:

Member modifier 'public' must precede the member type and name

Do you have any clue that could help me to solve this issue ?

Community
  • 1
  • 1
Mercure
  • 13
  • 5

1 Answers1

0

Your CI server must use the latest msbuild.exe (from .net 4.5)

Softlion
  • 12,281
  • 11
  • 58
  • 88
  • My CI server runs on Windows server 2003. The .Net Framework 4.5 is not supported on it: http://msdn.microsoft.com/en-us/library/8z6watww.aspx – Mercure Sep 05 '13 at 12:33
  • A better way to say it is msbuild from Visual Studio 2012, you can use the latest msbuild without the latest .NET. – Scott Chamberlain Sep 05 '13 at 14:26
  • Ok I moved to an other server which runs Windows Server 2008 R2 SP1. I have installed the latest version of the Framework 4.5 on this machine (published on 10/9/2012) but now I get the following error: 'Microsoft.Runtime.CompilerServices.YieldAwaitable.YieldAwaiter' does not implement 'System.Runtime.CompilerServices.INotifyCompletion' which is supposed to happen in 4.0. My teamCity is configured to use the MSBuildVersion of the 4.5 Framework. Any clue ? – Mercure Sep 05 '13 at 15:23
  • Found a solution in http://stackoverflow.com/questions/2730765/net-4-0-build-issues-on-ci-server – Mercure Sep 06 '13 at 14:30