I am a single developer starting out on an ASP.Net Core MVC project with Angular 2. I used the Steve Sanderson template VS Angular 2 Template which works well in Visual Studio 2015. Up until now I have been developing the structure, and my understanding, of ASP.Net Core, Entity Framework Core, Identity, WebPack, NPM etc. and working in VS 2015 has been great.
Now I am moving on to learning and developing the client side of the project which in places will involve Angular 2. Already I am finding VS 2015 a bit clumsy and would like to try Visual Studio Code.
Is it possible to switch between the two on the same project? It would be great to be able to develop Angular components in VS Code and switch back to VS 2015 for any C# work. Writing code in VS Code I imagine would be fine, but what about the debugging/webpack building side of things?
Any experience or suggestions very welcome. Thanks.
I've successfully setup my Visual Studio 2015+ ASP.NET project on VSCode.
I've created an gulpfile that handle the build for me:
It starts an IISExpress instance.
Refresh my browser on razor code change.
And automatically rebuild my application when I change C# code.
You can find the gulpfile on my project's Github
Important note if you are going to switch between VSCode and Visual Studio:
When you want to create a new file, I strongly suggest you to do it in Visual Studio.
Related
I have a huge enterprise asp.net application that perfectly builds and runs on servers. We've been using Visual Studio 2013 in our workflow. Now we want to migrate to newer IDEs. But if I build this application in Visual Studio 2017 I'll get this error.
Error BC40004 sub 'PreInit' conflicts with event 'PreInit' in the base class 'Page' and should be declared 'Shadows'.
I think it's a problem with VB compiler version (again vs2013 builds project). Do you have any idea how to fix this?
My solution contains 40+ projects. The main project is asp.net webforms app written in VB.net. Other projects are services and code libraries written in C#.
I tried to specify VB.net version in .vdproj manually. But it didn't solve my problem.
edit: Fine. Thank you all for your responses. I got that problem is about code and that visual studio analyzer has changed a lot in the last few years. I'll try to find out the reasons why this code have been working without exceptions.
BC40004 is a warning, this shouldn't prevent you to compile the solutions unless you set the Treat warnings as errors on the project's property under the tab compilation.
I've got a Visual Studio solution containing a .NET Web API project as well as an Angular 6 project. I'd like to be able to run the Visual Studio debugger on the Angular app and have it auto refresh on changes to the Angular code just like ng serve would do. Is there a way to do this, or similar, in Visual Studio Professional 2015 or Visual Studio Enterprise 2017?
Check this one out. I think I know what you talking about. It can reload the page after you make changes.
https://marketplace.visualstudio.com/items?itemName=MadsKristensen.BrowserReloadonSave
I have been asked to update my Visual Studio with asp.net core. But the update told me I already have this component. However when I look in the list for New Project I can find nothing which includes the word CORE.
How do I work this out?
I'm not talking about a single Visual Studio Project or File. I'm talking about the whole program. I have to update the program.
You need to download Tooling Preview 2 to get the asp.net core templates. That is a bug in the visual studio 2015. Please follow the following steps to resolve this issue
This is what your add new project dialog will look like once you have .net core installed correctly. Were you able to resolve this?
Is it a console app or a web app? If you have a .xproj file in your Visual Studio project, then you have ASP.NET Core web application. Probably the same for an ASP.NET Core console application.
I am trying to convert my current asp net application to an ASP.Net vnext application and I am trying to figure out if we have have to use Visual Studio 15 or visual studio 14 ctp 3 for vnext to work? Will it work in visual studio 12 or 13?
I found this link
http://blogs.msdn.com/b/dotnet/archive/2014/08/18/try-out-the-new-releases-net-framework-vnext-asp-net-vnext-net-native-and-ryujit.aspx
and I haven't heard any updates.
If you want to use Visual Studio, you need Visual Studio 2015 and CTP6.
Good news is, you can have VS2015 installed side by side with 2012 or 2013 with no problems. (really!) And if you are not yet familiarized with the command line tools, I do highly recommend to install vs2015.
For migrations, there's some documentation in the workings on the Docs repo.
check this out : https://github.com/aspnet/Docs/blob/master/docs/migrating/migratingfrommvc5/migratingfrommvc5.rst
this is just one, there are a few more doc pages on that repo that might help you to get started and see which changes should be made and how to apply one by one.
Unfortunately the documentation is not finished and there's not much about it, so be prepared to have patience because you will be migrating and learning a new stack in the process.
Microsoft team has been very active and helpful in all channels (twitter, SO, github, etc) so, you can at least get help if you find a block.
The tooling for ASP.NET 5 is only available for VS 2015.
However, you can build and run ASP.NET 5 applications outside of VS using the command line tool and other editors.
I have three projects in one solution (ASP.NET)
ECL.BIZ.LOGIN
ECL.MODEL.LOGIN
ECL.UI
When I added a reference to other projects in ECL.UI project, namespace is not available in using keyword. My all projects are set to .NET Framework 4 (not ClientProfile).
Why is this happening?
Note: It was working earlier smoothly, it is happening since I deleted ECL.UI project and recreate it again. After then, I still can not find namespace of other projects.
I am using Visual Studio 2012
The answer of my question is:
We have to switch between target frameworks. As I am using Visual Studio 2012, I switched my target framework to .NET 4.5 for all projects and add the reference for required projects and switch back to .NET 4 again for all projects at same time. Then it works absolutely fine as I expected.
Note: I don't know why it is not working while all other projects are set to same framework even after recreating one of the project. However the above trick worked for me. If anyone having this weird problem after deleting one of their project and recreating it again, you can try the above on your own. Thanks to all