How to bootstrap .NET 3.5 SP1 with msbuild? following found instructions doesn't work

巧了我就是萌 提交于 2019-12-30 09:07:41

问题


I'm trying to use msbuild GenerateBootstrapper task to distribute a .net application with the framework, without the need of internet connection to install it.

I've found many posts that all lead to the same instructions in here:

Enable Samesite for the .NET Framework 3.5 SP1 bootstrapper

After following the instructions, I still cannot generate the bootstrapper. The more obvious issue I can see is that extracting the files from dotNetFx35.exe does not extract the same list of files and folders than shown on the readme file (for example TOOLS folders are not there).

What am I doing wrong? Am I following old instructions?

msbuild errors are as follows:

C:\svn\GII\5.1b\Installer\src\Installer\Installer.wixproj(103,5): error MSB3152: The install location for prerequisites has not been set to 'component vendor's web site' and the file 'DotNetFX35SP1\TOOLS\clwireg.exe' in item '.NET Framework 3.5 SP1' can not be located on disk. See Help for more information.
C:\svn\GII\5.1b\Installer\src\Installer\Installer.wixproj(103,5): error MSB3152: The install location for prerequisites has not been set to 'component vendor's web site' and the file 'DotNetFX35SP1\TOOLS\clwireg_x64.exe' in item '.NET Framework 3.5 SP1' can not be located on disk. See Help for more information.
C:\svn\GII\5.1b\Installer\src\Installer\Installer.wixproj(103,5): error MSB3152: The install location for prerequisites has not been set to 'component vendor's web site' and the file 'DotNetFX35SP1\TOOLS\clwireg_ia64.exe' in item '.NET Framework 3.5 SP1' can not be located on disk. See Help for more information.
C:\svn\GII\5.1b\Installer\src\Installer\Installer.wixproj(103,5): warning MSB3165: The value of the 'PublicKey' attribute in '.NET Framework 3.5 SP1' does not match that of file 'C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\DotNetFX35SP1\dotNetFX30\XPSEPSC-x86-en-US.exe'.
C:\svn\GII\5.1b\Installer\src\Installer\Installer.wixproj(103,5): warning MSB3165: The value of the 'PublicKey' attribute in '.NET Framework 3.5 SP1' does not match that of file 'C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\DotNetFX35SP1\dotNetFX30\XPSEPSC-amd64-en-US.exe'.
C:\svn\GII\5.1b\Installer\src\Installer\Installer.wixproj(103,5): error MSB3152: The install location for prerequisites has not been set to 'component vendor's web site' and the file 'DotNetFX35SP1\dotNetMSP\x86\NetFX2.0-KB948609-v6001-x86.msu' in item '.NET Framework 3.5 SP1' can not be located on disk. See Help for more information.
C:\svn\GII\5.1b\Installer\src\Installer\Installer.wixproj(103,5): error MSB3152: The install location for prerequisites has not been set to 'component vendor's web site' and the file 'DotNetFX35SP1\dotNetMSP\x86\NetFX3.0-KB948610-v6001-x86.msu' in item '.NET Framework 3.5 SP1' can not be located on disk. See Help for more information.
C:\svn\GII\5.1b\Installer\src\Installer\Installer.wixproj(103,5): error MSB3152: The install location for prerequisites has not been set to 'component vendor's web site' and the file 'DotNetFX35SP1\dotNetMSP\x64\NetFX2.0-KB948609-v6001-x64.msu' in item '.NET Framework 3.5 SP1' can not be located on disk. See Help for more information.
C:\svn\GII\5.1b\Installer\src\Installer\Installer.wixproj(103,5): error MSB3152: The install location for prerequisites has not been set to 'component vendor's web site' and the file 'DotNetFX35SP1\dotNetMSP\x64\NetFX3.0-KB948610-v6001-x64.msu' in item '.NET Framework 3.5 SP1' can not be located on disk. See Help for more information.

Any help would be really appreciated!


回答1:


I've resolved the issue. The link provided by Microsoft's documentation to download the full .net framework 3.5 SP1 is not correct. The package from .NET Framework 3.5 SP1 full install package does have the expected files inside.




回答2:


take a look at this

Hello All,

Let me shed some light on this issue.

We are still investigating why the Public Key Tokens of the actual files are different than what we have in the product.xml files. Needless to say, something slipped by despite our testing. You have my apologies for that.

The good news is that the bootstrapper works quite well in this situation. When we build, we compare the digital signature of the file on disk to the PublicKeyToken listed in the product.xml or package.xml. If they are different, then we use the value of the actual file on disk, since this is what will be copied and/or posted in a "Same Location as my Application" scenario. This way, the bootstrapper works correctly.

We do show a build warning, to alert the developer / builder that something is different than was expected. This has value in the "Download from the Component Vendor's Web Site" scenario because if the file being downloaded from the Component vendor is the same as is on disk, then the download will fail the certificate test and won't install. Fortunately, in this case, in that scenario only the dotnetfx35setup.exe file is actually downloaded from Microsoft, and that key is correct.

If you wish to get rid of the build warnings, you can update your PublicKey in the Product.XML with the following value: 3082010A0282010100A2DB0A8DCFC2C1499BCDAA3A34AD23596BDB6CBE2122B794C8EAAEBFC6D526C232118BBCDA5D2CFB36561E152BAE8F0DDD14A36E284C7F163F41AC8D40B146880DD98194AD9706D05744765CEAF1FC0EE27F74A333CB74E5EFE361A17E03B745FFD53E12D5B0CA5E0DD07BF2B7130DFC606A2885758CB7ADBC85E817B490BEF516B6625DED11DF3AEE215B8BAF8073C345E3958977609BE7AD77C1378D33142F13DB62C9AE1AA94F9867ADD420393071E08D6746E2C61CF40D5074412FE805246A216B49B092C4B239C742A56D5C184AAB8FD78E833E780A47D8A4B28423C3E2F27B66B14A74BD26414B9C6114604E30C882F3D00B707CEE554D77D2085576810203010001

Use this for both of the XPSEPSC* files.

I hope this helps to clarify things, and we are going to continue to follow-up. Thank you for reporting this, it will help us keep more people from running into this.

Sincerely,

David Guyer Program Manager - Setup Projects Visual Studio



来源:https://stackoverflow.com/questions/3626672/how-to-bootstrap-net-3-5-sp1-with-msbuild-following-found-instructions-doesnt

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!