Skip to content

Instantly share code, notes, and snippets.

@chuongmep
Created October 29, 2022 15:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chuongmep/71a63b9ce9da6e4bd4ba7383d45b03fb to your computer and use it in GitHub Desktop.
Save chuongmep/71a63b9ce9da6e4bd4ba7383d45b03fb to your computer and use it in GitHub Desktop.
<Target Name="AfterBuild">
<GetReferenceAssemblyPaths TargetFrameworkMoniker=".NETFramework, Version=v4.8">
<Output TaskParameter="FullFrameworkReferenceAssemblyPaths" PropertyName="FrameworkAssembliesPath" />
</GetReferenceAssemblyPaths>
<GetAssemblyIdentity AssemblyFiles="$(OutDir)$(TargetName).dll">
<Output TaskParameter="Assemblies" ItemName="AssemblyInfo" />
</GetAssemblyIdentity>
<GenerateResource SdkToolsPath="$(TargetFrameworkSDKToolsDirectory)" UseSourcePath="true" Sources="$(ProjectDir)\Resources\DynaMEPimages.resx" OutputResources="$(ProjectDir)\Resources\DynaMEPimages.resources" References="$(FrameworkAssembliesPath)System.Drawing.dll" />
<AL SdkToolsPath="$(TargetFrameworkSDKToolsDirectory)" TargetType="library" EmbedResources="$(ProjectDir)\Resources\DynaMEPimages.resources" OutputAssembly="$(OutDir)DynaMEP.customization.dll" Version="%(AssemblyInfo.Version)" />
</Target>
<Target Name="GenerateCustomization" BeforeTargets="Build">
<GetReferenceAssemblyPaths TargetFrameworkMoniker=".NETFramework, Version=v4.8">
<Output TaskParameter="FullFrameworkReferenceAssemblyPaths" PropertyName="FrameworkAssembliesPath" />
</GetReferenceAssemblyPaths>
<GenerateResource SdkToolsPath="$(TargetFrameworkSDKToolsDirectory)" UseSourcePath="true" Sources="$(ProjectDir)\Resources\DynaMEPimages.resx" OutputResources="$(ProjectDir)\Resources\DynaMEPimages.resources" References="$(FrameworkAssembliesPath)System.Drawing.dll" />
<AL SdkToolsPath="$(TargetFrameworkSDKToolsDirectory)" TargetType="library" EmbedResources="$(ProjectDir)\Resources\DynaMEPimages.resources" OutputAssembly="$(TargetDir)DynaMEP.customization.dll" />
</Target>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment