【发布时间】:2015-10-29 10:03:21
【问题描述】:
我正在尝试使用 Visual Studio Online 中的 Hosted Builder 服务器。 我正在使用 Visual Studio 2015。
在我包含可移植类库 (PCL) 之前,一切正常。 我收到与 AssemblyInfo.cs 文件相关的错误:
Source\TestprojectSolution\TestprojectPCL\Properties\AssemblyInfo.cs (9, 12)
The type or namespace name 'AssemblyTitle' could not be found (are you missing a using directive or an assembly reference?)
Source\TestprojectSolution\TestprojectPCL\Properties\AssemblyInfo.cs (10, 12)
The type or namespace name 'AssemblyDescription' could not be found (are you missing a using directive or an assembly reference?)
Source\TestprojectSolution\TestprojectPCL\Properties\AssemblyInfo.cs (11, 12)
The type or namespace name 'AssemblyConfiguration' could not be found (are you missing a using directive or an assembly reference?)
Source\TestprojectSolution\TestprojectPCL\Properties\AssemblyInfo.cs (12, 12)
The type or namespace name 'AssemblyCompany' could not be found (are you missing a using directive or an assembly reference?)
Source\TestprojectSolution\TestprojectPCL\Properties\AssemblyInfo.cs (13, 12)
The type or namespace name 'AssemblyProduct' could not be found (are you missing a using directive or an assembly reference?)
Source\TestprojectSolution\TestprojectPCL\Properties\AssemblyInfo.cs (14, 12)
The type or namespace name 'AssemblyCopyright' could not be found (are you missing a using directive or an assembly reference?)
Source\TestprojectSolution\TestprojectPCL\Properties\AssemblyInfo.cs (15, 12)
The type or namespace name 'AssemblyTrademark' could not be found (are you missing a using directive or an assembly reference?)
Source\TestprojectSolution\TestprojectPCL\Properties\AssemblyInfo.cs (16, 12)
The type or namespace name 'AssemblyCulture' could not be found (are you missing a using directive or an assembly reference?)
Source\TestprojectSolution\TestprojectPCL\Properties\AssemblyInfo.cs (17, 12)
The type or namespace name 'NeutralResourcesLanguage' could not be found (are you missing a using directive or an assembly reference?)
Source\TestprojectSolution\TestprojectPCL\Properties\AssemblyInfo.cs (29, 12)
The type or namespace name 'AssemblyVersion' could not be found (are you missing a using directive or an assembly reference?)
是否可以将 PCL 与托管构建服务器一起使用?如果是这样,我该怎么做?
【问题讨论】:
-
打开AssemblyInfo.cs文件,右击[assembly: AssemblyTitle("name")]行中的AssemblyTitle属性并选择'Go to definition',请检查引用了哪个程序集.
-
我和蒂姆有同样的问题,所以如果可以的话:去定义对我来说会产生以下结果:Assembly System.Runtime, Version=4.0.20.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (local路径:.nuget\packages\System.Runtime\4.0.20\ref\dotnet\System.Runtime.dll)
-
对不起,我不得不删除 PCL 并用普通的类库替换它。不过还是没有头绪……
-
很想听听答案,Vicky。这里同样的问题。 Resharper 将我带到: // 使用 JetBrains 反编译器进行反编译 // 类型:System.Reflection.AssemblyTitleAttribute // 程序集:mscorlib,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089 // MVID:60C8914F-EAF9-4641-8F9D -EEA81508716F // 组装位置:C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll
标签: tfsbuild portable-class-library azure-devops