x64 C# project reg-free deployment

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

uMarko
User
Posts: 17
Joined: Mon Feb 06, 2012 6:15 pm

x64 C# project reg-free deployment

Post by uMarko »

Last month Tracker support helped me do x64 registration-free deployment of the C++ version of FullDemo (see thread "x64 registration-free deployment). Now I am trying to do the same thing with the C# version against .Net Framework 2.0 to both x86 and x64 (same build for both), but I have problems.

I installed PDF-XChange Viewer ActiveX SDK 2.5.201 using pdfvActiveXSDK.exe. Then I followed the procedure that I see in C:\Program Files\Tracker Software\PDF-XChange Viewer SDK\Examples\Registration-Free COM\Readme.txt, and I deployed the following files:

PDFViewerActiveXTestCS.exe (built it with VS10SP1x86, I tried both project settings “Embed manifest with default settings” and “Create application without a manifest”)
AxInterop.PDFXCviewAxLib.dll (built at same time as PDFViewerActiveXTestCS.exe)
Interop.PDFXCviewAxLib.dll (built at same time)
PDFViewerActiveXTestCS.exe.manifest (see attached, this is the manifest that worked for C++ reg-free, I also tried the manifest without the processorArchitecture section)
PDFXCview.exe (x86 version)
PDFXCviewAx.dll (x86 version)
PDFXCviewAx.X.manifest
resource.dat (x86 version)

This works when I move these 6 files to a Windows XP x86 machine. But not for Windows 7 x64.

Could you tell me how to do registration-free deployment of the FullDemo C# project to x64?

~ Marko
You do not have the required permissions to view the files attached to this post.
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19913
Joined: Mon Jan 12, 2009 8:07 am

Re: x64 C# project reg-free deployment

Post by Stefan - PDF-XChange »

Hi Marko,

Seems like this is a duplicate of this topic one:
https://forum.pdf-xchange.com/ ... 36&t=13056
So shall we consider this one closed?

Best,
Stefan
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2448
Joined: Thu Jun 30, 2005 4:11 pm

Re: x64 C# project reg-free deployment

Post by Vasyl - PDF-XChange »

Hi, uMarko.

Check please 'C# Full Demo' project settings: what solution platform is active? Do not use 'Any CPU' but 'Win32' for x86-system or 'x64' for x64-system.

Note: for FullDemo.x64.regFree you must use:

PDFXCview.exe (x64 version)
PDFXCviewAx.dll (x64 version)

- you cannot use x86-modules for x64-client app...

HTH.
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
uMarko
User
Posts: 17
Joined: Mon Feb 06, 2012 6:15 pm

Re: x64 C# project reg-free deployment

Post by uMarko »

Vasyl,

I was able to do a reg free deployment to x64 per your instructions. I did an x64 build from my x86 VS10SP1 development machine, then deployed it reg free to x64.

I have a question - for my C++ FullDemo projects, you showed me how to deploy an x86 build to both x86 and x64. But you are saying that for I my C# FullDemo projects, I will need two separate deployments, one to x64 (requiring an x64 build) and another to x86 (requiring an x86 build), is that correct?

I hope that is not true, because I want the same regfree set of files for C# to work on both x64 and x86.

~ Marko
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2448
Joined: Thu Jun 30, 2005 4:11 pm

Re: x64 C# project reg-free deployment

Post by Vasyl - PDF-XChange »

I have a question - for my C++ FullDemo projects, you showed me how to deploy an x86 build to both x86 and x64.
May be here is some misunderstanding... To be clear: have you any x64-application which uses the x86-sdk-modules successfully ('in-process', such as DLL)?
As I known - it is impossible...
Sure, you may create the x86-deployment which can be used for both platforms x86 and x64, BUT by x86-applications only - x86-deployment will be inaccessible for x64-applications.
For real x64-application you must have a different x64-deployment.
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
uMarko
User
Posts: 17
Joined: Mon Feb 06, 2012 6:15 pm

Re: x64 C# project reg-free deployment

Post by uMarko »

I do NOT want to create a x64 application.

I would like to just create a x86 application that I can deploy regfree to both x86 and x64 platforms using the same exact deployment files.

~ Marko
User avatar
John - Tracker Supp
Site Admin
Posts: 5223
Joined: Tue Jun 29, 2004 10:34 am

Re: x64 C# project reg-free deployment

Post by John - Tracker Supp »

Marko,

looking back at previous questions by you - this problem was resolved in April and you seemed happy with the result - see here ;

https://forum.pdf-xchange.com/ ... 36&t=13056

Are you saying now there is a problem?

Please explain why the previous example is no longer acceptable
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2448
Joined: Thu Jun 30, 2005 4:11 pm

Re: x64 C# project reg-free deployment

Post by Vasyl - PDF-XChange »

Hi Marko

Here is working FullDemo.C#.x86.Registration-Free example.
See some special project-settings in the included sources...

HTH.
You do not have the required permissions to view the files attached to this post.
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
uMarko
User
Posts: 17
Joined: Mon Feb 06, 2012 6:15 pm

Re: x64 C# project reg-free deployment

Post by uMarko »

Got it, Vasyl. I see this boils down to 3 extra steps for deploying the same x86 C# build to both x86 and x64 platforms:

1) In Visual Studio, build to x86 instead of the default Any CPU (in C++ the default is Win32)
2) In Project Properties > Application > change the setting for Manifest to “Create application without a manifest” instead of “Embed manifest with default settings” (similar to C++ setting Embed manifest=No)
3) When deploying, add two sections to the standard regfree manifest, <trustinfo> and <dependency>, as in attached PDFViewerActiveXTestCS.exe.manifest (same as in C++)

<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
</requestedPrivileges>
</security>
</trustInfo>

<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="x86" publicKeyToken="6595b64144ccf1df" language="*" />
</dependentAssembly>
</dependency>

Thank you.
~ Marko
uMarko
User
Posts: 17
Joined: Mon Feb 06, 2012 6:15 pm

Re: x64 C# project reg-free deployment

Post by uMarko »

PDFViewerActiveXTestCS.exe.manifest is attached.
You do not have the required permissions to view the files attached to this post.
User avatar
Paul - PDF-XChange
Site Admin
Posts: 7371
Joined: Wed Mar 25, 2009 10:37 pm

Re: x64 C# project reg-free deployment

Post by Paul - PDF-XChange »

Thanks uMarko,

let us know if there is anything more you need.

regards
Best regards

Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com