Search code examples
ssissql-server-2012

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


I have this annoying problem where it says that the project and package have different protectionlevels. Which is not true, they are all the same set to "EncryptSensitiveWithUserKey".

I tried this Protection level changed mid project - now project won't build and some other solutions, non worked.

Whenever I want to build or rebuild it says:

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

In "View code" there is no "DTS:ProtectionLevel="X"" when set to "EncryptSensitiveWithUserKey". And in the project's property, it's set to "EncryptSensitiveWithUserKey". I also tried setting everything to "DontSaveSensitive", which also gave me the same error.

How to fix this?

enter image description here enter image description here


Solution

  • Solution was found by the help of billinkc in the comments above and by following this solution: Protection level changed mid project - now project won't build

    Problem was that the ProtectionLevel's were not the same. Some were 1 and others 2, while in the properties menu they were all the same.

    So these steps got it fixed:

    1. Open your project in Visual Studio (2012).
    2. Right Click your project name in Solution Explorer to the right of the screen and select Properties
    3. Change ProtectionLevel under Security to DontSaveSensitive
    4. Double click a package and under Properties, there should be a list with properties. Change ProtectionLevel under Security to DontSaveSensitive in the Properties (do this for all packages)
    5. Save all Close Visual Studio (2012)
    6. Then go to C:\ProjectName\ProjectName\ And search for the file with .dtproj extension. The one with the type Integration Services Project File and not the one with the type Visual Studio Project User Options File.
    7. Open ProjectName.dtproj with a text editor. I used notepad++, but you can also open it using Visual Studio, and other text editors.
    8. Search for and change EncryptSensitiveWithUserKey to DontSaveSensitive.
    9. Search for and change any number behind this to 0 zero. Search the entire file, there should be more than one if you have more packages than one.
    10. Save the file, close it, go into Visual Studio (2012) and Right Click on the project name in Solution Explorer and click build. Everything should work now.