gpt4 book ai didi

c# - 错误 CS0246 : The type or namespace name 'AssemblyFileVersion' could not be found

转载 作者:行者123 更新时间:2023-11-30 18:32:47 25 4
gpt4 key购买 nike

enter image description here Properties\AssemblyInfo.cs(41,12):错误 CS0246:找不到类型或命名空间名称“AssemblyFileVersion”。

我在使用 TFS 构建代理时遇到此错误,但使用来自工作室的 .csproj 构建时没有这个问题。

有什么我想念的吗?我的 assemblyinfo 文件如下所示:

// --------------------------------------------------------------------------------------------------------------------

using System.Reflection;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("MyLibrary")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("My Compamy")]
[assembly: AssemblyProduct("MyLibrary")]
[assembly: AssemblyCopyright("Copyright © x 2013")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("09634b91-c3b1-45da-88a8-dfa7cd7950f5")]

// Version information for an assembly consists of the following four values:
// Major Version
// Minor Version
// Build Number
// Revision
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.13231.2")]

最佳答案

我终于搞定了。我在 TFS 中有一个 NuGet 版本控制包,它正在检查 AssemblyInfo 类并重新添加 AssemblyFileVersion 属性。我关闭了此功能,因为 .NET CF 不支持该属性。

关于c# - 错误 CS0246 : The type or namespace name 'AssemblyFileVersion' could not be found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18317152/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com