Closed
Description
I have a largish solution that was working correctly with TS 1.7. I installed the beta of TS 1.8 through the nuget packages (https://www.nuget.org/packages/Microsoft.TypeScript.Compiler/1.8.0-beta and https://www.nuget.org/packages/Microsoft.TypeScript.MSBuild/1.8.0-beta). After installing these, when I build my solution, I get this error:
Description: Build: File 'COMPUTE_PATHS_ONLY.ts' not found
Project: Swyfft.Web
File: VSTSC
No idea what's up. Any suggestions for troubleshooting?
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
mhegazy commentedon Feb 5, 2016
do you still have imports to
$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.targets"
somewhere in your project file?if so, please see the steps in https://github.com/Microsoft/TypeScript/wiki/Configuring-MSBuild-projects-to-use-NuGet, the next release should take care of this for you automatically.
smithkl42 commentedon Feb 5, 2016
Well, that got rid of that error - thanks! I'd googled, but hadn't initially spotted that link.
But after I got rid of that error, when I built my project, I got several hundred other build errors that didn't initially strike me as correct. I'll hold off on migrating to 1.8 for now, I think :-). (I'd wanted the string literal types, but I can make it work with hacking enums to do what I need.)
mhegazy commentedon Feb 6, 2016
what errors are you seeing?
mhegazy commentedon Feb 6, 2016
and what version are you upgrading from?
smithkl42 commentedon Feb 6, 2016
I'm upgrading from 1.7.6. But after following the instructions in the link above, I'm still not able to use TS 1.8 features. For instance, this is from the sample code for string literal types (#5185):
But when I put that into my project after upgrading, I get these error messages:
When I last did it, I also managed to get a whole bunch of errors insisting that various items referenced in DefinitelyTyped files were undefined (e.g.,
ko.observable()
, that sort of thing). But I'm not seeing that right now at least.mhegazy commentedon Feb 6, 2016
the errors are about comparison locations, can you post a sample of the comparison you are doing. the error does not tell me what you were trying to do.
what do you mean by "undefined"? at runtime? or were there a compiler crash?
smithkl42 commentedon Feb 7, 2016
Sorry, what I meant is that after I upgraded, when I created a simple file that looks like this:
The compiler threw the errors above. In other words, I don't think it was actually using the TS 1.8 compiler: my guess is that Visual Studio is still using the 1.7 compiler (which shows exactly the same error messages for that code).
With respect to the other errors, I think the actual error was "Cannot resolve symbol". In other words, in a line like:
Where
ko
was defined in (say) knockout.d.ts, it would highlightko
and give the error "Cannot resolve symbol 'ko'". But like I said, the last time I tried it, I couldn't get it to repro that specific error.mhegazy commentedon Feb 7, 2016
Are the errors in VS? or when you build?
if it is from the build, can you look at the build log (tools\options\Projects and Solutions\Build and Run\MSBuild project build output verbosity, and chose Detailed), and see where tsc.exe is called from?
if it is from VS, did you install TS 1.8 VS plugin?
smithkl42 commentedon Feb 8, 2016
The errors are showing up both in VS (i.e., with the little red squigglies on my code) and when I build.
It looks like it's using the 1.7.6 version of the compiler:
And no, I didn't install the TS 1.8 VS plugin - my assumption (perhaps flawed) was that the point of the nuget package was so VS would use the nuget package over what was installed on my machine. So I've still got the 1.7.6 plugin installed.
This does raise a question that had me confused, namely, what the point of having two different nuget packages was. The instructions you pointed to earlier ( https://github.com/Microsoft/TypeScript/wiki/Configuring-MSBuild-projects-to-use-NuGet) only talk about installing the Microsoft.TypeScript.MsBuild task. I did that, but also installed the Microsoft.TypeScript.Compiler task - wasn't sure if that was correct or not, but it seemed appropriate. But perhaps I'm misunderstanding something.
mhegazy commentedon Feb 8, 2016
you only need the MSBuild one. it subsumed the Complier package.
i think what you are running into is #6715. try upgrading to the nightly Nuget packge on Myget and the errors should go away.