I have a bunch of service references in my local drive that I want to include in a Visual Studio 2010 project.
But when I select Include in Project command they are included as folders and I cannot find a way to tell Visual Studio that they are Service References.
Is there a way to achieve this? Something like a Include Existing Service Reference?
I had to manually edit the project xml and add node like the following for each server reference:
<ItemGroup>
<WCFMetadataStorage Include="Service References\NameOfYourReference\" />
<WCFMetadataStorage Include="Service References\NameOfYourOtherReference\" />
//more services
</ItemGroup
I also needed to change the Reference.cs compile node, since it seems that VS2010 automatically generated a Reference1.cs file when I included the folder in the project. So I had to remove the Reference1.cs from the xml and ensure the following XML:
<Compile Include="Service References\NameOfYourReference\Reference.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Reference.svcmap</DependentUpon>
</Compile>
This seems a lot of manual work, but as I said in my case there were a lot of services so for me this was better than adding again all references through VS dialogs
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With