Skip to content
This repository has been archived by the owner on Apr 8, 2020. It is now read-only.

project failed to run when Visual Studio 2015 publish project to bin\Release\PublishedOutput #279

Closed
nklt opened this issue Aug 26, 2016 · 2 comments

Comments

@nklt
Copy link

nklt commented Aug 26, 2016

All sample applications as well as SPA template failed to compile and run, once Visual Studio builds and publish the application to bin\Release\PublishedOutput location within the project space.

This cause the Visual Studio .net core compile, and as well as dotnet tools, to give an erroneous error on typescript file.

Duplicate identifier 'export='.

This error appeared in all typescript source file, such the require.d.ts and tsd.d.ts in Angular2SPA template.

Once the PublishedOutput is removed, the error disappear.

@SteveSandersonMS
Copy link
Member

Thanks for reporting this.

TypeScript doesn't like it if it can see duplicate copies of definitions. You can solve this problem by adding bin to the list of excluded directories in tsconfig.json.

I've just applied this fix to the source, i.e.: 09e1cd3

@nklt
Copy link
Author

nklt commented Sep 1, 2016

Adding excluded bin directory fixed the first error, but introduced the next error in Typescript.

Severity Code Description Project File Line Suppression State
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects C:\workspace6\Angular2Spa\node_modules\rxjs\add\observable\combineLatest.d.ts 2 Active

This error is seen on every typescript file in the project.

It appear the TSC cannot comletely ignore the bin folder for some reason.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants