WCFMetadata tag in ItemGroup element of silverlight project file

This line appears in the cs.project file of the Silverlight application.

<ItemGroup> <WCFMetadata Include="Service References\" /> </ItemGroup> 

Just wondering if anyone knows how this works and why it is.

Thanks.

+4
source share
2 answers

When you right-click on the Service References node in Solution Explorer and select Add Service Reference.. , you can add the service link to your silverlight project. You will see some additional node in your csproject project and in the "Service Links" folder you will see a bunch of auto-generated files that will help you easily connect to the service and call methods

Then your project will look something like this.

  <ItemGroup> <WCFMetadata Include="Service References\" /> </ItemGroup> <ItemGroup> <WCFMetadataStorage Include="Service References\ServiceReference1\" /> </ItemGroup> <ItemGroup> <None Include="Service References\ServiceReference1\Foo-Web-Services-Bar.disco" /> </ItemGroup> <ItemGroup> <None Include="Service References\ServiceReference1\configuration91.svcinfo" /> </ItemGroup> <ItemGroup> <None Include="Service References\ServiceReference1\configuration.svcinfo" /> </ItemGroup> <ItemGroup> <None Include="Service References\ServiceReference1\Reference.svcmap"> <Generator>WCF Proxy Generator</Generator> <LastGenOutput>Reference.cs</LastGenOutput> </None> </ItemGroup> 

Yours is empty because you have not added any service links

+4
source

In my experience, these lines appear in csproj when you try to add a link to the WCF service

  • Right click project name
  • Select "Add Service Link" (I use non-English VS, so there might be something like this)

From the state of your lines, I think you have no active link.
But VS has already created a subfolder where it will store all the files needed to determine future links. (Look at the project folder and you will find the "Service Links" folder

+2
source

All Articles