microsoft / vsts-extension-samples

Sample extensions for Visual Studio Team Services
https://docs.microsoft.com/vsts/extend/
MIT License
298 stars 292 forks source link

browser tries to download extension html instead of displaying it #72

Open pabrams opened 7 years ago

pabrams commented 7 years ago

I tried installing the https://github.com/Microsoft/vsts-extension-samples/tree/master/calendar-public-events on top of the https://github.com/Microsoft/vsts-team-calendar The team calendar works fine before installing the public-events sample, but after installing the sample, when I visit the calendar, the browser asks me to download main.html, and then it doesn't show any US holidays.

Similar symptoms occur if I try to make a simple change to the vsts-team-calendar itself. I changed the "Submit a bug or request" string in calendar.html and regenerated the vsix, removed previous team calendar, uploaded/installed the new one, and the browser asks for permission to download calendar.html instead of just showing it.

Not sure if this is related to #65. I tried publishing to my own marketplace account and changing the publisher field in vss-extensions.json accordingly, but that didn't help.

I'm working on-premises with TFS 2017 Update 1.

pabrams commented 6 years ago

I think what fixes this is adding "contentType":"text/html" to the file properties.

pabrams commented 5 years ago

This issue could probably be closed after this gets merged and released, and then this repo gets upgraded accordingly.