2015-10-08 39 views

回答

0

大多數樣品應該兼容,但目前尚未正式支持。

將它們轉換爲新的PostSharp版本,你需要編輯的csproj文件中刪除以下XML:

<!-- The next section automatically prompts you to install PostSharp if needed. It is not required in normal projects. --> 
<UsingTask AssemblyFile="lib\PostSharp.MSBuild.Samples.exe" TaskName="PostSharp.MSBuild.Samples.LaunchPostSharpInstaller" /> 
<Target Name="PostSharp21Check" Condition="'$(PostSharp21Imported)'==''" > 
    <LaunchPostSharpInstaller ProjectPath="$(MSBuildProjectFullPath)" Version="2.1" ProjectGuid="$(ProjectGuid)" BuildingProject="$(BuildingProject)" /> 
    <Error Text="To build this project, you must install PostSharp 2.1 on your machine or add it as a NuGet package to this project." /> 
</Target> 
<PropertyGroup > 
    <ResolveReferencesDependsOn>PostSharp21Check;$(ResolveReferencesDependsOn)</ResolveReferencesDependsOn> 
</PropertyGroup> 

此外,你需要刪除所有引用PostSharp組件 - 最有可能只PostSharp.dll(在編輯csproj文件或重新打開後)。

重新打開項目後,您應該添加PostSharp NuGet包,它將安裝當前版本的PostSharp。

+1

感謝您的快速響應! –