Q1 - As far as I know, Visual Studio doesn’t use aspnet_compiler.exe when compiling web application projects. And since Web Deployment Projects (WDP) tool is only used for manipulation the output created by aspnet_compiler.exe, I don’t understand how VS 2008 also has an option for using WDP with web application projects?!
Q2 - What is a stock project?
thanx
EDIT:
So I was right about the fact that Visual Studio doesn’t use aspnet_compiler.exe when compiling web application projects?
much appreciated
Web Application Projects are real projects - they really build, and produce a single assembly in the output (bin) folder, as well as any copies of referenced assemblies, etc. This is what a Web Deployment Project will package.
It's useful to keep in mind that Web Application Projects and Web Deployment Projects were the only way to create web projects until .NET 2.0 and Visual Studio 2005. In many cases, the better question will be "how do web site pseudo-projects ever work".
aspnet_compiler will compile .aspx/.ascx /.ashx etc.. files also (not just the code behinds). Visual studio does not. So if you want to precompile those files, use the Web Deployment projects and/or precompile manually.
Related
I have a third-party DLL. I have added this DLL to the bin folder of a Web Site project and can access it no problem. I then added it to the bin folder of a Web Application project, and when trying to access it I receive "The type or namespace name could not be found."
From my research, it could be an issue with .NET target version. The Web Application project is targeting a higher version of .NET than the Web Site project so this should not be an issue.
I also checked that the file is present in the bin folder in the file system and has the same permissions as other files in the bin folder.
I have been searching for a solution for a while but most things that come up are for other project types like WPF, or talk about project references but this is a DLL.
Anything else I can check as to why the DLL cannot be used by the Web Application project? I am using Visual Studio 2017.
Managing references in a project:
Before you write code against an external component or connected service, your project must first contain a reference to it. A reference is essentially an entry in a project file that contains the information that Visual Studio needs to locate the component or the service.
To add a reference, right click on the References or Dependencies node in Solution Explorer and choose Add Reference. You can also right-click on the project node and select Add > Reference. For more information, see How to: Add or remove references.
Web Site projects are an odd old beast which are different from every other project type. They're also no longer recommended
For new development, we recommend that you choose web application projects. This topic explains that web site projects have some advantages, but many developers who choose web site projects eventually find that the disadvantages outweigh any perceived advantages. In addition, as new ASP.NET features are developed, they won’t always be made available for web site projects. For example, the next Visual Studio release after Visual Studio 2012 will have new tooling for creating web projects, and this new tooling will work only with web application projects.
I'd note that that page doesn't mention that, yes, Web Site projects add references just by copying into the bin folder.
I primarily use Visual Studio, C#, and WebApi for my projects. We're looking to utilizing Ember, Ember relies heavily on Node Package Manager. Which Visual Studio does support, but is there a way to integrate Ember and their Command Line better into Visual Studio?
Currently, we would use Node and Ember for our frontend, then we would open Visual Studio and our backend code. They're currently separated, was hoping to avoid having to switch a better integration.
I have also tried myself and at the current time there are no usable plugins that help integrate ember into VS. You may use VS editor to modify the source but you wont get a lot of the build tools and extra features of VS.
I'm in the same scenario, WebApi backend + Ember client. Currently I add de ember app folder in the visual studio solution as "Existing Web Site", hide node_modules and temp windows folders and run all commands from external command line.
I have a MVC web application that I am developing in Visual Studio 2010. Along side my MVC project in my solution I also have 2 Class Library projects.
When I right click the MVC project in the solution explorer I get (among others) these options: Build Deployment Package, Publish..., and Package/Publish Settings.
These options are not available for the 2 Class Library projects, so prior to uploading any code I am currently putting everything in a deployment folder on my local machine using the Publish... option for the MVC project and just copy & pasting the other 2 projects in windows explorer.
I would very much like to use the Publish... option to deploy all 3 projects using FTP to our server.
I have discovered that if I change the Output Type of the 2 Class Library projects from Class Library to Console Application then I get the options to Publish... etc., but they aren't Console Applicationss so I don't really want to do this.
My question is, how can I , using Visual Studio 2010 publish Class Library projects using FTP?
UPDATE
Turns out I'm a numpty!
Because the MVC app references the 2 class libraries, the .dlls for them are already included in the bin folder for the MVC app and I didn't need to include the other projects when I publish.
You shouldn't need to separately publish the class library projects. When you publish the MVC project it will include any references the project has. As your MVC project references the 2 class library projects, when you publish it the class libraries will be included.
Might this one help
Change Solution Configuration to Release mode (by default it may be debug)
Click on Solution Explorer and Rebuld the library project.
This will release the dlls to [yourProjectFolder]\bin\Release
You need to customize how deployment process collects files you want to include in your deployment package.
Since your question is about Visual Studio 2010, I've found a Q&A here in StackOverflow that will guide you to the right direction in terms of including additional files (like your class library assemblies) as part of your deployment:
How do you include additional files using VS2010 web deployment packages?
I've recently started to explore Daniel Mohl "F# C# ASP.NET MVC3" template.
Can anyone share on how this type of project should be deployed to IIS7??
Thanks.
You deploy it pretty much the same way you'd deploy a "normal" ASP.NET MVC3 website, but there is one extra step: you need to make sure your deployed website will have access to FSharp.Core.dll.
If you have admin access to your server, you can simply install the F# redistributable; if not, you'll need to make sure FSharp.Core.dll is included when you publish or create a deployment package. The way I handled this in our website (written in MVC3 with C# + F#) was to manually add a reference to FSharp.Core to the website project, then right-clicked the reference, clicked properties, then set "Copy Local" to true. If you use any assemblies from the F# Powerpack, you'll need to do the same for them.
If I'm correct, the template consists of a C# Web Application that references F# Libraries (DLL) project which contains some of the functionality (namely, controllers and the model).
From the deployment point of view, this is just a normal C# Web Application with some referenced DLLs (created in F#) that will be copied to the bin directory, so the standard deployment procedure should for Web Applications should work just fine. I didn't try it myself now, but try:
Publish application to some folder (right click on C# web project in the solution explorer)
Copy that directory to your web server
Follow the usual IIS configuration steps (see for example here)
I have a VS2003 solution with 21 ASP.NET 1.1 projects in it. My goal is to eventually migrate them to 2.0 and then 4.0. There are mainly internal admin apps for different departments.
I want to create a multi-project solution now in VS2010 and migrate/re-code these one at a time in ASP.NET 4.0 Web Forms in VS2010. There will be some artifacts common to all projects such as CSS, scripts and images. Could the use of Resources help with the common files and would it be possible to have a single master page for all projects?
What are the best options for creating a multi-project solution here?
From what I understand, your goal is to share resources like CSS, JS files across projects. One way to do it would be to use linked files in Visual Studio. We do it extensively in one of our solutions where we share many class files and signing keys acorss projects. Linking files basically involves putting the files in one project in the solution and then linking to them from other projects of the solution.
You have to be a little careful though during deployment of projects containing linked files as linking the file does not physically copy the file to the destination project. So even if your project has a css folder, the linked file shown under that folder in VS is not physically there in the directory structure on the disk . If you link classes, the dll for the project that has the linked class file will include the linked class, but for resource files like css, JS and common masterpage, they will not be copied over when you deploy. You can leverage build scripts or some simple batch files to handle those issues. This should solve your problem.
Why not just convert them directly to .NET 4.0?
Beware when you move them to .NET 2.0 that the default project type in Visual Studio 2005 changed from the type of project you're used to in VS2003 to "web site" projects. But with Visual Studio 2010, you've got the same Web Application Project you're accustomed to, so why not just go there directly?
Also, be aware that VS2010 can target .NET 2.0 applications, so there's really no reason to stop there.