I have a Durandal application created in Visual Studio 2015, using mvc and ef6. When I deploy the project to the web, Visual Studio takes care of the bundling of the various js and css files, but not of those that Durandal is using, nor the view and viewmodel files I created in the app.
In the Durandal site there's a short explanation on how to do this; however, it is very minimal, and I cannot find a way to create the 'main-built.js' file described there. I followed the instructions of installing gulp and adding 'gulp build' command to the Build Events, but when I try to build the project it seems that 'gulp' cannot be found.
Can someone please provide a more detailed explanation on how to deploy a Durandal application using Visual Studio 2015?
1- Make sure that "nodejs" has been installed on your system.
2- Create a new empty web project in your vs2015.
3- Add "HotTowel: ASP.NET MVC SPA Template" with nuget package manager.
If you use "durandal 1.x" run optimizer from : "~\App\durandal\amd\" folder. (run it from a separate command prompt window is better solution)
If you use "durandal 2.x" follow this steps:
1- Install Gulp or Grunt via Nuget Package Manager.
2- Add a config file in the project root to create your "built config file" (Gulp or Grunt ...)
3- For automating builds with vs, follow this
If there is no error in the application ('javascript code'), even a bit !, it runs correctly.
Related
I have a simple Blazor application - I need to install jQuery, however, when I use the NuGet package manager to do so in Visual Studio 2019 it is installing a reference to the package where the package is placed in c:\users....
I have Visual Studio options for NuGet set to packages.config in package management and I was expecting to get a packages file in the Blazor code directory.
I need the jQuery to be accessible site relative (so under wwwroot\js or something like that).
Does anyone know how to get VS/Blazor to do this?
Why don't just use CDN? Just add this line to your index.html (in client project)
<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
Or you can choose from here
Or you can download the file and place it somewhere inside your wwwroot folder.
Also this question may be helpful.
I just downloaded Visual Studio Code last night. What do I do so that Code will generate, say, a Console Application template?
I've read around the web so far I can't find anything telling me how to create a template.
Q: How do I create and run a new project?
A: VS Code doesn't include a traditional File > New Project dialog or
pre-installed project templates. You'll need to add additional
components and scaffolders depending on your development interests.
With scaffolding tools like Yeoman and the multitude of modules
available through the NPM package manager, you're sure to find
appropriate templates and tools to create your projects.
for details: https://code.visualstudio.com/docs/setup/setup-overview
and a question on SO: Run C# Console Application on Visual Studio Code Editor on Windows
I have a project (.kproj) that outputs a library. Is it possible to sign the .dlls inside of my .nupkg? It seems to call klr.exe with my project folder and just output a NuGet package.
I looked through Managing Assembly and Manifest Signing but I can't find the Signing tab or anything related to it.
I am using Visual Studio 2015 CTP 5.
I have created a NuGet gallery in my company.
I want to create and publish a solution level NuGet package.
Everyone who will install the package will not get a dll but an entire project added to his/her visual studio solution.
Just like adding an existing project, the user will get a project with source code classes and everything is ready to use.
Just build it and use it.
I know it's possible, but couldn't find any documentation.
Anyone?
It is possible to add any files (not only .dll) and even directory structures to a NuGet package, so in theory you could store all files belonging to a project in a package and publish that. However, it is only possible to install NuGet packages into an existing project, meaning that you won't be able to add the packaged files as new project to any solution. In addition, the contained files will be put to the solution's packages folder, not to a solution or project folder.
As an alternative, consider creating a Template project instead of a NuGet package, as explained in How to: Create Project Templates and my blog post Creating template projects. This will result in a .vsix file that any developer can install as Visual Studio Add-In, the templated project will then appear in Visual Studio's File -> New -> Project... dialog as new project type and can be added to any solution.
Similar to your NuGet gallery, it is also possible to create a private Visual Studio Gallery to share such Add-Ins within, for example, a company, as explained in this MSDN article.
I've just started using SlowCheetah. When I right click my config file and choose "Add Transform" it doesn't only add the extra config files for all my configuration, but it also install a NuGet package which in turn adds a bunch of files to my solution.
Is the NuGet package required? I'd really prefer NOT to use NuGet at all in this project.
If it is not required, is there an easy way to add the transforms without installing the NuGet package?
I will always build the solution in Visual Studio (not on a build server) and it's ok to require that SlowCheetah is installed on the computer that is used for the build.
I'm using Visual Studio 2010.
Edit:
I've tried just uninstalling the NuGet package, but then the transformation doesn't work... :(
The NuGet package is now required. You can edit the project/packages.config to get around it but that's not recommended.