In case you are working on a different toolset you will need to make changes to the following files:
1) SCE.Cpp.Xbox 360.stub.targets
2) XSLTs\rules.xsl
3) XSLTs\target.xsl
------------------------------------------------------
Editing rules.xsl
------------------------------------------------------
The "rules.xsl" file is responsible for fetching the CL.XML then modifying it by inserting custom property inside and storing it in a path that is accessible to SNDBS Ext. Then the SNDBS VS extension makes sure that the C/C++ property page is fetched from this modified file not the one specified in the VS target file.
[NOTE] For X360 VS uses a specific CL.xml unlike win32 and durango which can be located in the following path:
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Xbox 360\1033\CL.xml
1033 stands for English language id.
Based on the above facts edit the following param and the outputFile:
<xsl:param name="sourceFile">%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\Platforms\Xbox 360\*\CL.xml</xsl:param>
Make sure "<xsl:template match="props:Rule[@Name='Xbox360CL']">"" Name='Xbox360CL' matches the root "name" attribute in the .xml file.
------------------------------------------------------
Editing target.xsl
------------------------------------------------------
Compilation on Xbox can fail if you are using a different Xbox 360 toolset. Check the "target.xsl" for the XML Attribute "sourceFile"
<xsl:param name="sourceFile">%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\Platforms\Xbox 360\Microsoft.Cpp.Xbox 360.targets</xsl:param>
You might be using a different toolset for Xbox 360 than "2010-01". If this is the case Modify the sourceFile attribute to point to correct "Microsoft.Cpp.Xbox 360.targets".
To determine the "Microsoft.Cpp.Xbox 360.targets" being used follow the steps:
a: Make sure SN-DBS support for Xbox 360 is not installed.
b: Increase MSBuild verbosity to maximum. Tools->[Projects and Solutions]->[Build and Run]
c: Perform compilation.
d: Search for "Microsoft.Cpp.Xbox 360.targets" or ".targets", you'll find something like:
1>Target "ClCompile" in file "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\
Platforms\Xbox 360\Microsoft.Cpp.Xbox 360.targets" from project "XXXX" (target "_ClCompile" depends on it):
e: Modify the "target.xsl" accordingly.
NOTE: On some platforms "UseDefaultPropertyPageSchemas" is defined to be false in the platform target file, so the custom
CL.xml will not be loaded causing VisualStudio to not show the "distributable" property in the C/C++ general properties. So following element is never considered as the condition fails, it exists in the target.xsl file.
<ItemGroup Condition="'$(UseDefaultPropertyPageSchemas)' != 'false'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyPageSchema Condition="'$(ConfigurationType)' != 'Utility'" Include="$(SCE_ROOT_DIR)\Common\SN-DBS VC Extensions\2010\Rules\Xbox 360\$(LangID)\Compiler-1_1_0_0.xml;" />
</ItemGroup>
On Cafe and X360 I had to remove Condition="'$(UseDefaultPropertyPageSchemas)' != 'false'" for the CL.xml to be loaded.
------------------------------------------------------
Editing SCE.Cpp.Xbox 360.stub.targets
------------------------------------------------------
Finally you'll need to edit the following statement to match your platformToolset:
<Import Project="SCE\SCE.Cpp.Xbox 360.targets" Condition="'$(PlatformToolset)' == '2010-01'"/>
Condition="'$(PlatformToolset)' == '2010-01'" this condition can be removed but its useful to catch errors that might happen due to configuration problems.