I think issue #15664 is still present, i'm using typescript.msbuild 2.5.2 and msbuild 15.3.3 with aspnetcore application on .net framework.
C:\BuildAgent\tempbuildTmp.nuget\packages\microsoft.typescript.msbuild\2.5.2\tools\Microsoft.TypeScript.targets(175, 5): error MSB4062: The "TypeScript.Tasks.CheckFileSystemCaseSensitive" task could not be loaded from the assembly C:\BuildAgent\tempbuildTmp.nuget\packages\microsoft.typescript.msbuild\2.5.2build\..\tools\net45\TypeScript.Tasks.dll. Confirm that the
declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.
@minestarks can you take a look.
Hello,
I'm having the same issue with Microsoft.TypeScript.MSBuild 2.5.2 on an ASP.NET MVC project.
Error message in French :
Impossible de charger la t芒che "TypeScript.Tasks.CheckFileSystemCaseSensitive" 脿 partir de l'assembly ...\packages\Microsoft.TypeScript.MSBuild.2.5.2build\..\tools\net45\TypeScript.Tasks.dll. Assurez-vous que la d茅claration
Thanks in advance for fixing this issue.
Regards
Hi,
The error will disappear when you install TypeScript for Visual Studio 2015 from here :
https://www.microsoft.com/en-us/download/confirmation.aspx?id=48593
Someone on my team is having this issue as well. We are using Visual Studio 2017, so not sure that would work for us.
I'm having this issue too - VS 2017, TS 2.5.2 installed, both for VS 2017 and VS 2015 (which is not installed at the moment). Sometimes rebuilding the offending project before rebuilding the solution causes the error to temporarily go away. I've noticed this error particularly when attempting to run unit tests using the Test Explorer - my current workflow is to rebuild the offending project(s) and then run the tests. Super annoying.
@NateB2, is the build definitely using TS 2.5.2, and not an older version of the NuGet package? And to confirm, you have VS 2017 installed on the failing machine, and the build launched from within VS 2017 is failing?
I ask as their are 2 known issues:
@rohatsu: Mentioning you on this active issue as you commented on the related closed issue #15664.
If when hitting the issue you can confirm the above, confirm that the NuGet package location used (e.g. C:\Users\<username>\.nuget\packages\microsoft.typescript.msbuild\2.5.3\tools\net45) has the 3 expected dlls (TypeScript.Tasks.dll, System.IO.FileSystem.dll, System.IO.FileSystem.Primitives.dll), and if possible attach a detailed build log, that would be most helpful.
Thanks.
@billti What's weird about it is that one of the projects that was throwing the error wasn't using the Nuget build tools, and the other ones that were complaining are using v2.2.2. None of our projects are using 2.5.x versions of the Nuget build tools yet.
Lately, this issue has gone away for me with the latest few VS updates (I'm on 15.4.0 now) and I can't reproduce it at this point.
I'm experiencing this issue too on a build machine using Typescript 2.5 and 2.6, latest versions of V2017 and MSBuild installed. There's no other detailed information on what might be wrong. A simple and consistent workaround for us seems to be enabling parallel build via the MSBuild /m switch. Based on that my best guess would be that somewhere along the line something is being resolved incorrectly during the standard build that is mitigated by building in parallel. I didn't have time to dig further and determine what.
@nukefusion what is the path at which your system is looking for TypeScript.Tasks.dll? If the file exists, under Properties -> Details for the file, what is the Product Version?
In our project we also have this issue. Our server, who needs to run MSBuild standalone, is not able to build the TypeScript anymore. On this server we have installed the following:
I want to point out that when we only switch from "TypeScript Tools for Microsoft Visual Studio 2015 2.6.1.0" to " TypeScript Tools for Microsoft Visual Studio 2015 2.1.4.0" we get it working again.
Could you try following the steps referenced here and let me know if you're still having issues? It seems there were serious issues with our initial release of the 2.6.1 SDK.
@uniqueiniquity Am I correct that you want me to uninstall TypeScript SDK through visual studio installer?
My colleague followed the solution from this stack overflow and now it works. We use a different MSBuild now.
I encountered this problem as well. The odd thing in our case was that the individual projects would build, but when built from the solution they would fail with the subject error. The solution for us was to remove the following line from the only project actually using typescript:
<Import Project="..\..\packages\Microsoft.TypeScript.MSBuild.1.8.11\tools\Microsoft.TypeScript.targets" Condition="Exists('..\..\packages\Microsoft.TypeScript.MSBuild.1.8.11\tools\Microsoft.TypeScript.targets')" />
I think I figured out the root cause of this. Our .targets file loads the Tasks.dll we use to compile TypeScript. This has evolved over time, with new properties/methods added (such as CheckFileSystemCaseSensitive). The issue is that if a build occurs that uses an older TypeScript version/SDK, it will load the Tasks DLL from the SDK which doesn't have the latest updates. However the build process will sometimes remain in memory between builds, and doesn't unload the DLL. Thus when a build tries to use a newer version of TypeScript, it uses the newer .targets file (which expects the new properties/methods), however the process says "oh, I've already got that DLL loaded", and continues to use the older Tasks.dll.
We're investigating ways to fix this (e.g. put the TypeScript version in the DLL name is one idea). Unfortunately the only guaranteed fix if switching between TypeScript versions during the process lifetime, is to ensure the process exits/restarts. (And I believe even devenv.exe will load these to evaluate build properties sometimes, so it may mean re-launching VS).
Sorry for the inconvenience until this is addressed. Including @minestarks who has some background also.
Hi - Any update on this issue ?
I got this error. I closed and reopened VS, it went away
Long term fix is tracked by #22422, see https://github.com/Microsoft/TypeScript/issues/22422#issuecomment-385003820 for the fix. I will be closing this now, but please let us know if you are still having issues, and we will be glad to investigate.
V谩 em C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\TypeScript e exclua o arquivo "Microsoft.TypeScript.targets".
15.8 just released is exhibiting this issue. Even on projects that don't use typescript.
We've seen a couple instances where on VS the file typically at "C:\Program Files (x86)\Microsoft SDKs\TypeScript\3.0build\TypeScript.Tasks.dll" is missing after installing the update. Can you see if this is the case for you? (@minestarks )
@JohnGalt1717 we've been hearing a lot of reports of this kind for 15.8. Unfortunately I'm not sure exactly what's happening but for now, could you tell me what you see in this folder? C:\Program Files (x86)\Microsoft SDKs\TypeScript\3.0\build? The pattern we've been seeing is that TypeScript.Tasks.dll is missing but other files are there.
After that could you follow the instructions here and see if Windows Defender might have quarantined anything recently related to TypeScript or VS setup?
Finally, did you see any warnings or errors coming from VS setup itself?
Thank you for helping us investigate!
cc @uniqueiniquity
The file doesn't exist.
There is nothing in threat history either.
Both my Dell XPS 13 and my desktop computer have the same problem.
No warnings from VS.net install. Everything was fine.
So there somewhere I can download that file and put it in manually?
@JohnGalt1717 Repairing the Visual Studio installation, or if that doesn't work, downloading the SDK from here would help in your case.
@minestarks email sent.
Also does it matter that on both machines the release 5 of 15.8 beta was and still is installed?
@JohnGalt1717 Yes, thanks, this may definitely be related, and may point to a potential issue in the upgrade scenario.
I had this same issue, with 15.8 (Preview 5) installed, and having recently upgraded to 15.8 release, and then to 15.8.1. I uninstalled 15.8 (Preview 5), then modified 15.8.1 to remove TypeScript 2.8 SDK and add TypeScript 2.9 SDK (I already had 3.0 SDK), and that resolved the issue for me.
I had to download the SDK.
Downloading and installing the SDK fixed it for me.
Hi @minestarks 馃憢
C:\Program Files (x86)\Microsoft SDKs\TypeScript\3.0\build

After that could you follow the instructions here and see if Windows Defender might have quarantined anything recently related to TypeScript or VS setup?
We have Windows Defender turned off in our organization, FYI.
Finally, did you see any warnings or errors coming from VS setup itself?
Not that I rememeber, no.
After install of 3.0.1 SDK:

Yes, reinstalling the SDK should resolve this. The root cause is a versioning issue in Preview 5 and VS 2017 Update 8. If you install both side-by-side, this happens for some reason. We'll be fixing it soon (we just need to bump the SDK MSI version in the next VS update), but in the meantime reinstalling the 3.0.x SDK is the easiest fix. Sorry for the inconvenience.
Downloading and installing the SDK fixed it for me. Thanks Mine Starks!!
Same here. SDK install fixed it.
Most helpful comment
@JohnGalt1717 Repairing the Visual Studio installation, or if that doesn't work, downloading the SDK from here would help in your case.