Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

New Post: got it all compiled, i got it to run BUT

$
0
0
I am in a state of bliss because I got clearscript to work in my project.

My final hurdle was since my dll that would reference clearscript.dll was strong keyed clearscript.dll, clearscriptv8-32.dll,clearscriptv8-64.dll had to have strong keys as well. Maybe this is old hat to everyone but I like sharing what I have learned.

I started Windows SDK 7.1 command prompt

sn -k mystrongname.snk

sn -p mystrongname.snk mystrongnamepublic.txt

sn -tp mystrongnamepublic.snk > mystrongnamepublic.txt

the contents of mystrongnamepublic.txt is thus


Microsoft (R) .NET Framework Strong Name Utility Version 4.0.30319.1
Copyright (c) Microsoft Corporation. All rights reserved.

Public key is
0024000004800000940000000602000000240000525341310004000001000100816740d2ecda21
4ef0568d2a000642792de393b2d94e5380dbbaea167ab0672352838a51b28b3dffe148d500201b
bf7e134d422849bec7f658906a82934cdc6954253ba406696623a52d16552c9efad560566e4bd3
489ed85ef0f824fa66130b2c348aaf04d4626b4161bff82074d4ec353a4c27509f6947351817f3
85c4fb9e

Public key token is e4292199104c45ec

next I took the 5 public key string lines and made it into 1 string

start the clearscript c# project

go to properties, signing

check Sign the assembly

click the drop down, select browse, select mystrongname.snk

save the project

in explorer goto the Clearscript\Properties folder.

open AssemblyInfo.tt in notepad.

change all InternalsVisibleTo lines by pasting in ,PublicKey= and your key string.
[assembly: InternalsVisibleTo("ClearScriptV8-32,PublicKey=0024000004800000940000000602000000240000525341310004000001000100b3dd479cfbede9face9ce4e1d294cb3b234c9ae9d912301bb44f3089289cc42b13f3e67f7dfd99be9eb716cb4db5b4ebc9bed2047ddca8d53b81cda35edc67b2c79f51107a516d32b7dbd02dba767a1574c36e1deb9b63adec681f7bdb74f46344933e75198df2b0df8d4a589700fb2b9bfb8162a3613dd5c43c5dc88a56cda0")]

do the same to AssemblyInfo.cs

ONTO THE ClearscriptV8 C++ DLL!!!

I am just going to example the 32 project but do it to the 64 the same way.

copy mystrongname.snk into clearscript\v8\clearscriptv8\32 folder

start the project

access the property page

select configuration properties\linker\advanced

select the dropdown for key file, browse and select mystrongname.snk

compile the c++ project

open the c# project and compile.

VOILA!!! pure happiness once again.

Sir Clearscript I now understand where my assembly location problems arised. VS has a habit of copying assemblies a project exe references to the project's bin directory instead of leaving them where they were. Once I had all the support dlls in that same directory all was gold. When I added a reference to clearscript.dll in my dll it ran fine as long as all the support dlls were in the directory clearscript.dll was in. So that is good, exactly as expected and needed.

Viewing all articles
Browse latest Browse all 2297

Latest Images

Trending Articles





Latest Images