Alex Zhukovskiy
Alex Zhukovskiy

Reputation: 10015

AppVeyor error while building csproj

I have a mixed solution which is using some .net core dlls and one .Net Framework 4.5.2 dll. My VS2015U3 is fine with this solution but when I'm trying to build it with AppVeyor I'm getting an error:

"C:\projects\remoteclient\RemoteClient\RemoteClient.sln" (default target) (1) -> "C:\projects\remoteclient\RemoteClient\test\RemoteClient.WcfTest\RemoteClient.WcfTest.csproj" (default target) (5) -> "C:\projects\remoteclient\RemoteClient\src\RemoteClient.Client\RemoteClient.Client.csproj" (default target) (6) ->
C:\projects\remoteclient\RemoteClient\src\RemoteClient.Client\RemoteClient.Client.csproj(1,1): error MSB4041: The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format.

However, my file is obiosly in 2003 format (link for a reference):

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
...

Here is link to AppVeyor build.

How can it be fixed?

Upvotes: 2

Views: 637

Answers (1)

Ilya Finkelsheyn
Ilya Finkelsheyn

Reputation: 2881

I see that your solution is built in Visual Studio 2017. I enabled beta Visual Studio 2017 RC build worker image for you on AppVeyor. To use it you have to set image: Visual Studio 2017 RCin appveyor.yml or select image: Visual Studio 2017 RC in Environment tab in UI. Note that build start is slower with beta image, it is expected.

If you are not familiar with appveyor.yml structure I strongly recommend to use UI for initial configuration and then use Export YAML menu to create initial appveyor.yml.

Also please ensure that you can successfully build your solution locally with msbuild (not VS).

Upvotes: 4

Related Questions