I'd like to add angular2 to a Visual Studio 2013 project, is it possible to do with nuget?
I found a codeproject article describing I need Node Package Manager to do this, dated 30 Nov 2015.
While it is possible that a NuGet project exists that simply wraps up Angular2 into a package and while it is possible that you could add this to your solution, I would HIGHLY recommend that you avoid this course of action.
Microsoft has made a very deliberate decision to redirect efforts into supporting and expanding web standards. Currently, the standard for Angular2 is to use npm to manage your scripts. There is built-in gulp task runner support for this in VS 2015 and you can certainly manage it via gulp or grunt plugins in VS 2013.
Finally, consider how quickly the web world is moving right now. Maintaining a NuGet package for every Angular2 version would be exhausting, if not disastrous. Embrace the direction that the web is moving and switch to managing your JavaScript libraries with NPM, not NuGet.
Related
I use VS pro at work and I am 100% typescript (and React and Node...) beginner dev. I am also trying to understand how all these things work together, why I'd need a given tool etc, not just copying CLI commands and code lines into files.
Here I found there are 3 different sources to download typescript: npm, NuGet and VS Marketplace.
My guess is npm and NuGet are the same thing just published to different repos but the bits from the Marketplace are always mandatory. Is that correct?
If not, what are the differences among them? I am confused.
What are the differences among npm, NuGet and Marketplace download options for Typescript?
What you understand is correct. npm and nuget are two tools for managing libraries. TypeScript provides source for two different tools. Just like you said, they are in the different repos and the way to get them is different also (one is via npm and another is nuget).
For the VS Marketplace, This is another way to get the TypeScript, integrating the TypeScript into the Visual Studio through Visual Studio extension, which has nothing to do with the way of managing the libraries.
So, What you understand is correct.
Hope this helps.
Please note that I am new to front-end and back-end Web API development.
I am not sure if this is possible, and I suspect it is not, but I am wondering if anyone knows whether or not it is possible to modify a .NET CORE Web API with both Visual Studio Code and Visual Studio Community? I suspect it is not because VS Community creates the project with a solution files whereas VS Code does not.
The reason for doing this is that I like the CLI nature of Visual Studio Code to create .NET CORE Web API's that can be developed in tandem with a EmberJS front-end framework. However, I much prefer Visual Studio Community's debugger and intellisense for more advanced development of the back-end. This is purely a preference and not necessarily a show stopper.
Update:
If it is possible, can you please provide the series of commands I would need to issue in order to create a dotnet webapi and add it to a dotnet sln?
Update 2:
The dotnet CLI website does not show how to add a dotnet webapi project template (with a corresponding solution file), which provides a base set of files to create the Web API. From what I can tell, we can add individual files (i.e., *.csproj). Is there a way to create a dotnet webapi project template with a corresponding solution file all at once; or do I have to either add each file manually in VS Code or just create a Web Api in VS Community and then work with it in VS Code?
Reference: https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-sln
Q&A Style:
I am not sure if this is possible, and I suspect it is not, but I am wondering if anyone knows whether or not it is possible to modify a .NET CORE Web API with both Visual Studio Code and Visual Studio Community?
It is possible. I use VSCode and vim on this: https://github.com/sillsdev/appbuilder-portal (which is a .netcore + React app)
However, I much prefer Visual Studio Community's debugger and intellisense for more advanced development of the back-end.
VSCode has a .net core debugger and intellisense. you may need to install the C# extension.
If it is possible, can you please provide the series of commands I would need to issue in order to create a dotnet webapi and add it to a dotnet sln?
dotnet --help can walk you through this, if you don't feel like looking up docs. Here are the docs though, if you want to bookmark this or somethin': https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-sln
dotnet sln add path/to/project.csproj
Is there a way to create a dotnet webapi project template with a corresponding solution file all at once; or do I have to either add each file manually in VS Code or just create a Web Api in VS Community and then work with it in VS Code?
I think in the CLI, this needs to be multiple commands.
dotnet new webapi
dotnet new sln
dotnet sln add *.csproj
hope this helps
I'm looking for suggestions on how best to share VS projects across Team projects in TFS (currently 2013 on-prem, but will soon upgrade to 2017 or VSTS). Our primary use case is for Request/Response models for Web API projects, but we've recently started trying to share more utility code and custom parsers across our development teams as well.
In our current setup we're using self-hosted NuGet packages, but this is a manual process and error prone. It also holds us back from moving to VSTS because Package Management isn't included in the Basic tier.
We could probably reduce the dependency on shared models by using Swagger to document our APIs, but that seems like a cop out.
Any suggestions?
It's not suggested to reference projects outside your solution root. You should make a project reference or create a NuGet package.
Since your projects are across Team projects, Nuget package is still the recommended option. In VSTS and TFS 2017, you can host your NuGet packages using Package Management feeds. Check: https://www.visualstudio.com/en-us/docs/package/overview.
In the process of building an ASP.NET Core MVC rc1 application with SQL databases, c#, bootstrap, angular, css, javascript, javascript dependencies, package managers like bower, or any visual studio project for that matter, I sometimes break the application and would like to roll it back to a previous state when the application was working.
What are some techniques/the best way to create incremental versions, save and flag working versions, and rollback to earlier versions especially when a project has so many moving parts, technologies, and dependencies?
I would prefer a technique that exists inside Visual Studio, or the most standard/popular Microsoft or open source technique or tool that may be free.
I also would like the option to do the backups on my local machine rather than on an external server.
If anyone else has this question: I found Git to be a great way to achieve this purpose. Unlike many version control systems, it keeps the change repository on the local machine and only places it on a server when the project is merged. As of 2015, it integrates well with Visual Studio and TFS. Here is a video from the Build conference explaining its integration with VS2015:
Channel 9 - using git in visual studio
https://channel9.msdn.com/Events/Build/2015/3-746
We are currently migrating our source control to Visual Studio Online. A feature we had in our old system (SourceGear Vault) was to share projects between solutions. Although this created a folder for our Framework project in each solution it kept it up to date when changes were checked in.
This is useful to us as it allows us to work on the Framework code in all the Solutions that are using it. I know its better practice to just compile the dlls and reference them - at this point in development we want to continue having full code access and debugging in all the solutions using this core framework.
Any help very much appreciated.
You have a few equally valid options for handling shared projects:
Reference the same project from each solution that needs it.
This gives you full control over the source code of the shared project while you work on the consuming solution, and may allow for easier debugging.
The downside here is that maintenance and releases may become trickier if Solution A is being released on Thursday, but Solution B is being released in 3 months and is in the middle of a huge refactoring cycle that has significantly modified Shared Component X, and Shared Component X isn't stable enough to be released.
Reference shared components from an internal NuGet repo.
You set up your release pipeline to push the shared components into NuGet as part of your release process (ideally, using a purpose-built release management tool... Microsoft Release Management is what I have in mind here) -- you check the code in, project gets built. Release process packages it up and pushes it into NuGet as a "prerelease" version. You reference the latest version in anything that needs the latest version.
If you need to reference a known-good, stable version, you just make sure your project is configured to pull a specific version from NuGet.
When you're done, you've tested the shared thing, and you know everything is good, you approve the prerelease version, and the same binaries are repackaged into a "stable" version.
The downside here is that there are some additional software requirements, configuration, and training for your team. This would be my recommended approach.
Check binaries into source control.
I don't recommend this one -- you end up bloating your source control repo (and if you're using Git, it's an explicitly stated anti-pattern -- never put binaries into Git, it causes long-term severe performance problems), and it's never exactly clear which projects are using which versions of which assemblies. It's a maintenance nightmare.
(1) is the best approach if you're releasing everything in lockstep and don't have to worry about maintaining separate versions.
(2) is the best approach if #1 is false.
(3) is the best approach if #1 is false and you're a time traveler who is posting from 2006.
Have you considered implementing Symbol Server and Source Server indexing with the check-in binaries or NuGet repo approach? This allows you to easily get back to the source while debugging and it's coming from a single known location. Visual Studio Online and Team Foundation Server have built-in support for helping you out with getting this setup during your build process. Here's more information in a write-up here: Source Server and Symbol Server Support in Team Foundation Server and Visual Studio Online
Thanks for the responses. We actually found a solution that works well for us. We branch our framework project into the implementation projects when we want access to the code base. If not we just use the DLLs
If it is then altered and checked into the implementation project it can be merged back with the other Framework branches easily when ready.
This probably wouldn't work well if the Framework code was being developed heavily, as it is now its only undergoing small additions and tweaks so wont be plagued with merge issues.
I have to agree with the majority. I just ran into the same issue. I implemented the Nuget Gallery Site on the internal network. It was a pain to implement, but once implemented, it's easy to use. I created a class library project that implements ADO.Net and the EntityFramework. I bundled it into a NuGet package and uploaded it to the internal NuGet gallery. From there I was able to add a package source to the internal NuGet gallery and grab the package that I uploaded. Very simple and convenient.
I set up the NuGet Gallery with Visual Studios 2017. FYI: Make sure that building the project isn't part of the Publish. It will not render with a ViewHelper.cshtml error.
I created the projects with Visual Studios 2015. I ran the command prompt as administrator. I also had to copy the NuGet.exe file into the directory where the project file existed.
Check out the below links for more information.
NuGet Gallery
Hosting NuGet Gallery
Create and Publish Package
Creating a Package
Create .Net Standard Package