I'm developing an application which is to be deployed with ClickOnce. After downgrading from .NET 4.5 to .NET 4.0 and replacing repairing bad references, now I have problem with deployment package. Some files, most importantly System.Net.Http.dll
are not deployed with the application. I've done some checks but can't conclude why exactly this happens. My suspicion is that package is created with expectation that this assembly already exists on target machine. This would be reasonable if target framework was .NET 4.5, but not now that it's .NET 4. Strangely, System.Net.Http.Extensions.dll
gets deployed correctly.
Settings and version numbers are same for both files:
References are made to same package:
<Reference Include="System.Net.Http, Version=2.2.13.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..packagesMicrosoft.Net.Http.2.2.13lib
et40System.Net.Http.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="System.Net.Http.Extensions, Version=2.2.13.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..packagesMicrosoft.Net.Http.2.2.13lib
et40System.Net.Http.Extensions.dll</HintPath>
</Reference>
Target platform is .NET 4, and deployment prerequisite is also .NET 4 and a KB update.
File is not even displayed in Application Files dialog:
Any ideas? I might just try and deploy the assembly as a content file if all else fails.
Removing and re-adding the reference did not make a difference.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…