System.configuration.AssemblyConfigurationAttribute对此属性类型无效

时间:2011-06-15 04:32:21

标签: c#

我刚刚将解决方案转换为C#。我猜AssemblyInfo.cs不起作用,我不知道为什么。这是该类的一个片段......我需要修复AssemblyInfo.cs中的更多部分,如下面的示例部分所示:

namespace InstantASP.Common.Application
{

    /// <summary>
    /// Provides reflection methods for working with and obtaining information from .NET assemblies.
    /// </summary>
    /// <remarks></remarks>
    public class AssemblyInfo
    {



[assembly: AssemblyConfiguration("")]
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("")]
[assembly: AssemblyKeyName("")]
...

我得到了程序集属性的错误[assembly:或者上面的任何内容。我不熟悉这个,所以我不知道如何解决这个问题。

我甚至需要这门课吗?

1 个答案:

答案 0 :(得分:0)

在我的Web应用程序中,没有命名空间,也没有类。可能是您需要删除命名空间和类。它应该看起来像:

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

[assembly: AssemblyTitle( "MyTitle" )]
[assembly: AssemblyDescription( "" )]
[assembly: AssemblyConfiguration( "" )]
[assembly: AssemblyCompany( "MyCompany" )]
[assembly: AssemblyProduct( "MyProduct" )]
[assembly: AssemblyCopyright( "Copyright © MyCompany 2011" )]
[assembly: AssemblyTrademark( "" )]
[assembly: AssemblyCulture( "" )]

[assembly: ComVisible( false )]

[assembly: Guid( "3d5900ae-111a-45be-96b3-d9e4606ca790" )]

[assembly: AssemblyVersion( "2.6.*" )]
//[assembly: AssemblyFileVersion( "1.0.0.0" )]