I am trying to build a .NET project that I have no idea how it works through MSbuild plugin in Jenkins.Anyhow, this targets framework 3.5 and that what I use in my build server. As I build I get the following error with no idea how to resolve..
"c:\jenkins\workspace\Master.sln" (default target) (1) ->
"c:\jenkins\workspace\FactivaWebUI01-Fornax\UIVirtualServices\UIVirtualServices.csproj" (default target) (16) ->
(CoreCompile target) ->
CSP\Communicator\Authors\CommunicatorAuthorService.cs(36,78): error CS0241: Default parameter specifiers are not permitted
CSP\Communicator\Authors\CommunicatorAuthorService.cs(66,33): error CS0241: Default parameter specifiers are not permitted
CSP\Communicator\Authors\CommunicatorAuthorService.cs(67,29): error CS0241: Default parameter specifiers are not permitted
CSP\Communicator\Authors\CommunicatorAuthorService.cs(68,29): error CS0241: Default parameter specifiers are not permitted
CSP\Communicator\Authors\CommunicatorAuthorService.cs(69,28): error CS0241: Default parameter specifiers are not permitted
CSP\Communicator\Authors\CommunicatorAuthorService.cs(70,43): error CS0241: Default parameter specifiers are not permitted
CSP\Communicator\Authors\CommunicatorAuthorService.cs(71,41): error CS0241: Default parameter specifiers are not permitted
CSP\Communicator\Authors\CommunicatorAuthorService.cs(72,37): error CS0241: Default parameter specifiers are not permitted
CSP\Communicator\Authors\CommunicatorAuthorService.cs(73,56): error CS0241: Default parameter specifiers are not permitted
CSP\Communicator\Authors\CommunicatorAuthorService.cs(156,85): error CS0241: Default parameter specifiers are not permitted
CSP\Communicator\Authors\ICommunicatorAuthorService.cs(32,33): error CS0241: Default parameter specifiers are not permitted
CSP\Communicator\Authors\ICommunicatorAuthorService.cs(33,29): error CS0241: Default parameter specifiers are not permitted
CSP\Communicator\Authors\ICommunicatorAuthorService.cs(34,29): error CS0241: Default parameter specifiers are not permitted
CSP\Communicator\Authors\ICommunicatorAuthorService.cs(35,28): error CS0241: Default parameter specifiers are not permitted
CSP\Communicator\Authors\ICommunicatorAuthorService.cs(36,43): error CS0241: Default parameter specifiers are not permitted
CSP\Communicator\Authors\ICommunicatorAuthorService.cs(37,41): error CS0241: Default parameter specifiers are not permitted
CSP\Communicator\Authors\ICommunicatorAuthorService.cs(38,37): error CS0241: Default parameter specifiers are not permitted
CSP\Communicator\Authors\ICommunicatorAuthorService.cs(39,56): error CS0241: Default parameter specifiers are not permitted
CSP\Communicator\Charts\CommunicatorChartService.cs(54,68): error CS0241: Default parameter specifiers are not permitted
CSP\Communicator\Charts\CommunicatorChartService.cs(54,109): error CS0241: Default parameter specifiers are not permitted
184 Warning(s)
20 Error(s)
the funny thing is that when I use visual studio 2013 to build the same project it builds just about fine.
csproj file :
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<StartPageUrl>
</StartPageUrl>
<StartAction>CurrentPage</StartAction>
<AspNetDebugging>True</AspNetDebugging>
<SilverlightDebugging>False</SilverlightDebugging>
<NativeDebugging>False</NativeDebugging>
<SQLDebugging>False</SQLDebugging>
<ExternalProgram>
</ExternalProgram>
<StartExternalURL>
</StartExternalURL>
<StartCmdLineArguments>
</StartCmdLineArguments>
<StartWorkingDirectory>
</StartWorkingDirectory>
<EnableENC>False</EnableENC>
<AlwaysStartWebServerOnDebug>True</AlwaysStartWebServerOnDebug>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
</Project>
So as per suggestion, I try and build it with MsBuild 4.0 only to receive the following error:
(GenerateSerializationAssembliesForAllTypes target) ->
SGEN : error : An attempt was made to load an assembly with an incorrect format: C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorlib.dll. [c:\jenkins\workspace\FactivaWebUI01-Fornax\MessageModel\MessageModel.csproj]
129 Warning(s)
1 Error(s)