2

So this article talks about an awesome way of using XSD and LINQ to process XML data. It's all good and fun, but the author claims that he is no longer interested in maintaining the project on CodePlex. In addition, the NuGet package requires manual edit of the CS project file

<LinqToXsdBinDir Condition="'$(LinqToXsdBinDir)' == ''">$(SolutionDir)\LinqToXSD\</LinqToXsdBinDir>

to be added to each of the PropertyGroups (Build/Release). So why would Microsoft leave the LinqToXsdSchema as a build action in VS 2013? Is there any other use of this build action?

Community
  • 1
  • 1
Darek
  • 4,687
  • 31
  • 47

1 Answers1

1

Why would you claim that Microsoft does? I don't see how they're involved in this. If the action is defined in the project file or a targets file the project depends on, it's shown. That just how MsBuild works. <Import Project="$(LinqToXsdBinDir)\LinqToXsd.targets" /> is what will add the Build Action to the dropdown.

These lines to be exact:

 <!-- This ItemGroup is needed to make sure that LinqToXsdSchema and LinqToXsdConfiguration are available in VisualStudio-->  
 <ItemGroup>
   <AvailableItemName Include="LinqToXsdSchema" />   
   <AvailableItemName Include="LinqToXsdConfiguration" />
 </ItemGroup>

You can view the targets file here.

Remove the .targets file from your project and remove the mention of "LinqToXsdSchema" from your items in the project file. It might also be registered in your local MsBuild folder and load automatically for all projects, in that case remove the .targets file from your MsBuild installation.

Of course there is no use to the build action, unless there is another tools that picked the same name for the action.

jessehouwing
  • 106,458
  • 22
  • 256
  • 341
  • 1
    (facepalm) Duh! Now I understand it better, the option is available only if the package is added to the project ... :) Thanks for helping out. – Darek Jun 26 '14 at 18:36