VS2012 $(存在)只接受标量值 [英] VS2012 $(exists) only accepts scalar values

查看:786
本文介绍了VS2012 $(存在)只接受标量值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好吧,这是不是一个编程错误,更多的是生成错误的。我从未有过太多的理由让我的手脏建立,所以这个错误是莫名其妙我。



我曾尝试使用Google这个错误很少结果,答复要么是不存在的,不可理解或不适用。



的错误是:

 的存在功能只接受一个标值,但是它的参数
$( PackageSourceManifest)的计算结果为[相同的路径]; [相同的路径],这是不是一个
标量值。 C:\Program文件(x86)\MSBuild\Microsoft\VisualStudio\
v10.0\Web\Microsoft.Web.Publishing.targets

无论如何,我挖成Microsoft.Web.Publishing.targets,我发现它的示数的线。我有详细的基础上,我正在试图看看我能找到任何伸出,我认为我可以解决。



没有。



我用Google搜索如何改变包源清单,我已经在构建属性看,我已经寻找源清单,甚至东西,上面写着源清单,什么都没有。也许我期待太硬或也许我只是不知道要寻找什么。



这是如何解决这一问题,什么造成的?


解决方案
<任何想法。p>打开 .csproj的文件,并查找任何重复导入标记



在我的情况下的.csproj有两行这样的:

 <导入项目=$(MSBuildExtensionsPath)\Microsoft\VisualStudio 
\v10.0\ WebApplications\Microsoft.WebApplication.targets/>



删除其中的一个解决了这一问题。


Okay, this is more of a build error than a programming error. I have never had much reason to get my hands dirty with builds, so this error is baffling me.

I have tried googling this error with little results, the responses are either nonexistent, incomprehensible or not applicable.

The error is:

The "exists" function only accepts a scalar value, but its argument 
"$(PackageSourceManifest)" evaluates to "[same path];[same path]" which is not a 
scalar value. C:\Program Files(x86)\MSBuild\Microsoft\VisualStudio\
                                   v10.0\Web\Microsoft.Web.Publishing.targets

Anyway, I dug into Microsoft.Web.Publishing.targets and I found the line where it is erroring out. I have verbose builds on where I was attempting to see if I could find anything that stuck out to me that I could fix.

Nothing.

I have googled how to change Package Source Manifests, I have looked in Build Properties, I have searched for a source manifest or even something that says source manifest, nothing. Maybe I am looking too hard or maybe I just don't know what to look for.

Any ideas on how to fix this and what caused this?

解决方案

Open your .csproj file and look for any duplicated import tag.

In my case the .csproj had two lines like this:

<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio
\v10.0\WebApplications\Microsoft.WebApplication.targets" />

Remove one of them fixed the problem.

这篇关于VS2012 $(存在)只接受标量值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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