ClickOnce for Win32 dll

C

code

Here is a method I came up with to use ClickOnce with a Win32(no Clr)
dll.
Is there something simplier I can do?


Steps for ClickOnce for a Win32(with no CLR) dll , named Win32Lib.dll.

In order to make the reference work for both a debug build and a
release build:
Change Win32Lib/ConfigurationProperties/General/Output =
$(SolutionDir)Bin

Add file "Win32Lib.Manifest" to the Win32Lib project directory with
content:
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<assembly xmlns='urn:schemas-microsoft-com:asm.v1'
manifestVersion='1.0'>
<assemblyIdentity name="Win32Lib" processorArchitecture="x86"
type="win32" version="1.0.0.0" />
<file name="Win32Lib.dll" hashalg="SHA1" />
</assembly>

Add Post-build Event:
mt /manifest "$(TargetName).manifest"
/out:"$(OutDir)\$(TargetName).manifest" /hashupdate:"$(OutDir)"

After building Win32Lib once, add the following reference to the
Managed project in the solution:
AddReference/BrowseTab = LookIn <TheSolutionDir\Bin> for
"Win32Lib.manifest"

Now publish.
 
C

code

P.S. you need to add.

Change The Project/ProjectDependcies to make:
the managed project depend on Win32Lib.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top