Click here to Skip to main content
15,940,173 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I have VS2013 installed on a "clean" Windows 7 VM. Also installed in the system is the V4.0 .Net Framework. The following is a sample build script that demonstrates a problem I am having with a much larger script

XML
<!-- *****************************-->
     <!DOCTYPE Project [
       <!ENTITY e_DefaultValue "Hello World">
     ]>

  <Project DefaultTargets="Display" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <PropertyGroup>
      <MsgStr>&e_DefaultValue;</MsgStr>
    </PropertyGroup>

    <Target Name="Display">
      <Message Text='$(MsgStr)' />
    </Target>

 </Project> 


If I attempt to run the snippet using the VS2013 MSBuild executable, I get the following error:

The project file could not be loaded. Reference to undeclared entity 'e_DefaultValue'.

If I run it with the .Net v4.0 Framework version, it displays the message correctly.

Is this an issue where the VS2013 MSBuild needs something else defined?
Posted
Updated 26-Aug-14 4:09am
v2

1 solution

Microsoft has changed the way MSBuild handles DTD processing. Will have to rewrite scripts. Here's their response:

https://connect.microsoft.com/VisualStudio/feedback/details/981375/wc-10-17-vs2013-msbuild-error-that-does-not-occur-with-net-v4-0-framework

Bottom line: Remove DOCTYPE section, create a PropertyGroup section and populate it with the values you had in the DOCTYPE section.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900