2
VS2015無法在Typescript Cordova項目上添加文件作爲鏈接。怎麼做 ?VS2015 typescript cordova添加爲鏈接
我試圖通過將此編輯.jsproj:
<ItemGroup>
<Content Include="..\TypeScriptHTMLApp1\Core\**\*.*">
<Link>Views\Core\%(RecursiveDir)%(FileName)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>false</Visible>
</Content>
</ItemGroup>
,但它不工作。
的目標是有這個文件層次:
- 打字稿HTML核心文件
- C#Web項目(使用核心文件)
- 科爾多瓦項目(使用核心文件)
對於C#web項目,沒關係。但對於cordova項目,不能添加我的核心文件作爲鏈接...
我該怎麼做? 感謝
編輯:我已經找到了解決辦法:
將這個在.jsproj
<!-- On build, we copy all core front end files -->
<Target Name="CopyContentFiles" BeforeTargets="Build">
<ItemGroup>
<FilesToCopy Include="path to your shared folder on the core project\**\*.*" />
</ItemGroup>
<Copy SourceFiles="@(FilesToCopy)"
DestinationFiles="@(FilesToCopy->'path to your shared folder on the destination project (cordova project), for eg: www\core\%(RecursiveDir)%(Filename)%(Extension)')"
SkipUnchangedFiles="True" />
</Target>
感謝您的回答。我通過添加當前的解決方法編輯了我的問題... – Adavo