与.Net V4.0 Framework不同的VS2013 MSBuild错误。 [英] VS2013 MSBuild error that does not occur with .Net V4.0 Framework.

查看:79
本文介绍了与.Net V4.0 Framework不同的VS2013 MSBuild错误。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在干净的Windows 7 VM上安装了VS2013。 V4.0 .Net Framework也安装在系统中。以下是一个示例构建脚本,演示了我使用更大的脚本时遇到的问题



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

<!-- *****************************-->
     <!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> 





如果我尝试使用VS2013 MSBuild可执行文件运行代码段,则会出现以下错误:



无法加载项目文件。引用未声明的实体'e_DefaultValue'。



如果我使用.Net v4.0 Framework版本运行它,它会正确显示消息。 />


这是VS2013 MSBuild还需要定义其他内容的问题吗?



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?

推荐答案

(MsgStr)' / >
< / Target >

< / Project > ;
(MsgStr)' /> </Target> </Project>





如果我尝试使用VS2013 MSBuild可执行文件运行代码段,则会出现以下错误:



无法加载项目文件。引用未声明的实体'e_DefaultValue'。



如果我使用.Net v4.0 Framework版本运行它,它会正确显示消息。 />


这是VS2013 MSBuild还需要定义其他内容的问题吗?



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?


Microsoft改变了MSBuild处理DTD处理的方式。将不得不重写脚本。以下是他们的回复:



https://connect.microsoft.com/VisualStudio/feedback/details/981375/wc-10-17-vs2013-msbuild-error-那不会发生与网络v4-0框架



底线:删除DOCTYPE部分,创建一个PropertyGroup部分并用值填充它你在DOCTYPE部分。
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.


这篇关于与.Net V4.0 Framework不同的VS2013 MSBuild错误。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆