Skip to content
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

The target "CompileTypeScript" does not exist in the project #231

Open
Snazzie opened this issue Jan 17, 2022 · 11 comments
Open

The target "CompileTypeScript" does not exist in the project #231

Snazzie opened this issue Jan 17, 2022 · 11 comments

Comments

@Snazzie
Copy link

Snazzie commented Jan 17, 2022

in aspnet core .net 5 and 6 i get the error The target "CompileTypeScript" does not exist in the project on build when reinforced typings is being used.

This error isnt thrown 100% of the time i build. usually the build after the one that errors will succeed.
If i were to publish an app, it will be thrown 100% of the time.

im using vs 2022 if thats any help.
Seems to be fine via cli route.

https://github.com/Snazzie/reinforcedTypingsIssueDemo

@andersstorhaug
Copy link

I've also encountered this issue with .NET 6.

@Alphish
Copy link

Alphish commented Mar 29, 2022

@Snazzie @andersstorhaug I also encountered similar issue during build after installing VS2022 (on .NET Core 3.1 project, in fact).

What helped for me was opening the installer for VS2022 and installing the "TypeScript SDK 4.4" component. Maybe it will work for you as well?

@Snazzie
Copy link
Author

Snazzie commented Mar 30, 2022

@Alphish Ive replaced this library with openapi-generator as dealing with this bug for about half a year has got to me especially because it prevents me from publishing. I also wanted to generate more languages, which forced me to look into alternatives.

@pdsrebelo
Copy link

pdsrebelo commented May 17, 2022

This issue is also blocking me from publishing my code. The error in question is the following:

ReinforcedTypingsGenerate: C:\hostedtoolcache\windows/dotnet\dotnet.exe "C:\Users\VssAdministrator\.nuget\packages\reinforced.typings\1.6.1\tools\net6.0\rtcli.dll" profile "C:\Users\VssAdministrator\AppData\Local\Temp\tmp39C2.tmp" ##[error]src\MyProject\MyProject.csproj(0,0): Error MSB4057: The target "CompileTypeScript" does not exist in the project.

Will this be fixed anytime soon?

Thanks in advance.

@valterneveshv
Copy link

Same here. I'm having the same behavior that @pdsrebelo is experiencing.

@pdsrebelo
Copy link

pdsrebelo commented May 17, 2022

By the way, I was also able to quickly reproduce this problem just by creating a default .NET6 web app on Visual Studio 2022.

You can pull the repository here (and if you don't have any Typescript SDK's installed via VS Installer), it will fail on the build:

https://github.com/pdsrebelo/ReinforcedTypingsBug

The build error is the following:

image

@obriankevin11
Copy link

obriankevin11 commented May 27, 2022

same pb here when bumping from .net 5 to 6

@jussik
Copy link

jussik commented Aug 22, 2022

Installing the Microsoft.TypeScript.MSBuild nuget package into the same project as Reinforced.Typings fixed this issue for me.

@shokurov
Copy link

I have been able to get rid of the error by adding

  <Target Name="CompileTypeScript" />

to my .csproj

@xhafan
Copy link

xhafan commented Sep 5, 2023

I got this error message when upgrading from Visual Studio 2022 17.5.3 to 17.7.3 . For my .NET 7 project, adding <Target Name="CompileTypeScript" /> to the csproj file fixed it.

@warmfire540
Copy link

Updated VS to latest 17.9.5 - we are getting this error on a 4.7.2 project suddenly in our CI builds, added the recommended .csproj bit and it's solid now..

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

No branches or pull requests

10 participants