This is a migrated thread and some comments may be shown as answers.

Force linked files to be included in the zip file uploaded to Icenium servers for build

3 Answers 60 Views
AppBuilder extension for Visual Studio
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Support
Top achievements
Rank 1
Support asked on 29 Oct 2013, 09:56 AM
Hello,

I've 2 Icenium projects loaded in my Visual Studio solution with linked files between the projects. It's running fine in the simulator (with a small modification at the end of the iceproj file), as follow:

<Import Project="$(IceniumTargets)Build.targets" />
<Target Name="CopyLinkedFiles" BeforeTargets="Build">
  <ItemGroup>
    <LinkedItem Include="@(Content)" Condition="%(Content.Link) != ''" />
  </ItemGroup>
  <Copy SourceFiles="@(LinkedItem)" DestinationFiles="%(LinkedItem.Link)" />
</Target>


But when I build the project in cloud, the linked files are not included in the zip file that is uploaded to the Icenium servers. The ZIP file I'm speaking about is in the "%project_folder%/obj/Debug" folder.

How can I force Visual Studio to include these linked files in the package before it is uploaded to Icenium servers? Would it be possible to use the build or post-build events? My preferred option would be a modification of the .iceproj file, 

Thanks for your help.
Bastien

3 Answers, 1 is accepted

Sort by
0
Accepted
Miroslav Nedyalkov
Telerik team
answered on 29 Oct 2013, 05:37 PM
Hello Bastien,

Currently the Icenium extension for Visual Studio doesn't support linked files. As you correctly noticed you can overcome this limitation with some custom MSbuild code. What you also need to do is to change the linked Content items to point to the project folder instead of their original location like this:
<Target Name="BeforeBuild">
  <ItemGroup>
    <LinkedItem Include="@(Content)" Condition="%(Content.Link) != ''" />
    <Content Remove="@(Content)" Condition="%(Content.Link) != ''" />
  </ItemGroup>
   
  <Copy SourceFiles="@(LinkedItem)" DestinationFiles="%(LinkedItem.Link)" />
  <ItemGroup>
    <Content Include="%(LinkedItem.Link)" />
  </ItemGroup>
</Target>

Please notice that this work-around may not work in some edge cases.

If you have further questions don't hesitate to ask.

All the best,
Miroslav Nedyalkov
Telerik
You've missed the Icenium Visual Studio Integration keynote? It has been recorded and posted here.
Looking for tips & tricks directly from the Icenium team? Check out our blog!
Share feedback and vote for features on our Feedback Portal.
0
Joe
Top achievements
Rank 2
answered on 24 Jan 2014, 11:54 PM
This works great when building the solution to copy the files over before the build. The Visual Studio context menu "Copy as Link" from one Icenium project and "Paste Link" to another does not work, however; the file is copied to the destination project folder instead of a link. It would be very convenient if this worked. The only way I have found to create links in the second Icenium project is create the destination folder, right click on it > add > existing item, navigate to source project directory, select all files to link, then click the file explorer Add button dropdown and select "Add As Link".

Is there an easier way or are there plans to implement solution "Copy As Link" and "Paste Link" context menu functionality?

http://joemeeks.net/Files/Images/ExistingItem.png
http://joemeeks.net/Files/Images/AddAsLink.png
0
Kaloyan
Telerik team
answered on 29 Jan 2014, 02:37 PM
Hello Joe,

Thank you for contacting us.

At this stage, there isn't an easier way for doing this. However, please submit this as a feature request in our Ideas and Feedback portal and we will be happy to consider it for future releases.

Regards,
Kaloyan
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
AppBuilder extension for Visual Studio
Asked by
Support
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
Joe
Top achievements
Rank 2
Kaloyan
Telerik team
Share this question
or