-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Error after installing TS 1.8 beta through Nuget #6929
Comments
do you still have imports to 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. |
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.) |
what errors are you seeing? |
and what version are you upgrading from? |
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., |
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? |
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 |
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? |
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. |
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. |
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:
No idea what's up. Any suggestions for troubleshooting?
The text was updated successfully, but these errors were encountered: