What do I need to install to compile Silverlight 2.0 applications on my build server - asp.net

What's the minimum that I need to have installed on my Build Server (in addition to the standard .Net 3.5 stuff) to allow it to compile Silverlight 2.0 applications?
I have a Silverlight application that seems to be building correctly, but is not playing nicely with a related Web Application project - see this related question that I asked earlier: Silverlight xap file not being copied to ClientBin on Build Server

AFAIK you need Microsoft Silverlight 2 SDK to install on the build server.
HTH

Your build server should be pretty much an exact replication of your development machine as far as plug-ins, assemblies, run-times, SDK's etc.
You build server will be building your app via MSBuild.
In your particular case I suspect that you need to install the Silverlight Toolkit. This will give you the SL development runtime and the appropriate project build requisites for your XAP files to build and be deployed properly.

Related

Is it possible to host an ASP.NET MVC app without the .NET Core runtime or sdk?

I am struggling to understand how all these frameworks interact and depend on each other: .NET Core, .NET Framework, ASP.NET Core, MVC, etc.
This discussion leads me to believe that my MVC app uses ASP.NET Core and .NET Framework, but not .NET Core. If that's true, can I run the MVC app without the .NET Core runtime? If not, why is this app still dependent on the .NET Core runtime?
What I tried
I created a new project in Visual Studio 2017 as follows:
ASP.NET Core Web Application
MVC
.NET Framework
ASP.NET Core 2.1
I published the app as follows:
dotnet publish --self-contained false (to prevent the runtime from being included)
Deploy new ec2 instance with windows server 2019
Install minimal set of dependencies (IIS, .NET Framework, Rewrite Module)
Deploy the published app to IIS
The app did not work at this point. I got a 500.19 with error code 0x8007000d. I got it working by installing the Hosting Bundle. I manually removed a few things that were installed with the hosting bundle, and found that "Microsoft .NET Core 2.1.28 - Windows Server Hosting" is required. I don't know exactly what that is, but it smells to me like the .NET Core runtime is somehow involved here.
Update
When I install the Hosting Bundle, I see a few important things get installed:
C:\Program Files\dotnet\dotnet.exe
C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All\
C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App\
C:\Program Files\dotnet\shared\Microsoft.NETCore.App\
When I uninstall the .NET Core Runtime, I am left with just the following:
C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All\
C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App\
The app still works at this point. I assume what remains is the ASP.NET Core Runtime, which is different than the .NET Core Runtime. I am just looking to confirm that this app is only dependent on the ASP.NET Core Runtime and .NET Framework, and not at all dependent on .NET Core.
We have a system that has CPU, memory, disk, network card, IO devices, etc. We need a software to manage these resources for us and let us use this system. That software is the kernel. (say Linux)
Now that we can control the hardware we need abstraction on top of it for daily usage for users. We need shell, windowing system, different kind of services and daemons. We call this whole package the Operating System. (say Ubuntu)
Now that we can happily use our computer, we want to write our own applications for our problems or maybe for other's problems. The OS provides us with a programming language and a library of functions and system calls that we can use to create software, just like the OS itself is using them. (say C and glibc)
Suddenly we realize that our software is not portable to other Operating Systems and it has a lot of complex boilerplate codes. So we create a new programming language and provide a new set of library functions but this time way easier to read and understand. (say C# and .NET 5 SDK)
But we have a problem. Our OS does not understand this new language. So we need a layer between our language and the OS. This piece of software must read our program and somehow translate it for the OS. This program is the Runtime. (say .NET 5 Runtime)
OK, let's review. We create an app with C# and .NET. this results in a program that is in the IL language. OS does not understand IL language, therefore we need the .NET runtime to read our IL app and translate it for the OS. But how do we set this up?
We have two options:
We install the .NET runtime on every system that needs to run our app; this way our app becomes portable but it needs the runtime to work.
We include the runtime code inside our app; this way our app does not need the runtime but it won't be portable anymore and since it carries the runtime it will be larger.
Now to clear a few of your confusions:
What is the difference between .NET Framework and .NET Core?
.NET Framework only runs on Windows and has more libraries to use.
.NET Core is cross-platform and has fewer libraries to use but is very fast. It now goes with the name .NET 5 and those extra Windows-only libraries have been added to it.
What is the difference between .NET SDK and Runtime?
SDK provides you with the tools you need to build an app with (SDK includes the Runtime as well).
Runtime is lighter and just runs your app.
What is the difference between .NET Core Runtime and ASP.NET Core Runtime?
.NET Core runtime (.NET 5 runtime now) can only run your console apps and is lighter.
ASP.NET Core runtime can run your web apps.
There are also runtimes for GUI apps capable of running WinForms and WPF apps (Windows-only).
What is MVC?
Model-View-Controller is a design pattern and it is not related to a specific language or framework.

Was the ability to run a .NET Core app from source code removed?

In previous versions of what is now .NET Core, using the dnx toolchain, it was possible to run an application straight from source code, without compiling to a DLL on disk. This capability was also present on Azure, allowing you to edit code on the server and have those changes reflected in the live site.
The new dotnet CLI run command seems to automatically create the familiar bin and obj folders with compiled DLLs in them, and the publish process from Visual Studio to Azure now no longer includes the C# source, just the DLL.
Is it no longer possible with the new CLI and other tools to run .NET Core code without creating a DLL on disk?
Short David Fowler response:
Dynamic compilation is gone in RC2. It only exists for views now. There are no plans to bring it back.
Why?
Architectural challenges and changes require to implement it on both .NET Framework and .NET Core. We did it with dnx and there were some problems (like some things being completely broken with in memory assemblies) that we chose to just avoid.

Why can't ASP.NET be hosted on a linux server?

ASP.NET is open source so shouldn't it be able to be hosted on any server just like a web app written in any other open source language such as php not limited to a windows server?
ASP.NET Core, the latest version (still in preview) in fact can be run on Linux.
Previous versions of ASP.NET have a dependency on the .NET Framework which only runs on Windows.
Technically, you can via ASP.NET Mono, and in fact Mono has support up to ASP.NET 4.0 and MVC 3.
The limiting factor really is IIS doesn't run on *nix, so you'll not be able to use the configuration aspects of the projects, but you can run the code via Apache modules or FastCGI.
The ASP.NET framework isn't open source (it has too many dependencies on internal code) but ASP.NET MVC and the new .NET Core, and ASP.NET Core releases are.
But just because something's open source, doesn't mean it "runs everywhere" it just means that you have some rights to look at the code, and typically can do things with that - someone still has to write an engine that can interpret and run your code on another operating system.

Do .NET Core apps require the .NET runtime installed on the target machine?

In this video, Scott Hanselman interviews a guy from the ASP.NET team. He says that one of the goals of ASP.NET 5, on top of .NET Core, is that the apps won't depend on the .NET Framework and GAC assemblies on the hosting server. Instead, .NET Core libraries will be released via NuGet packages and apps will be deployed with their dependencies.
One of the reasons for this is so Microsoft can quickly release a bug fix or new feature, and we don't have to wait until the new version (of the full framework) is installed on our hosting environment.
My question is:
Are the apps built on .NET Core really independent of the version of .NET installed on the target machine, and can they run even without the .NET Framework installed?
Yes, the framework you use in your application is completely independent of the .NET Framework installed on the target server, because the Core .NET Framework is referenced via NuGet packages and can be bundled up for deployment via the DNX Utility, specifically of interest to you will be the dnu publish command.
Here is an excerpt, describing what dnu publish does:
Publish (dnu publish)
The publish command will package your application into a self-contained directory that can be launched. It will create the following directory structure:
output/
output/packages
output/appName
output/commandName.cmd
The packages directory contains all the packages your application needs to run.
The appName directory will contain all of your applications code, if you have project references they will appear as their own directory with code at this level as well.
So the .NET Core will exist in the output/packages directory and will not need to be installed on the target server.
A normal .net core app requires that you install .net core on the machine you wish to run the application on. There is a way to avoid this however, by publishing a self contained app. You can publish your app with the requisite version of .net core included. This will make your app larger, but if you only need one application on a machine to run .net, you need a specific version of .net, or you want to make a portable application, this is a good choice.

Web Deployment Projects - Remote IIS Server

Background
In the spirit of continuous integration, I'm trying to automate our deployment process using a Web Deployment Project. Mostly, this has been painless. Most options were baked in and those that weren't were easy to add through the MSBuild XML interface.
However, I cannot seem to find an option for deploying to a remote IIS Server. This seems strange to me because I obviously don't want all my builds to run on my production/staging server.
The Question
How can I set up my Web Deployment project to create/overwrite an IIS Virtual Directory on a remote machine?
Notes
I am using Visual Studio 2008 and .net 3.0.
[Edit]
As suggested by x0n below, I could use MS Deploy for this. I would rather use a Web Deployment Project though, especially since we already have those set up. :)
Your best bet is to take a look at MS Deploy which is available as a stand-alone package right now at RC level. It ships with a Go-Live license, which means it will be compatible with the version shipping with Visual Studio 2010. Some info:
http://blogs.iis.net/msdeploy/default.aspx
It's a great tool - will sync remote servers, farms etc picking up missing metabase info, com objects, registry, .net components in bin or gac, databases - the whole hog. It also ships with an interactive shell and powershell cmdlets.
-Oisin

Resources