-
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
TypeScript v1.7 MSBuild tooling breaks web application publish #5894
Comments
@paulvanbrenk has been looking into this, we are talking to the azure tools team to figure out the issue and get back to you. |
Thanks — please keep me updated. What has made this issue worse for me is that uninstalling the VS tooling leaves the MSBuild tooling files in place. Repairing the 1.6 tooling installation replaced the .targets and .props files but crucially not the task .dll file which, based on a diff of the compiled code, is possibly where the issue lies. I've managed to successfully revert back to the 1.6 tooling for VS 2013 by deleting the TypeScript MSBuild directory before repairing the 1.6 tooling installation. To make matters a little more complicated, machines that also had VS 2015 also installed had to have the 1.6 tools for VS 2015 repaired, even though the 1.7 tooling for VS 2015 had not been installed at all. |
👍 |
Can any of you share the |
I have produced a repro of the issue using How would you like me to supply the repro files? |
Ok, I think I have a fix for this specific issue, which required changes to the MSBuild task, and is not an easy fix in the targets file. |
Great, thanks. Can you indicate when the fix will be available? Is there a workaround other than to avoid 1.7 until the fix is ready? |
This is affecting us. To elaborate: We have two projects running (older using TypeScript 1.5, newer recently upgraded from 1.6 to 1.7). After installing 1.7, both projects compile fine through the IDE. Both projects fail using our build machine (msbuild.exe) It errors out on the step: Edit 1: Elaborate |
@JiriZidek the issue you linked is VS 2015, the issue discussed here is VS 2013. |
But worth noting that VS2015 update 1 ships with TypeScript v1.7 tools. Haven't tried a repro on VS2015 though. |
@mattbrooks2010 Don't have an obvious work around, and we're investigating an Azure publishing issue, which makes the timeline uncertain. |
@paulvanbrenk thanks for the update. Given I can swap back to the previous |
There was an issue with the way we calculate the output path when you used the 'outdir' option, however the fix we made wasn't sufficiently tested for the web publishing scenario: we used a full path, where a relative path was expected. |
OK so the issue with absolute vs relative paths is consistent with my initial analysis above. However I don't understand, given this is a behaviour change between the 1.6 and 1.7 tooling, how this is a web publishing or Azure tooling issue. Are absolute Thanks for your feedback on this issue so far. |
It has to do with how we calculate the path of the generated files, and collect those files for the publishing step. It's not related to the way |
I attach full build log, however there is nothing very ineteresting, but the end:
Build FAILED.
|
@paulvanbrenk sure, I understand that. I'm referring to this:
The issue is related to the contents of one of those So I'm still not clear how this is a web publishing issue. |
The files in this collection don't have the right relative path |
@JiriZidek the interesting bits are not in this log, I need the 'diagnostic' log, which you can get with the |
@paulvanbrenk right! So, why is this an Azure publishing issue, making the timeline for a fix uncertain? |
The Azure publishing is a different issue, but touches similar code paths; we need to make sure all publishing scenarios work. And we prefer to publish a single new installer which fixes both issues. |
OK thank you for the clarity. |
I can confirm this is happening with an installation of VS 2015 update 1. We have a build machine that has TFS 2015 update 1 on and VS 2015 update 1 on it. This machine used to have just the RTM versions of both. After updating, the same errors occur, but our build machine says the specific error is something like "the path is not supported" I'll update with the log using the /v:diagnostic like you were describing above. If I do that does it just add more to the log file that I just need to paste in here? which part are you specifically looking for? it gave up on doing the rest after one or two of the files failed. It does as you described, it adds the full path rather than the relative one twice and I get the error of "The given path's format is not supported." Please let me know where to find this extra diagnostic log info and provide it. We have CI builds on almost all of our projects, and right now only the ones with typescript are failing. so, while it could be related to web publishing, I think it could just be the typescript builder too. |
I am having the same issue. TFS is 2013 on premise and the build machine is running VS 2015 Update 1. I have turn on the flags you mentioned and attached the build output. Let me know if there is something else you need. |
Thanks @pmiddleton that file was useful. |
My team hit the Azure version of this issue. We worked around it by manually adding ContinueOnError="WarnAndContinue" to the Copy task within the CopyWebRoleFiles target, within Microsoft.WindowsAzure.targets. The compiled .js files are still copied, possibly via some other mechanism. There are a lot of warnings, but at least the Azure publishes work. |
After installing VS 2015 Update 1, we are hitting this issue as well. This is urgent for us, because it's blocking us from publishing to our Azure cloud service. The error we get is "Unable to copy file [path to .js file generated from .ts] to file [new file incorrect file path, incorrect due to duplicate absolute path]. The given path's format is not supported. |
We have the Azure publish issue as well. Same scenario. Workaround mentioned above does not fix for us, and we still cannot publish. SO here: http://stackoverflow.com/questions/34100740/error-copying-typescript-files-after-packaging-azure-project-visual-studio-201 |
Figured out what's happening, when you specify Thanks for all the logs and feedback! |
I don't have an $(OutDir) specified in my web project. However I am still running into this error when I try to publish the cloud project which references the web project. There are no build servers involved. This is all on the local dev box. Using mattbrooks2010 workaround of reverting to the TypeScript.tasks.dll which shipped with Typescript 1.6 fixes this for me. |
@gaziqbal Looks like cloud projects specify the $(OutDir) in their build, I don't have any issues building/publishing those with my fixes. |
Just a further reference point: we have the same symptom as @gaziqbal. No build server, all on a single dev machine, web project without $(OutDir), compiles fine but fails when we try to package an Azure cloud service which references the web project. |
Having same issues but I reported on msbuild repo (see above) with csproj code. Looking forward to a resolution. |
I am having this same issue, when it comes time to copy files to to the _PublishedWebsites\app\ folder (as defined in the Microsoft.WebApplication.targets file, Target Name="_CopyWebApplicationLegacy") it has the absolute path twice (eg C:\Builds\1\App_PublishedWebsites\C:\Builds\1\App\Scripts\SomeScript.js). It is a problem with the TypeScript.Tasks.dll. I copied back the 1.6 version and now our automated builds work again. |
We think we have a fix for this. @KentSwan, @nicholashead, @PageEngine, @gaziqbal, @JudahGabriel, @JamesDSch, @pmiddleton, @mattbrooks2010 , @brentdavid2008 @JiriZidek, and @mdsharpe -- Can you try VS 2015 TS 1.7.6 Update or VS 2013 1.7.5 Update and let us know if it solves the issue? |
@mhegazy Just tried for VS2015 and our Azure cloud service publish worked fine; we're back in business! Thanks for fixing this prior to the next scheduled release. |
This works for us too. TFS 2015 update 1 Xaml Builds normal web publishing - non Azure. Thanks! |
@mhegazy Thank you, my azure web project published after the installation of the update. |
@mhegazy Fixed here as well on VS 2015 (did not test VS 2013), packaging for an Azure cloud service. Have answered my SO question with links to the downloads here http://stackoverflow.com/questions/34100740/error-copying-typescript-files-when-packaging-azure-project-visual-studio-2015. Thanks for the quick fix. |
Tested using VS2013.5 desktop build / publish and also TFS2015.1 CI build / publish. Originally reported symptoms have been fixed. Thanks! |
Tested succesfully on TFS2015.1 classical XAML build. Thx. |
I was caught by the same problem on 1.7.4 |
Working great here. Thanks for being so fast with a fix! Another test case for the books, eh? 👍 |
1.7.6 on our build server solved problems here as well! Thanks! |
Hi, How can I install TS 1.7.6 on my build machine without installing full version of VS? |
The build tools for VS 2013 and VS 2015 are identical, so for your build server installing the VS 2013 bits should be sufficient. You may have to copy the files from:
to
We'll make sure any future installers work as expected. |
Closing this since it's been resolved and verified. |
Summary
Installing TypeScript 1.7 tooling for Visual Studio causes different behaviour from 1.6 when publishing web applications, both from within Visual Studio (right click > publish) and via msbuild.exe (
/p:DeployOnBuild=true
).This issue has only been observed using a file system publish.
Symptoms
Generated JavaScript is no longer included in the packaged / published output.
Observations
It appears there is a difference in the MSBuild
Content
ItemGroup's metadata. I believe that previously the generated JavaScript files were being included in theContent
ItemGroup as paths relative to the.csproj
file:As of 1.7 it appears the generated JavaScript files are now being included in
Content
as absolute paths:Perhaps this is causing a problem for the web publishing mechanism?
The text was updated successfully, but these errors were encountered: