Content specified in the class library is not migrated during ClickOnce deployment

I have a WinForms solution, C #, which uses a ClickOnce deployment that causes some problems with resource files. In short, files marked as content in a class library project are not copied to the output tray / folder after deployment using ClickOnce.

Here is the basic structure of the solution (it contains a lot more projects than the ones I list below)

Solution 
 |--Gui 1 Project
 |  |--References
 |  |  |--ClassLibrary
 |--Gui 2 Project
 |  |--References
 |  |  |--ClassLibrary
 |--Main Gui Project  (StartUp Project)
 |  |--References
 |  |  |--Gui 1 Project
 |  |  |--Gui 2 Project
 |  |  |--ClassLibrary
 |  |--Datafile.wav    (Build Action: Content, Copy-if-newer)
 |  |--Mods.xml        (Build Action: Content, Copy-if-newer)
 |  |--VariousSourceFiles.cs
 |--ClassLibrary
 |  |--Resources
 |  |  |--Elements.xml     (Build Action: Content, Copy-if-newer)
 |  |  |--AminoAcids.xml   (Build Action: Content, Copy-if-newer)
 |  |--VariousSourceFiles.cs

Main Gui StartUp MDI, GUI. Debug/Release , , . GUI , Datafile.wav Mods.xml bin/, Elements.xml AminoAcids.xml bin/Resources/. , , .

, Click-Once VS2010, . . , (Elements.xml AminoAcids.xml), , . (Datafile.wav Mods.xml), , .

, Main Gui Project → Properties → Publish → Application Files.. , Datafile.wav Mods.xml . (Elements.xml AminoAcids.xml) . , , , , , . ClickOnce , ? ClassLibrary.dll, .xml .

ClassLibrary → Properties → Publish, , . , , bin/Resources . - , ?

(.xml) Build Action: Content, Embedded Resources, // .

+5
1

, , . Microsoft , , . .

: http://msdn.microsoft.com/en-us/library/6fehc36e(v=vs.110).aspx

: Mage.exe

1. .

, , , v1.0.0.0.

2. , .

mage -u v1.0.0.0\Application.manifest -FromDirectory v1.0.0.0

, -.

3. XML .

XML Data.xml, .

<file name="Data.xml" hash="23454C18A2DC1D23E5B391FEE299B1F235067C59" hashalg="SHA1" asmv2:size="39500" /> 

1. .

<file name="Data.xml" writeableType="applicationData" hash="23454C18A2DC1D23E5B391FEE299B1F235067C59" hashalg="SHA1" asmv2:size="39500" /> 

1. , , .

, .

mage -s app manifest -cf cert_file -pwd

mage -u -appm

mage -cf -pwd-

+1

All Articles