In Visual Studio 2008 Team System, this is my warning:
Different checksum values given for '<some folder>' ...\Visual Studio 2008\Projects\...
\Debug\...\SomeFile.g.cs
The offending line in the SomeFile.g.cs
file is:
#pragma checksum "..\..\..\..\..\..\...\SomeFile.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "A18BC47B27EC4695C69B69F1831E3225"
I deleted all of the *.g.cs
files in the Solution and rebuilt and all of the warnings came back. What the hell is this?
It looks like Visual Studio doesn't handle very long paths correctly when generating GUIDs. I confirmed this by adding two different files into a long path and reproduced the behavior you are seeing. If you look in the offending SomeFile.g.cs files you will notice that the guids for the two files are the same. Apparently Visual Studio only checks the first x characters of the file path when generating this GUID.
C:\Users\Developer\Documents\Visual Studio 2008\Projects\WpfApplication1\WpfApplication1\obj\Debug\LongFolderNameLongFolderNameLongFolderName\LongFolderNameLongFolderNameLongFolderName\LongFolderNameLongFolderNameLongFolderName\SomeFileName1.g.cs(1,1): warning CS1697: Different checksum values given for 'c:\Users\Developer\Documents\Visual Studio 2008\Projects\WpfApplication1\WpfApplication1\LongFolderNameLo'
C:\Users\Developer\Documents\Visual Studio 2008\Projects\WpfApplication1\WpfApplication1\obj\Debug\LongFolderNameLongFolderNameLongFolderName\LongFolderNameLongFolderNameLongFolderName\LongFolderNameLongFolderNameLongFolderName\SomeFileName2.g.cs(1,1): (Related location)
From the .g.cs files:
#pragma checksum "..\<snipped>\SomeFileName1.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "F21D94943016E57893CEB405BE12ADEA"
#pragma checksum "..\<snipped>\SomeFileName2.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "C67F2F8C841E2C338E5FCDC5037E8454"
As for a solution, I guess you could either shorten your paths or (more likely) ignore these warnings. :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With