views:

113

answers:

1

I am using MSbuild to publish my webservices projects on the command line using the following command:

msbuild.exe MyWebservicesProjectPath\Services.csproj /t:ResolveReferences;_CopyWebApplication /p:Configuration=Release;BuildingProject=true;WebProjectOutputDir=c:\inetpub\wwwroot\webserviceDest;OutDir=c:\inetpub\wwwroot\webserviceDest\

Everything publishes fine except for .xsd files that are located in ProjectName\WebServices\Schema folder. what's happening here?

Thanks.

+2  A: 

In your solution check the property of your .xsd file.

The default setting of this type of artifact for the "Copy to Output Directory" is "Do Not Copy".

Setting this to "Copy always" (or "Copy if newer") should fix your problem.

Project file sample

<ItemGroup>
    <None Include="XMLSchema1.xsd">
        <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </None>
</ItemGroup>
Filburt