Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vb.net 在项目文件中设置TargetFrameworkVersion后,未定义System.Runtime.Versioning.TargetFrameworkAttribute_Vb.net_Clr_.net 4.5 - Fatal编程技术网

Vb.net 在项目文件中设置TargetFrameworkVersion后,未定义System.Runtime.Versioning.TargetFrameworkAttribute

Vb.net 在项目文件中设置TargetFrameworkVersion后,未定义System.Runtime.Versioning.TargetFrameworkAttribute,vb.net,clr,.net-4.5,Vb.net,Clr,.net 4.5,我正在尝试在两个.net版本之间对项目进行多目标定位。我像这样编辑了.vbproj文件 <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'GP2010|AnyCPU'"> <ReferencePath>\\server\references\newcrystal</ReferencePath>3 <TargetFrameworkVersion>v2.0</Target

我正在尝试在两个.net版本之间对项目进行多目标定位。我像这样编辑了.vbproj文件

<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'GP2010|AnyCPU'">
 <ReferencePath>\\server\references\newcrystal</ReferencePath>3
 <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
 <OutputPath>bin\GP2010\</OutputPath>
 <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'GP2015|AnyCPU'">
 <ReferencePath>\\server\references\gp2015</ReferencePath>
 <TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
 <OutputPath>bin\GP2015\</OutputPath>
 <Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
我在%temp%中打开该文件,没有发现任何错误

Option Strict Off
Option Explicit On

Imports System
Imports System.Reflection
        <Assembly: Global.System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.5.1", FrameworkDisplayName:="")>
尝试让运行时接收它,但这没有什么区别

我还尝试从这个问题中添加GenerateTargetFrameworkMonitorAttribute,但似乎没有帮助,但我可能放错了位置

Option Strict Off
Option Explicit On

Imports System
Imports System.Reflection
        <Assembly: Global.System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.5.1", FrameworkDisplayName:="")>
 Imports System.Runtime.Versioning