473,396 Members | 1,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Creating publisher policies for DLLs

MT
We have a .NET dll that we are deploying to our customers using a deployment
project in VS .NET 2003. There is a lot of information about creating
publisher policies on the web, but we have not been successful in creating
one. Here's what the ultimate goal is:
When the DLL is deployed to a customer's system, every application using
this dll must point to the new version. This has to be an automated process
using the deployment project.
This is what we have already done:
1. Created a file called app.config with the following text:
<configuration>
<runtime>
<assemblyBinding>
<dependentAssembly>
<assemblyIdentity name="name of assembly"
publicKeyToken="public key token"
culture="en-us"/>
<bindingRedirect
oldVersion="1.0.0.0-65535.35535.65535.65535"
newVersion="2.0.1.0"/>
<codeBase version="2.0.0.0"
href="http://www.foo.com/bar.dll"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

We copied this from a howto on gotdotnet.com

2. We signed the dll with our key and created a policy file.
3. We then deployed this dll to the customer's GAC.

However, the customer's application that used an old version of the dll did
not automatically redirect to the new version.

Is there something we are missing?
Does the name of the config file have to be something specific (like
myassembly.dll.config)?
Has anybody ever gotten this to work?

Any help would be appreciated,

Thanks,
MT
Nov 20 '05 #1
1 1051
"MT" <no****@nospam.com> wrote in message
news:eN**************@TK2MSFTNGP11.phx.gbl...
We have a .NET dll that we are deploying to our customers using a deployment project in VS .NET 2003. There is a lot of information about creating
publisher policies on the web, but we have not been successful in creating
one. Here's what the ultimate goal is:
When the DLL is deployed to a customer's system, every application using
this dll must point to the new version. This has to be an automated process using the deployment project.
This is what we have already done:
1. Created a file called app.config with the following text:
<configuration>
<runtime>
<assemblyBinding>
<dependentAssembly>
<assemblyIdentity name="name of assembly"
publicKeyToken="public key token"
culture="en-us"/>
<bindingRedirect
oldVersion="1.0.0.0-65535.35535.65535.65535"
newVersion="2.0.1.0"/>
<codeBase version="2.0.0.0"
href="http://www.foo.com/bar.dll"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

We copied this from a howto on gotdotnet.com

2. We signed the dll with our key and created a policy file.
3. We then deployed this dll to the customer's GAC.

However, the customer's application that used an old version of the dll did not automatically redirect to the new version.

Is there something we are missing?
Does the name of the config file have to be something specific (like
myassembly.dll.config)?
Has anybody ever gotten this to work?

Any help would be appreciated,

Thanks,
MT


The publisher policy dll in the GAC has to have a specific name
(policy.majorNumber.minorNumber.mainAssemblyName.d ll) and you need to be
careful how you add the publisher policy file to the GAC. I've had success
only when the .config file is in the same subdirectory as the .dll when you
add the .dll to the GAC.

If the .config file isn't present when you drag and drop the .dll via the UI
you'll see an error, but I've seen automated tools install a publisher
policy file into the GAC without the .config file being present and then
seeing the behavior you describe.
Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Seb LM | last post by:
Hello, I'd like to define a publisher policy which covers many versions of assembly from which the "major.minor version" are different but it's not possible to make a such publisher policy. So...
2
by: Jon Davis | last post by:
I have a full-blown application that consists of several (fifteen or so) assembly DLLs, each being a separate VS.NET project that outputs to the main DLL's bin directory. They are all strongly...
2
by: Justin | last post by:
I am currently working on a windows app in C# that when given a computer's name needs to check local security policies on that computer across the server. Some of the policies I would like to...
1
by: MT | last post by:
We have a .NET dll that we are deploying to our customers using a deployment project in VS .NET 2003. There is a lot of information about creating publisher policies on the web, but we have not...
1
by: pemigh | last post by:
Users want to click on a control and immediately ship a Publisher -- or PDF -- document to the printer. I found an old conversation with this code for Word: Dim wdApp As Word.Application Dim...
0
by: Andy | last post by:
Hi all, We installed MS CA here so that we can sign our own publisher certificates. The problem is now I'm having problems figuring out how to request a code signing certificate. I set the...
0
by: Ron | last post by:
Hi All, I am fairly new to MS SQL Replication. I have two servers one is setup as the publisher and the other is setup as both the subscriber and the distributor. Due to server reboots, the...
3
by: Stephen Torri | last post by:
Below is a class that is suppose to represent a segment of memory or a contents of a binary image (e.g. ELF executable). I have started to read Modern C++ Design and thought the best way to ensure...
3
by: Alex | last post by:
Hi, I'm having a booger of a time trying to understand the policies for VB 2005 so I can run the EXE file from a network share via mapped drive. My first route was to use the Global Assembly...
1
by: =?Utf-8?B?U2NvdHQ=?= | last post by:
Publisher policies sound just like what I need but I just can't get these things to work. There are several good kb articles that seem to show exactly what needs to be done.... Here is my...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.