简体   繁体   English

每个版本的wsp文件大小不同

[英]Different wsp file size each build

I have a SharePoint project running in VS.net 2008. Each time when I build the wsp using WSP builder, the wsp file always turns out to be of different size. 我有一个在VS.net 2008中运行的SharePoint项目。每次当我使用WSP构建器构建wsp时,该wsp文件总是大小不同。 Nothing was changed between builds. 两次构建之间没有任何变化。 This happens on all machines. 这在所有计算机上都会发生。

I was wondering what could be the reason behind it? 我想知道背后的原因是什么? Does it have something to do with the way the files were packaged? 它与文件打包方式有关吗?

Thanks. 谢谢。

UPDATE 更新
Below are the steps I performed to get this issue: 以下是我为解决此问题而执行的步骤:

    -build project. -建立项目。
    -build wsp file. -生成wsp文件。
    -check wsp file size. -检查wsp文件大小。
    -delete wsp file. -删除wsp文件。

Repeat that for n times on the same project. 在同一项目上重复n次。

The variation of wsp file size is no more than 100 bytes. wsp文件大小的变化不超过100个字节。 But if I build the same project using the same tool on the same machine, I would thought that the wsp file to come out the same size each time. 但是,如果我在同一台机器上使用相同的工具构建相同的项目,我会认为wsp文件每次输出的大小相同。

More update I have done a file comparison between 2 wps files using a file diff tool (after renaming the wsp files into cabs and extracting the files). 更多更新我已经使用文件差异工具在2个wps文件之间进行了文件比较(将wsp文件重命名为cabs并提取文件后)。 There are 2 differences: one in the DLL file (which I can't read its all gibberish), and the other one in manifest file (just a difference in the time of build). 有2个区别:一个在DLL文件中(我看不清它的所有乱码),另一个在清单文件中(只是构建时间不同)。

File size wise, all file sizes match up. 文件大小明智,所有文件大小匹配。 Might have been a hashing thing? 可能是哈希算什么?

It might be caused by visual studio incrementing the version number each build. 这可能是由于Visual Studio每次构建都增加了版本号所致。 Which in turn leads to a different wsp file size because of the cab compression. 由于cab压缩,这又导致不同的wsp文件大小。

Check the Properties/AssemblyInfo.cs, change the version attribute from 1.0.0.* to something static (1.0.0.0) 检查Properties / AssemblyInfo.cs,将version属性从1.0.0。*更改为static(1.0.0.0)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM