Does anyone know how to get Polymer 3 running with Visual Studio?
I have completed a demo using the polyserve development server. However, I cannot get the same code to work in Visual Studio. I would not think it would depend on the hosting environment.
I created a polymer element using these instructions:
https://www.polymer-project.org/3.0/start/first-element/intro
It works as expected. When I move the code to visual studio I get:
Failed to resolve module specifier
'#polymer/polymer/polymer-element.js'
I have noticed that when I run polyserve I get 64 requests for this page. When I do it in Visual Studio I get 3 - my html, webcomponents-loader.js, and demo-element.js
It does not matter which editor you are using. I use VS Code only for polymer-3.x.
After you have installed polymer in your local, you can create your element using polymer CLI.
create a directory where you want to start your project and cd inside the directory
open the terminal at this location and type the following polymer cli commands
polymer init -> select polymer-3-element, this creates your hello world element
polymer serve starts server. you can view your element http://localhost:8080
Related
Am working ASP.NET Web Application with Angular 6. For this, I created a solution/project by taking an empty Web Application template in Visual Studio 2017. With the help of Angular CLI, I added the Angular files successfully to the ASP.NET Empty project and the project structure looks like:
Whenever I am trying to run the code from VS 2017, then the Application won’t load main.ts file it only displays index.html content. But whenever I am trying to run the code from command prompt by entering the command as ng serve, then the application should launched successfully and load the main.ts file as well as display the UI/UX design.
So, can anyone suggest me what is the problem when I run the above angular application from VS2017 it won’t load the main.ts file? But the same application will work from command prompt using ng serve command.
open cmd
change directory or folder using cd command like cd desktop to your project folder
put ng-serve on cmd and hit 'Enter'
OR
npm run ng serve use this command...
I am having an issue with Visual Studio 2017 RC where when I run an MVC and/or WebAPI app using IIS Express the app never actually runs. Instead I get stuck with a page in the browser indicating it is trying to attach and from there it goes no further. If I open another tab/window in the browser and try to navigate directly to the launch URL, it just spins forever. Likewise when I run this using the dot net run command, the app launches and runs fine.
There do not seem to be any errors that I can see, just that the browser spins indefinitely without actually ever loading the page/endpoint.
Note: this occurs for most any circumstance. Newly created project in VS with no changes, known working project from previous versions, etc.
You could follow or upvote the issue: https://developercommunity.visualstudio.com/content/problem/11391/aspnet-core-iis-express-httplocalhost51733-failed.html
Looks like our workarounds meanwhile are
dotnet run
Publish to local IIS. Which is working for me.
(Untested: downgrade from core-1.1 to core-1.0)
If you aren't familiar with VS2017/asp.net:
You have, or can reveal via View Menu-->Other Toolbars :
Debug toolbar --> dropdowncombobutton saying "[green arrow>] IIS Express"
Click on the dropdown downarrow part of the button.
You should see a Run {yourprojectname} option.
This is the equivalent of dotnet run {yourprojectname} from the commandline.
You can configure the options that appear in the dropdown with
Right-click on project in solution explorer --> Properties --> Debug
I had this same issue and after digging around for a while I discovered that I had dotnet preview v1.0.0-preview2 installed under Programs Files (x86) and a non-preview version in x64. I think VS is launching the x86 (preview) version but expecting to see the full version. To fix this, I did the following.
from programs and feature uninstall every visible dotnet core. (note: for me this did not remove the x86 preview)
go to https://www.microsoft.com/net/download/core#/sdk and install BOTH x86 and x64 SDK packages
open command line and from the root directory check run: dotnet --version (at the time of writing it was 1.0.4)
fire up .net core project in VS 2017 and run.
When I did all of the above, I was able to start up the site in IIS Express from VS.
I currently have a somewhat working Windows 10 Universal app that uses the SQLite wrapper available here. The problem however is, when I deploy the app to a Windows 10 Mobile emulator in visual studio, it ceases to work, and instead gives me the following error:
Exception is about to be caught by JavaScript library code at line
401, column 5 in /js/SQLite3.js 0x8007007e - JavaScript runtime error:
The specified module could not be found.
As this works fine when deploying to local machine, is there some way I can ensure this works when deploying the UAP app to windows 10 mobile as well? Thanks a lot!
did you add the Sqlite module to your project ?
(under References -> Right click -> add new reference.)
I have installed VS 2015 preview. I am trying to use the Hybrid App javascript template to create a new project. But I do not see any cordova.js in the project. Trying to learn following the sample given here [ http://msdn.microsoft.com/en-us/library/dn832630.aspx ] it refers to referencing the cordova.js file from root of the project. But there is no such file visible. Nor are there any instructions to explicitly import it. What am I missing?
The application does build and show up in Ripple OK. But i am trying to figure out where does cordova.js file reside.
Thanks.
Cordova.js is added at the build time, after you build the project, you can find the cordova.js at \bld\Ripple\Android\Debug or \bld\Debug\platforms\android\assets\www (in case of Android similarly for different platform).
Therefore when you add reference to cordova.js in index.html, it is picked at run time. That's the reason your app is running fine even though Cordova.js is not present in Visual Studio project directory.
I have an MVC5 website successfully deploying a staging and production release to Azure using continuous integration from Visual Studio Online (TFS).
I have followed this blog post
Continuous Delivery to Azure Websites with git using custom deployment script
I have even added the build that is required to build to my publish profiles. ie.
stagingbuild | any cpu.
note: this was not mentioned in the above mentioned blog post.
The sites deploy ok using by VS2013 build but the configs are not transformed. I just get the default web.config settings and not the transformed ones from web.staging.config etc.
note: I am only trying to transform one appSetting at the moment to get it working
I totally understand how to write transforms so I don't think this is an issue and when I preview my transforms in VS2013 they transform in the previewer window.
note: I am not publishing directly from VS but committing my changes to repo and continuous integration kicks in from my Visual Studio Online repo.
Try:
Open Builds in Team Explorer
Edit Build Definition of your build
Set Process > Build > Configurations > Any CPU|Release or any other configuration/CPU combo.