Copy Plugin on Build not doing anything Follow
Hi,
I have a plugin locally installed and I've got everything up and running, but just have this issue that the CopyPlugin does not copying my targeted files.
I got the following output after build which looks like the packages are identified, my plugin is in Exp experimental instance, just no file copying is happening.
1>------ Rebuild All started: Project: AssemblyDependency, Configuration: Debug Any CPU ------
1> AssemblyDependency -> C:\Projects\GitHub\ReSharper\src\AssemblyDependency\bin\Debug\AssemblyDependency.dll
1> Searching for installed products in: C:\Users\lene.wei\AppData\Local\JetBrains\Installations
1> Scanning: C:\Users\lene.wei\AppData\Local\JetBrains\Installations\Packages
1> Scanning: C:\Users\lene.wei\AppData\Local\JetBrains\Installations\ReSharperPlatformVs14Exp_000
1> packages file found: C:\Users\lene.wei\AppData\Local\JetBrains\Installations\ReSharperPlatformVs14Exp_000\packages
1> host recognized: ReSharperPlatformVs14Exp, +59 packages
1> Scanning: C:\Users\lene.wei\AppData\Local\JetBrains\Installations\ReSharperPlatformVs14Exp_001
1> Scanning: C:\Users\lene.wei\AppData\Local\JetBrains\Installations\ReSharperPlatformVs14_000
1> packages file found: C:\Users\lene.wei\AppData\Local\JetBrains\Installations\ReSharperPlatformVs14_000\packages
1> host recognized: ReSharperPlatformVs14, +59 packages
1>C:\Projects\GitHub\ReSharper\src\packages\JetBrains.ReSharper.SDK.Internal.108.0.20170428.83402\DotFiles\JetBrains.CommonSdk.targets(24,5): warning : No installed product ReSharperPlatformVs14Plugins. Available installed products: ReSharperPlatformVs14Exp, ReSharperPlatformVs14
1> InstallFolder:
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
Here's my project file related parts. I'm currently using R#2017.1, VS2015 on Windows 7.
Please can anyone kindly give me advice where I'm possibly wrong? Many thanks!
<PropertyGroup>
<HostFullIdentifier>ReSharperPlatformVs14Plugins</HostFullIdentifier>
</PropertyGroup>
<Target Name="CopyPlugin" AfterTargets="AfterBuild" Condition="'$(HostFullIdentifier)' != ''">
<InstalledProductsDiscoveryTask HostFullIdentifier="$(HostFullIdentifier)">
<Output TaskParameter="Directories" ItemName="InstallFolder" />
</InstalledProductsDiscoveryTask>
<Message Text="InstallFolder: @(InstallFolder)" Importance="High" />
<Copy SourceFiles="bin\Debug\AssemblyDependency.dll" DestinationFolder="@(InstallFolder)" Condition="Exists('@(InstallFolder)')" />
<Copy SourceFiles="bin\Debug\AssemblyDependency.pdb" DestinationFolder="@(InstallFolder)" Condition="Exists('@(InstallFolder)')" />
</Target>
Lene Wei
Please sign in to leave a comment.
Hi Lene Wei!
You are specifying non-existing host identifier.
warning : No installed product ReSharperPlatformVs14Plugins. Available installed products: ReSharperPlatformVs14Exp, ReSharperPlatformVs14
Specify ReSharperPlatformVs14Exp instead, in HostFullIdentifier property.
Cool, thanks Salva! I forgot to change the suffix because I switched computers and change the suffix when install ReSharper again.
After I altered the suffix I got the dll file copied as expected, the pdb file however I also specified to copy doesn't get synchronized.
Any idea why? and how I can get both of them copied?
Please, provide full msbuild log - there will be some warnings from your Copy tasks.
Also, run build with Verbose logging.
I replied with email and looks like a ticket is generated sorry about that...
http://resharper-support.jetbrains.com/hc/requests/1010152
According to log, at the moment of copying there is no *.pdb files in bin
Task "Copy"
Task Parameter:
SourceFiles=
bin\Debug\AssemblyDependency.dll
OriginalItemSpec=obj\Debug\AssemblyDependency.dll
Task Parameter:DestinationFolder=C:\Users\lene.wei\AppData\Local\JetBrains\Installations\ReSharperPlatformVs14Exp
Copying file from "bin\Debug\AssemblyDependency.dll" to "C:\Users\lene.wei\AppData\Local\JetBrains\Installations\ReSharperPlatformVs14Exp\AssemblyDependency.dll".
Are you sure it exists after build there?
Seems, IncrementalClean target deletes it.
It's MsBuild bug and it's logged here https://github.com/Microsoft/msbuild/issues/1054
As workaround, you can copy it from obj\Debug directory.
oops I replied with emails again and 2 more tickets are created...
Just want to say thanks very much for your prompt help!
I just have time to test copying from obj\Debug, unfortunately it doesn't work either.
Turns out that the copy tag within CopyPlugin never works, I removed the copy task in CopyPlugin and the dll is copied over anyway!
I did a workaround to extend the build process, this time it works as expected.
build result:
I've the same issue. I was able to resolve it by using a proper host identifier however it doesn't overwrite old PDB file.
Is there an issue ticket to track this issue? (I'm not using incremental build)