I'm stuck. I haven't been stuck for a while.
Manually doing a publisher policy in GUI tool works fine, but I'm trying to make a publisher policy assembly. I have a test app that I'm working with for simplicity.
version 1.0.0.0 is deployed to GAC.
my test console app is using version 1.0.0.0 returning a string ("Hello World")
version 1.1.0.0 modifies the string to "Hello Everyone"
Again, when manually doing publisher policy when I run the test program I get "Hello Everyone" and when view the 'fusion?' program (the one used for debugging binding) it shows the policy being found at the machine level and returns the right assembly (1.1.0.0) from the GAC.
Now when I create a config file and create the policy through the al tool (as seen in so many books/blogs/forums) everything compiles. (I've checked my config file for errors and can't find any).
I then use the gacutil tool to put this into the GAC and it shows up there nice and pretty. Oh, and I do have it named policy.1.1.TestAssembly as required (I also did policy.1.0.TestAssembly just in-case there's some weird thing, but I'm pretty sure it should be 1.1). I have also ensure I'm using the same SN key that the main assemblies are signed with (I saw a post where that could be a problem, but I don't see how, but I tried anyway) and have made sure to have the same processor specification when using the al tool (another post where I saw this could be a problem, but again, don't see how).
But now when I run (after remove the manually created policy if I had that in there at the time) I continue to get 'Hello World'. Looking at the fusion utility the framework isn't even looking for a publisher policy.
Now all the examples I've come across are for 1.1 framework; haven't seen any for 2.0 framework expect that which is in a book of mine; but the code is the same there.
I am absolutely stumped to what I'm missing. I can send all my test files if needed later this weekend.
Thanks so much.
Manually doing a publisher policy in GUI tool works fine, but I'm trying to make a publisher policy assembly. I have a test app that I'm working with for simplicity.
version 1.0.0.0 is deployed to GAC.
my test console app is using version 1.0.0.0 returning a string ("Hello World")
version 1.1.0.0 modifies the string to "Hello Everyone"
Again, when manually doing publisher policy when I run the test program I get "Hello Everyone" and when view the 'fusion?' program (the one used for debugging binding) it shows the policy being found at the machine level and returns the right assembly (1.1.0.0) from the GAC.
Now when I create a config file and create the policy through the al tool (as seen in so many books/blogs/forums) everything compiles. (I've checked my config file for errors and can't find any).
I then use the gacutil tool to put this into the GAC and it shows up there nice and pretty. Oh, and I do have it named policy.1.1.TestAssembly as required (I also did policy.1.0.TestAssembly just in-case there's some weird thing, but I'm pretty sure it should be 1.1). I have also ensure I'm using the same SN key that the main assemblies are signed with (I saw a post where that could be a problem, but I don't see how, but I tried anyway) and have made sure to have the same processor specification when using the al tool (another post where I saw this could be a problem, but again, don't see how).
But now when I run (after remove the manually created policy if I had that in there at the time) I continue to get 'Hello World'. Looking at the fusion utility the framework isn't even looking for a publisher policy.
Now all the examples I've come across are for 1.1 framework; haven't seen any for 2.0 framework expect that which is in a book of mine; but the code is the same there.
I am absolutely stumped to what I'm missing. I can send all my test files if needed later this weekend.
Thanks so much.