error MSB4102: The value "" of the "Project" attribute in element <Import> is invalid. Parameter "path" cannot have zero length. F#

Kunal Shah

I am getting following error while building project in Team city.

Same project is getting build on Local machine. Local machine has VS 2015 and F# 4.0.

My Project Configuration is as below.

<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />


    <Choose>
        <When Condition="'$(VisualStudioVersion)' == '11.0'">
          <PropertyGroup Condition="Exists('$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\4.0\Framework\v4.0\Microsoft.FSharp.Targets')">
            <FSharpTargetsPath>$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\4.0\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath>
          </PropertyGroup>
        </When>
        <Otherwise>
          <PropertyGroup Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets')">
            <FSharpTargetsPath>$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets</FSharpTargetsPath>
          </PropertyGroup>
        </Otherwise>
      </Choose>
      <Import Project="$(FSharpTargetsPath)" />

This is Console application.

Scott

I had a similar problem a while back, because I was running the local machine with Administrator privileges, but the Visual Studio installer had set environment variables at the user level and not the system level which Administrator uses. So when compiling as Administrator, the FSharpTargetsPath was not being correctly built from environment variables like VisualStudioVersion.

Have a look on your local machine to see what environment variables values are set for VisualStudioVersion at the level you are successfully using (System or User), as well as other variables and then check that these are set at the corresponding level on the Team City machine.

Perhaps you are running as user on your local machine and System on the Team City machine.

See details here: https://stackoverflow.com/a/21420306/152739

I hope this makes sense.

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

错误MSB4102:元素<导入>中“项目”属性的值“”无效。参数“路径”的长度不能为零。F#

来自分类Dev

带有FSCTL_SET_ZERO_DATA的DeviceIoControl返回ERROR_INVALID_PARAMETER

来自分类Dev

尝试安装 buffertools 但出现 MSB4102 错误

来自分类Dev

Can an HTML element have the same attribute twice?

来自分类Dev

WinHttpSendRequest返回ERROR_INVALID_PARAMETER

来自分类Dev

ReadMsgQueue返回ERROR_INVALID_PARAMETER

来自分类Dev

ReadMsgQueue返回ERROR_INVALID_PARAMETER

来自分类Dev

Cannot access f:selectItems variable for passthrough attribute

来自分类Dev

Element.value ===“”和Element.length === 0之间的差异

来自分类Dev

Element.value ===“”和Element.length === 0之间的差异

来自分类Dev

max length for "value" attribute of a html input text field

来自分类Dev

html select element sends value to server without value attribute

来自分类Dev

为什么错误 Invalid length parameter传递给 LEFT 或 SUBSTRING 函数?

来自分类Dev

WIN API ReadFile()返回GetLastError()ERROR_INVALID_PARAMETER

来自分类Dev

WIN API ReadFile()返回GetLastError()ERROR_INVALID_PARAMETER

来自分类Dev

查询蓝牙设备时,SetupDiEnumDeviceInterfaces返回ERROR_INVALID_PARAMETER

来自分类Dev

Windows 读取文件返回 ERROR_INVALID_PARAMETER 87

来自分类Dev

Replacing the content of an element by the value of an arbitrary attribute with XSLT 2.0

来自分类Dev

R - argument is of length zero in if statement

来自分类Dev

如何在Qt Cmake Project中使用QML_IMPORT_PATH?

来自分类Dev

Yii2 SluggableBehavior "attribute" or "value" property must be specified error

来自分类Dev

MLflow:INVALID_PARAMETER_VALUE:模型注册表存储区不支持的URI'./mlruns'

来自分类Dev

wintun:注册环形缓冲区时出现ERROR_INVALID_PARAMETER

来自分类Dev

禁用快速编辑模式时,SetConsoleMode返回ERROR_INVALID_PARAMETER

来自分类Dev

异步ReadDirectoryChangesW失败,错误码为ERROR_INVALID_PARAMETER

来自分类Dev

Find element by attribute

来自分类Dev

运行 Python 脚本时出现 SystemError: Parent module '' not loaded, cannot perform relative import Error

来自分类Dev

"The caller does not have permission" error when creating new project using node gcloud

来自分类Dev

<f:attribute value =“#{some EL expression}}”>通过getAttributes()。containsKey()找不到

Related 相关文章

  1. 1

    错误MSB4102:元素<导入>中“项目”属性的值“”无效。参数“路径”的长度不能为零。F#

  2. 2

    带有FSCTL_SET_ZERO_DATA的DeviceIoControl返回ERROR_INVALID_PARAMETER

  3. 3

    尝试安装 buffertools 但出现 MSB4102 错误

  4. 4

    Can an HTML element have the same attribute twice?

  5. 5

    WinHttpSendRequest返回ERROR_INVALID_PARAMETER

  6. 6

    ReadMsgQueue返回ERROR_INVALID_PARAMETER

  7. 7

    ReadMsgQueue返回ERROR_INVALID_PARAMETER

  8. 8

    Cannot access f:selectItems variable for passthrough attribute

  9. 9

    Element.value ===“”和Element.length === 0之间的差异

  10. 10

    Element.value ===“”和Element.length === 0之间的差异

  11. 11

    max length for "value" attribute of a html input text field

  12. 12

    html select element sends value to server without value attribute

  13. 13

    为什么错误 Invalid length parameter传递给 LEFT 或 SUBSTRING 函数?

  14. 14

    WIN API ReadFile()返回GetLastError()ERROR_INVALID_PARAMETER

  15. 15

    WIN API ReadFile()返回GetLastError()ERROR_INVALID_PARAMETER

  16. 16

    查询蓝牙设备时,SetupDiEnumDeviceInterfaces返回ERROR_INVALID_PARAMETER

  17. 17

    Windows 读取文件返回 ERROR_INVALID_PARAMETER 87

  18. 18

    Replacing the content of an element by the value of an arbitrary attribute with XSLT 2.0

  19. 19

    R - argument is of length zero in if statement

  20. 20

    如何在Qt Cmake Project中使用QML_IMPORT_PATH?

  21. 21

    Yii2 SluggableBehavior "attribute" or "value" property must be specified error

  22. 22

    MLflow:INVALID_PARAMETER_VALUE:模型注册表存储区不支持的URI'./mlruns'

  23. 23

    wintun:注册环形缓冲区时出现ERROR_INVALID_PARAMETER

  24. 24

    禁用快速编辑模式时,SetConsoleMode返回ERROR_INVALID_PARAMETER

  25. 25

    异步ReadDirectoryChangesW失败,错误码为ERROR_INVALID_PARAMETER

  26. 26

    Find element by attribute

  27. 27

    运行 Python 脚本时出现 SystemError: Parent module '' not loaded, cannot perform relative import Error

  28. 28

    "The caller does not have permission" error when creating new project using node gcloud

  29. 29

    <f:attribute value =“#{some EL expression}}”>通过getAttributes()。containsKey()找不到

热门标签

归档