.Net Framework required for ClickOnce type installers - vb.net

Could you kindly advise if we need to have .NetFrameWork Installed on Client's computer, if we make setup by using ClickOnce technology?
Thanks

ClickOnce is a part of .NET Framework 2.0 and later, so yes, you need at least .NET Framework 2.0 installed on a machine in order to use it. See also here:
The installation engine for ClickOnce
is in the .NET Frameworks v2.0... as a
result, the .NET Frameworks needs to
be on the machine in order to install
a ClickOnce deployed application. The
Generic Bootstrapper (setup.exe) will
install the .NET Frameworks v2.0
before launching the ClickOnce
application deployment.

Related

How to build application targetting .Net 4/4.5 on CentOs

I have a lot of legacy code that builds fine on Windows with .Net 4.5
I am trying to build the same on CentOS with dotnet-sdk for automation and licensing issues.
Following the Microsoft link after installing the required packages, this command fails
$ dotnet msbuild sharpTest.sln
/usr/share/dotnet/sdk/5.0.301/Microsoft.Common.CurrentVersion.targets(1216,5): error MSB3644: The reference
assemblies for .NETFramework,Version=v4.0 were not found. To resolve this, install the Developer Pack
(SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework
Developer Packs at https://aka.ms/msbuild/developerpacks
Since I installed dotnet-sdk-5, it seems the solution fails to build. But I could not locate .Net framework 4 for CentOS
How do I resolve this ?
It's referencing .NETFramework. .NETFramework V4.0 is not xplat and therefore not available on anything else than windows. You should try to re-target your solution to net5.0 and make it independent of Windows specific dependencies.
To re-target to net5.0 try the dotnet upgrade-assistant (it's a dotnet tool). Do this on a windows machine first. To address any windows dependencies that won't work outside windows or .NetFramework see the Overview of porting from .NET Framework to .NET

Is the .NET Core SDK required for runtime?

I am setting up a Ubuntu machine to deploy a Asp.Net MVC Core app according to the instructions here. In it, it asks for the .NET Core SDK to be installed.
If my server is meant to just run the web application, is it necessary to install the SDK?
Also, if my app is developed in .NET Core 3.0 in Visual Studio, is it ok to have it in a .NET Core 3.1 runtime?
Runtime will be enough to run deployed application https://dotnet.microsoft.com/download/dotnet-core/3.1
In fact you don't even have to do that. Because you can also Publish self-contained package
https://learn.microsoft.com/pl-pl/dotnet/core/deploying/#publish-self-contained
Which will carry all resources needed for runnint your applicaiton on target OS
v3.1 runtime should support your application built in v3.0
From docs;
Install the SDK (which includes the runtime) if you want to develop
.NET Core apps. Or, if you only need to run apps, install the runtime.
If you're installing the runtime, we suggest you install the ASP.NET
Core runtime, as it includes both .NET Core and ASP.NET Core runtimes.
So you do not have to install SDK if you only need to run apps.
You need to install same runtime version as your project (SDK) version

deploying asp.net mvc4 app with EF 5.0

I am pretty new to asp.net mvc development. I have developed an asp.net mvc4 app targeting .NET 4.0 and using EF 5.0 for database connection. Now I want to deploy this app in a Windows 2008 server with IIS 7.5. What are the things I need to make sure that are installed in the server for this application to work properly?
Thanks!
Only two: .NET 4.0 and optionally MVC 4. You can avoid installing MVC 4 if you include binaries in your deployment package.
EF5 you standard .NET 4.0 and for sure you have reference to it, so all needed binaries will be in deployment package
Download MS Web Platform Installer 4.6 if you haven't already on the new Windows 2008 server.
http://www.microsoft.com/web/downloads/platform.aspx
Search for 'Recommended' in the top right search box.
Select and install 'Recommended Server Configuration for Hosting Providers'.
This will install all SQL drivers etc (probably too much in fairness, but in fewer steps) that you need to run .net 4.5 apps, and make it possible to deploy using Web Deploy.
The details of the process can be found in this article
http://www.orcsweb.com/blog/gabe/how-to-install-webdeploy-on-windows-server-2012/

Setup project: Adding .NET and Windows Installer prerequisites results in large installer

I've created my program successfully. Now, I want to publish it. I've created a Setup Project in order to make an installation file. I've added .NET 4.0 Client and Windows Installer as project prerequisites (via Setup Project Properties → Prerequisites). After that, I build my project.
This produces these files:
Setup files, .NET 4.0 Client, Windows Installer
But .NET 4.0 Client and Windows Installer make my project most biggest. So I would like to know if there is a way to make my setup file contain just the required libraries, i.e. the setup program won't install .NET on the target host?
No I don't think so - without the .net framework your are screwed here.
When you do this the .NET framework is not included in the MSI package and doesn't make the file any bigger. It is only a pre-requisite for the successful installation. So when you run the setup on the client computer if it already has the framework installed it won't do anything. If it doesn't it will ask the client to download it. You could of course remove this prerequisite but because your application is built with .NET if the client computer doesn't have the correct version installed your application won't run. So I would suggest you to leave this prerequisite in your setup project.

Why it always report .net core SDK not installed while it already here?

I am going to debug my asp.net core project in the windows server 2012R2 while the VSCode reports this.
Then I installed the .net core SDK.
However, the error above comes again.
Well, in the Programs and Features of Control Panel, it is installed already yet.
It is so strange that in the Powershell of dotnet --info.
It said that no SDKs were found.
Why it turns out to be this?
And how can I install the .net core SDK correctly?
PS: the computer is an X64 system.
I noticed that I have installed both X86/X64 Runtimes.
After I uninstalled the X86 Runtime, it works.