When the web tries to publish a TypeScript project in Visual Studio 2015, Update 2; assembly completed successfully, but package / publish fails:
Error: Copying file typescript-filename.js to obj\Release\Package\PackageTmp\typescript-filename.js failed. Could not find file 'typescript-filename.js'.
An error occurs when a project specifies a directory for TypeScript intermediate / output files. To reproduce this error, simply create a file tsconfig.jsonin the root directory of the Visual Studio TypeScript HTML Application project with the following contents:
{
"compilerOptions": {
"outDir": "transpiled"
}
}
If you do not use the outDirintermediate / output directory option , I can publish my source files, which I do not want. (Also, the output of the project is mixed with the source, and the project becomes a mess.)
How can I exclude these TypeScript redirected files from a package / publication?
WebPack JJ- ( /), , .
:
.TS , None/Do not copy. :
"None" "TypeScript Compile" ( ) .TS , .TS/.JS ; , , , . .JS.
, , voodoo, , , .
-, C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Transform\Microsoft.Web.Publishing.AspNetCompileMerge.targets 615 , (AFAIK) @(FilesForPackagingFromProject). .TS .JS, , , .
<CopyPipelineFiles PipelineItems="@(FilesForPackagingFromProject)"
SourceDirectory="$(WebPublishPipelineProjectDirectory)"
TargetDirectory="$(_PreAspnetCompileMergeSingleTargetFolder)"
SkipMetadataExcludeTrueItems="True"
UpdateItemSpec="True"
DeleteItemsMarkAsExcludeTrue ="True">