New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
experimentalDecorators Typescript warning always present - Visual Studio 2017 Professional 15.7.4 #25823
Comments
This is not a support forum. Questions should be asked at StackOverflow or on Gitter.im. As was repeated multiple times in that issue, your Why did you ignore the issue template? |
I am very kindly sorry, this is due to my frustration - I've been struggling for the last 4 hours to get anything working… without bigger successes. To clarify - my TypeScript Version: 2.9 Search Terms: experimentalDecorators Code Under VS 2017 -> Add new project -> ASP.NET Core 2.1 Web Project -> Angular application. Add the file below anywhere in the /src folder: import { Injectable } from "@angular/core";
@Injectable()
export class Foo {
} Expected behavior: Projects builds without problems. Actual behavior: Error TS1219 (TS) Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning. WebApplicationTest C:\Users\pawel_000\Documents\Visual Studio 2017\Projects\WebApplicationTest\WebApplicationTest\ClientApp\src\app\home\Foo.ts 4 Active Playground Link: Related Issues: |
As was repeated multiple times in that issue, your |
Doesn't the above imply that the default P.S. Adding the |
Finally, I have figured out the problem. Turned out that it's a side effect of a "feature" present in Visual Studio 2017: ignoring tsconfig.json when not set to That's exactly what happens after creating a new project using the ASP.NET Core Angular template - the build action of Ergo, changing the action to |
Thank You pablonautic, this warning was driving me nuts. A simple change of the build option on tsconfig.json and problem solved !! |
Wow thanks @pablonautic , only I needed add
in my .csproj and problem solved!!! |
@pablonautic spent hours trying to figure out what was wrong and scouring SO for help. Seems like such a simple thing for the ASP.NET Core template to miss. |
I've been having the same problem. It's a bug in my opinion kitsonk - don't be a jerk. Life is hard enough without people like you mistreating others. Be nice! |
Is it that hard to have the Build action for tsconfig.json automatically set to Content? This issue should probably be moved to https://github.com/aspnet/AspNetCore since the solution is changing the default csproj file.
I don't mind changing the tsconfig build action for each new project, but it's always a good setting to have a working project template... Kinda looks unprofessional to have a project template in Visual Studio that's not compiling properly |
I'm having the same problem but in a "Folder" instead of a real Project+Solution. Because there's no project file the Properties window is blank and doesn't let me specify a build-action for the |
Thanks guys, by changing to content these warnings finally went away, after bothering me for weeks |
I uncomment the |
This "Feature" is STILL present in the angular template. Set the build action of tsconfig.json to content, reload project and it now works. |
In my case I just needed to set Build Action of tsconfig.json to Content. But I did on the file's Properties window instead of the .njsproj file. Of course, the effects of doing it this way are the same. |
I've been having this issue for over a month and looked it up regularly. Since Google mostly shows VS Code issues, i didn't find the solution. Thank you, @pablonautic . Setting it as Content solved the issue. |
4 years later and this is issue is still present in Visual Studio. Thank you @pablonautic - was driving me nuts. |
Hi,
I've looked through the discussion at #9335 and seems that other people report the problem as well, though the original thread has been closed recently.
I have this issue (apart from a dozen of other TS errors I haven't been able to solve so far - maybe they are somehow correlated) in my pet project https://github.com/pablonautic/magiczny-miecz - please fill free to clone and build it.
The problem can be observed in
\magiczny-miecz\MagicSword.Core\MagicSword.Core.Web\ClientApp\src\app\game\EventBus.ts
line 6-7.The text was updated successfully, but these errors were encountered: