Reputation: 2752
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?
Upvotes: 30
Views: 86405
Reputation: 21
Visual Studio 2022.
Set Protection Level for Solution: Right click on Solution > Properties > ProtectionLevel . . . set to DontSaveSensitive (or whichever you determine)
Set Protection Level for Package: Open Pacakge in Design View > Right click on an area outside of Container(s) and/or Task(s) > Select Properties > ProtectionLevel . . . set to DontSaveSensitive (or whichever you chose, just make sure the two are in synch - problem solved).
Upvotes: 2
Reputation: 5396
Close the Visual Studio
This is for Visual Studio 2019.
Change this for the project causing issue in the *.dtproj
file
<SSIS:Property SSIS:Name="ProtectionLevel">0</SSIS:Property>
delete the .vs/ bin/ and obj/ folders
Then rebuild your solution
Upvotes: 0
Reputation: 6729
I received this error with a new dtsx that I'd created in a solution that had others.
I removed the new package and re-added it, and it was fine.
Upvotes: 7
Reputation: 2752
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:
Upvotes: 53