使用 PostSharp 1.0 的 ClickOnce 應用程序似乎需要 GAC 中的 1.5 程序集 (ClickOnce application that uses PostSharp 1.0 seems to require 1.5 assemblies in GAC)


問題描述

使用 PostSharp 1.0 的 ClickOnce 應用程序似乎需要 GAC 中的 1.5 程序集 (ClickOnce application that uses PostSharp 1.0 seems to require 1.5 assemblies in GAC)

I have installed PostSharp 1.5 on a machine that had 1.0 previously. Now, my application which links to 1.0SP1 assemblies has for some reason started requesting for 1.5 assemblies to be in the GAC on the client side. Does anyone know why this is? (I've asked on the PostSharp forum but received no reply.)

‑‑‑‑‑

參考解法

方法 1:

well it could be a referencing problem.

if you reference a dll which references a non specific version another, which references a specific version of another.

You inherit the dependancy. So in this case.

Your code ‑> Postsharp(v1.0) ‑> Postsharp.Laos(any version and gets 1.0) ‑> PostSharp.MSBuild.dll (v1.0)

You update postsharp

Your code ‑> Postsharp(v1.0) ‑> Postsharp.Laos(any version and gets 1.5) ‑> PostSharp.MSBuild.dll (v1.5)

Note: the above is an example I'm not sure what order Postsharp references itself.

(by Dmitri NesterukMark Broadhurst)

參考文件

  1. ClickOnce application that uses PostSharp 1.0 seems to require 1.5 assemblies in GAC (CC BY‑SA 3.0/4.0)

#postsharp #clickonce #C#






相關問題

拋出自定義異常並使用 Postsharp 捕獲它們 (Throw an custom exception and catch them with Postsharp)

Làm cách nào để loại trừ khỏi ghi nhật ký dựa trên OnMethodBoundaryAspect? (How to exclude from OnMethodBoundaryAspect-based logging?)

在屬性中傳遞動態參數 (PostSharp) (Passing dynamic parameters in attributes (PostSharp))

PostSharp 3.0 中 IAspectProvider 的重大變化? (Breaking change of IAspectProvider in PostSharp 3.0?)

將方面應用於其他程序集類方法調用 (apply an aspect to other assembly class methods calls)

Postsharp 和 log4net 和 log4postsharp (Postsharp and log4net and log4postsharp)

Postsharp - 獲取調用程序集? (Postsharp - Get Calling Assembly?)

PostSharp 對象映射器 (PostSharp for an object mapper)

PostSharp - 自動化事件訂閱和集合添加 (PostSharp - automate event subscription and collection addition)

PostSharp:在目標構造函數之後初始化實例範圍的方面 (PostSharp: initialize instance-scoped aspect after target constructors)

使用 PostSharp 1.0 的 ClickOnce 應用程序似乎需要 GAC 中的 1.5 程序集 (ClickOnce application that uses PostSharp 1.0 seems to require 1.5 assemblies in GAC)

更改用戶控件 DependencyProperty 時屬性重置 (Property resets when changing Usercontrols DependencyProperty)







留言討論