Can I use browserlink with an 'html' project? - html

I want to create an HTML project that works with browserlink. I created a blank c# project and set it to type 'class library' so that visual studio stops complaining that there's no 'main' entry point. I created a page index.html and setup a corresponding IIS website.
What do I do now? I can't start the project, because it's not a web project. Will this work, or do I need to create something like an MVC project?

Related

How to run Blazor app projet in subfolder of Razor Dotnet core projet?

I have one Asp Dot Net Core project, using Razor page, that is the ClientApp.
I create a new projet, using Blazor, that is the AdminApp.
I reference the AdminApp within the ClientApp.
I would like to call the AdminApp, from the ClientApp, when url is "clientapp/admin"
I cannot make it work.
Could you help me ?
Personally I would convert the ClientApp to blazor which should just require a couple lines being added to the startup.cs and then you can just import Admin components or update the route on top of the admin pages to include /admin/admincomponentname
This is the beauty of Blazor since serverside Blazor is essentially just razor pages with a small difference engine to run like a SPA.

Adding a razor page in Blazor Project creates a .cshtml file

I'm following a tutorial trying to create a blazor project.
It says to add a razor page. When I right click on Pages folder ->Add->Razor Page, I get this prompt.
No matter what options I pick, the new file is a .cshtml file, not a .razor file.
I see other .razor files in the same folder by default.
Target Framework: .NET Core 3.1
Am I missing something?
I'm using Microsoft Visual Studio Professional 2019, Version 16.4.3.
Instead of creating a new "Blazor Page", go to the dialog to add a "New Item". From ASP.NET Core, Select "Blazor Component". This will create a new file called YourComponent.razor.
Bonus Fact: To create a code-behind file for the component, add a new class and specify the name YourComponent.razor.cs. Declare the class partial (because the .razor file itself makes a partial class declaration).
I am also new to Blazor and this has been a source of confusion for me. I hope that they make it more straight-forward in the next version of Visual Studio.

FDT - Create a Project with existing source files, assets, folders etc

I am using FDT 5 and would like to create a new project with already existing source files and assets. When I start up the Project Wizard (New->FDT Project) I browse to the folder I want to make as the project but I cannot proceed as FDT gives me the error:
*"PROJECT_NAME overlaps the location of another project: PROJECT_NAME"*
I have downloaded a flash project (developed in FDT) and would just simply like to make it a project in my FDT environment.
I mean this shouldn't be so complicated right? I don't want to create an entirely new project (its own folder) I want to use the same folder I downloaded and view that project. I am using git so I have to work in the same path, sort of speak.
Any ideas?
EDIT:
Apparently this is an issue with FDT, a small bug. I managed to solve the problem following this:
FDT / Eclipse Error : ‘overlaps the location of another project’
And on the eclipse forum:
Eclipse Forum

How to set up visual studio to create CSHTML files in (Umbraco) Project

So, i'm developing my razor macroscripts in Visual studio for my Umbraco project.
Everything is working fine, but there are two things really annoying.
If I want to make a new CSHTML file the best solution for this is to duplicate an existing file.
I dont have full razor IntelliSense like e.g. Html.Raw
Is there a way to configure my project to use this features? Didn't find a .cshtml template yet.
You need to have the MVC Framework installed, then when you open the project as a website, you should be able to create and edit cshtml files with syntax highlighting. See my answer to the following post for more details:
Setting up local development environment for Umbraco
If your project is a web site/application then the mvc templates aren't available (they only show up in MVC projects). You can just create a text file and name it with the .cshtml extension though (you could set up your own template for this in VS if you wanted to).
To get intellisense in your Razor files, see Doug Robar's blog post on the subject
As an alternative if you go into the Umbraco admin, go to the 'Developer' section and right click on 'Scripting Files' you can create razor scripts directly (and this will save the new .cshtml directly into your 'macroScripts' folder - although in VS2010 you will need to right click on the new script and choose 'include in project').
Also this will allow you to base your new razor macroscript on one of the pre-built snippets so you may get a bit of core functionality for free.
From Umbraco 6 on it's very convenient to install Umbraco on your local file system with Visual Studio and NuGet. Given that you have the MVC Framework installed and you use Visual Studio 2012 or above, you get full Razor support in Visual studio.
Umbraco Our has a great blogpost about this where they described the steps below in detail (with screenshots!).
Create an Empty Web Application.
Install Umbraco using Manage Nuget Packages ('Umbraco CMS') or the Package manager console (Install-Package UmbracoCms)
NuGet will then download dependencies and will install all of Umbraco's files in your new solution. During this process it will ask if it is allowed to overwrite your web.config file. (Make a back up of your existing web.config if you install Umbraco in an existing project)
Finally, don't forget to run your project hitting F5. You'll see that whenever you try to add or edit a file in your views folder you have razor support and intellisense

How to create HTML 5 project in Aptana Studio?

I installed Aptana Studio 3 on my windows machine.
I created new WEB Project but when I expand my Proj folder I can see only "Connection" tab. Nothing else. What is the prob? what should I do to get all the files?
Forgive me if the following is what you already did but I was not certain what steps you took from your question/post ... I'm going through the standard steps for creating an HTML 5 Web Project with the Boilerplate templates:
Open Aptana ( duh :) )
File -> New -> Web Project
Provide a Project Name and select your directory if you don't want the default used
Press Next
Select the checkbox for 'Create the project using one of the templates'
Select the HTML5 Boilerplate (use the cached one - I can never get the other, networked one to work)
Select Finish
You should now see the new project and all its default files in your App Explorer view in Aptana.
If you followed those steps but it still fails, I would file a bug (or, at the least, check the existing issues with Aptana) at:
http://jira.appcelerator.org/browse/APSTUD (bugs)