2014-09-05 55 views
0

我正在与许多项目一起使用.NET解决方案。其中一个项目叫做DAL.EF。在Visual Studio 2012中,我右键单击该项目并转到它的属性。无法解析符号'属性'

一旦那里我点击资源选项卡(在左边)并添加我的两个Aspose库许可证密钥。

resource

在我的代码,我想获得的许可证密钥,所以我做的:

switch (license) 
{ 
    case LicenseType.AsposePdfKit: 
     licenseContent = Properties.Resources.AsposePdfKit; 
     break; 
    case LicenseType.AsposeWords: 
     licenseContent = Properties.Resources.AsposeWords; 
     break; 
    default: 
     throw new Exception("Wrong License type passed into Aspose!"); 
     break; 
} 

但在这两条线在那里我试图访问Properties我得到以下错误:

error

我在做什么错?

+0

检查您的Resources.Designers.cs。并尝试编写完整的名称空间 – Lee 2014-09-05 10:03:29

+0

在“资源选项卡”中添加属性后保存了吗? – 2014-09-05 10:04:22

+0

@pwas yep我做到了。 – Ciwan 2014-09-05 10:09:46

回答

4

想通了!我所要做的就是将资源上的Access Modifier从Internal更改为Public

enter image description here