项目一致性检查失败。具有与项目不同的 ProtectionLevel

Project consistency check failed. has a different ProtectionLevel than the project

我有一个恼人的问题,它说项目和包具有不同的保护级别。这不是真的,它们都设置为 "EncryptSensitiveWithUserKey"。

我尝试了这个 Protection level changed mid project - now project won't build 和其他一些解决方案,但没有用。

每当我想构建或重建时,它都会说:

Error 1 Project consistency check failed. The following inconsistencies were detected: Persoon.dtsx has a different ProtectionLevel than the project. CountableUren.dtsx has a different ProtectionLevel than the project. Projecten.dtsx has a different ProtectionLevel than the project. Master_LAB_DSA.dtsx has a different ProtectionLevel than the project. DimProject.dtsx has a different ProtectionLevel than the project. DimPersoon.dtsx has a different ProtectionLevel than the project. DimLookupSources.dtsx has a different ProtectionLevel than the project. InitializeDim.dtsx has a different ProtectionLevel than the project. Master_LAB_ETL.dtsx has a different ProtectionLevel than the project. Master_LAB_DWH.dtsx has a different ProtectionLevel than the project. 0 0

在"View code"中设置为"EncryptSensitiveWithUserKey"时没有"DTS:ProtectionLevel="X""。并且在项目的 属性 中设置为 "EncryptSensitiveWithUserKey"。我还尝试将所有内容设置为 "DontSaveSensitive",这也给了我同样的错误。

如何解决这个问题?

解决方案是在上面评论中的 billinkc 的帮助下找到的,并遵循以下解决方案:Protection level changed mid project - now project won't build

问题是 ProtectionLevel 不一样。有些是 1,有些是 2,而在属性菜单中它们都是一样的。

所以这些步骤得到了修复:

  1. 在 Visual Studio (2012) 中打开您的项目。
  2. 在右侧的解决方案资源管理器中右键单击您的项目名称 屏幕和 select 属性
  3. 将安全下的保护级别更改为 DontSaveSensitive
  4. 双击一个包,在属性下,应该有一个列表 与属性。将 Security 下的 ProtectionLevel 更改为 属性中的 DontSaveSensitive(对所有包执行此操作)
  5. 全部保存关闭Visual Studio (2012)
  6. 然后转到 C:\ProjectName\ProjectName\ 并搜索文件 .dtproj 扩展名。类型为 Integration Services 的那个 项目文件不是类型为Visual Studio的文件 项目用户选项文件.
  7. 用文本编辑器打开 ProjectName.dtproj。我用记事本++,但是 您也可以使用 Visual Studio 和其他文本编辑器打开它。
  8. 搜索 并更改 EncryptSensitiveWithUserKeyDontSaveSensitive
  9. 搜索和更改 这后面的任何数字到 0 零。搜索整个文件,有 如果您有多个包裹,应该不止一个。
  10. 保存文件,关闭它,进入Visual Studio(2012)和右 单击解决方案资源管理器中的项目名称,然后单击构建。 现在应该一切正常了。

我在有其他解决方案的解决方案中创建的新 dtsx 收到此错误。

我删除了新的包,重新添加,没问题。