JuiceUI - sharing across projects - juice-ui

Is there a known way to configure JuiceUI to exist in one Visual Studio Web Application project and reference it from another Web application? We want a centralized location for all of our Web Application to use it instead of having to install the JUiceUI.dll and Scripts folder in every project.
Thanks

Related

Debugging multiple ASPNET Core applications simultaneously in Visual Studio

Setup
We have a VS 2017 solution with 2 ASPNET Core 2.0 projects:
Project 1: WebUi - an UI project based on Vue with Typescript that contains the frontend of the application
Project 2: WebApi - an WebAPI project that contains all the api implementation
The productive deployment under IIS looks like this:
The Web Physical Path points to an empty folder. The WebApi points to the folder where the WebApi VS project is published. The WebUi points to the folder where the WebUi VS project is published. This works fine: the WebApi is accessible under /webapi and the WebUi is accessible under /webui. This setup also means that we don't need to handle CORS requests, since both projects run under the same domain.
What we are trying to achieve
Now we are trying to define a setup in VS 2017 that will allow easy debugging of both projects at the same time. What we have got so far is to publish the projects in debug mode and then attach to the hosting executables. This works fine. The problem is that for each change in the code another publish is needed in order to debug the new code. This takes too much time.
What would be much better is to just hit F5 in VS which would start both applications under the same host (like the IIS setup) in debug mode and be able to debug both projects at the same time. One project at a time works, but not both.
We have tried Setting the AppUrl of both projects in debug properties to the same url but with a different path:
Project WebUi:
Project WebApi:
But unfortunately this did not work.
How can we set up our project such that there is an easy solution to debug both projects at the same time?
I don't believe this is possible. From my experience you can only attach the debugger to a single project under a solution. Personally i would merge the two projects, with the API section being in an API Area. Another route is to move the two projects into their own solutions then you will have to open 2 visual studio instances to run the site.
Setting up an Api area inside the Ui Project
Startup.cs, Configure method
app.UseMvc(routes =>
{
routes.MapRoute(
name: "areaRoute",
template: "{area:exists}/{controller=Home}/{action=Index}/{id?}");
routes.MapRoute(
name: "default",
template: "{controller=Home}/{action=Index}/{id?}");
});
Create an folder structure Areas > Api > Controller. Then put all your API controllers in the folder. Then add Area and Route Attributes to all Api controllers
[Area("WebApi")]
[Route("[area]/[Controller]")]
With this set up the Ui project will reside on / and the api will reside in /WebApi. The whole solution will have one project, one IIS site, and VS will be able to debug everything at the same time. If you want the Ui to reside on /WebUi, either update your primary routemap or create another folder in Areas.
If you want to debug the deployment projects, I think the only option is to attach the debugger twice from VS to each app.
We usually develop project by Running project under IIS by changing Project properties->Web->Servers->Local IIS->Create Virtual Directory for the two projects, then it will run under IIS when debugging.
To run both projects, you could follow Solution properties->Startup Project->Multiple startup projects-> Set Start Action for them->F5, VS will run both projects.
So you could follow above steps to re-publish your projects, then you will be able to debug for both projects, or, you could only use for development and test, you could publish them if there is no problem.

How to create the asp.net web setup project

I have a Asp.net application which I want to make it easy to depoly in client machine by click the .ext or .msi file.
Then I found the "web setup project" in vs.
However I have no idea how to make it.
In my case,my application need .Net 4.
And after the app is deployed I have to modify something in the web.config which I want to gather through the install wizard.
Also I need to do some clean work after deploy(modify some files).
So I wonder if my requirement is possible using "web setup project",and how to make it?
In Visual Studio you can modify files during install only through custom actions. So you will need to write custom code which does what you need. Regarding .NET Framework 4, it can be added as a prerequisite.
If you want an easier solution, you can try a commercial setup authoring tool: http://en.wikipedia.org/wiki/List_of_installation_software
For example, Advanced Installer has a dedicated project type for ASP.NET applications.
Yes,We can make Custom Actions(Framing Connection during installation ,Consuming WCF service for Web App)to .msi file during installation.
If you want to have more clear picture about this refer my articles.
This is to create or change Connection string along with setup creation for Windows Application
http://www.codeproject.com/Tips/446121/Adding-connection-String-During-Installation
In this creating setup file for Web App which consumes WCF service
http://www.codeproject.com/Tips/477202/SetUp-file-Creation-for-Web-Application-which-Cons

"Calls to the web service will fail unless the Silverlight project is hosted in and launched from the same web project"

I have Downloaded demo project from here
I tried to run Silverlight project SkiResult.ThinClient from the “Solution Explorer” I have configured the database nicely as SkiResult.FullClient a WPF Project works fine and display data.
But whenever I have tried to run Silverlight project in my Solution Explorer it shows me following error message.
I have googled so much I have also found one solution that set xyz.WEB project as a Start Up Project but as u can see from below screenshot of my Solution Explorer there is no xyz.WEB project in solution.
Thank you so much.....
Try setting the SkiResult.DataService project to be the startup project. This looks very much a web project created to host a Silverlight application because:
it has a Web.config file (so it is clearly a web project)
it has a Silverlight.js file (some utility JavaScript used with Silverlight),
it has some autogenerated test pages,
it has a ClientBin folder, which is typically where the compiled Silverlight application will be copied to.
When you create a Silverlight project, Visual Studio offers to create a web application project to host the Silverlight application for you. (You don't have to create a web application - VS can generate a test webpage during the build process and use that instead.) If your Silverlight project is called Xyz, then this web application will be called Xyz.Web. However, with the solution you're dealing with above, it seems this project has been renamed from the default.

How do I keep folder tree and publish websites in TFS 2010?

I have a visual studio solution that consists of several web applications, windows services and other class libraries. I am in the process of configuring it for continuous integration with TFS 2010.
The default build template puts every binary in the drop folder, and creates a _PublishedWebsites folder in which it publishes every web application. I do not want that because I need to separate the files that belong to one service from the files that belong to the another service.
I have followed the steps in TFS 2010 BUILD SERVER: Can not keep folder tree in the drop location to put each output in its own folder. That works well, but now my web applications are no longer published. The project is compiles and its binaries are placed in a sub-folder inside the drop folder, but it is missing all the other files, like Web.config, aspx, css, etc.
I could probably use two build templates, one for web applications, and the other one for windows services, but I'd rather have a single build template. How can I achieve this?
Why you don't use separate build process for each web application? Creating multiple build processes and multiple build definitions is very easy. You can copy or branch template process and then create a new build definition for each of them.

How to run an ASP.NET Application on Another System?

I have developed an ASP.NET web application in visual studio 2008. I want to run the same application on another system, but Visual Studio is not installed on that system. Is there a way I can run without visual studio?
I heard about deploying, but I don't know much about it.
You can publish your site from Visual Studio to a server that's running IIS, more info here:
How to: Publish Web Application Projects
You can use the built-in deployment features of Visual Studio (right click on the web project, select publish and follow the prompts) or you can simply copy all the dlls plus your content files from the web project to the IIS folder you want to deploy to (known as xcopy deployment). You could also deploy via a setup project, which will create an MSI package, but that's a bit more work. Here's a couple of links that might help, but you can do a search for the options described above and you will find plenty of resources:
Deploying ASP.NET Applications - Part 1
Deploying ASP.NET Applications - Part 2

Resources