Centennial app targeting .net higher than installed - What will happen? - c#

I have .net 4.7.1 installed. What if I build a .net application targeting that version of .net, and then package it as a Centennial app - What if someone with an older version of .net tries to install it (from the Windows Store)?
An official link confirming the answer would be nice, if possible.
EDIT
Since this seems to be unclear. The Windows Store presumably knows about your computer. The question is just what will it do about it. Will it prompt you to install the newer version like Clickonce can do, or just not let you install the app, or something else?

It depends. Keep in mind that Centennial is a bridge.
Centennial apps run on Windows 10 Anniversary edition (10.0; Build 14393) or later. On this Windows version the default installed .NET version is 4.6.2. Windows 10 Creators Update comes with .NET 4.7 by default.
So, if someone downloads your application on Windows 10 Anniversary edition and tries to run it, the following can happen:
.NET 4.6.2 is installed, your application doesn't use anything from .NET 4.7.1: your application works properly
.NET 4.6.2 is installed, your application is using .NET 4.7.1 specific features: your application doesn't work properly
.NET 4.7.1 is installed, your application doesn't use anything form .NET 4.7.1: your application works properly
.NET 4.7.1 is installed, your application is using .NET 4.7.1 specific features: your application works properly
You can apply the same logic for the later versions of Windows 10.
Another interesting option would be to package .NET 4.7.1 along with your application. If I understand it correctly, the Centennial apps have a virtual file system, which is basically merged with the real one. So, you should be able to install .NET 4.7.1 with your application and then package it together with your application. Then it will work on Windows 10 Anniversary edition as well on the later editions.

Related

Application in c# without dot net framework [duplicate]

I am using Visual Studio 2010.
I made a C# project and it runs perfectly on my Computer.
Problem is this that when Application is run on another Computer, that ask for .Net Framework.
Everybody doesn't have administrator Access to install .Net Framework and also peoples don't want to install that.
What alternative i should follow to sort out this problem?
(Specifically for Windows 7).
Windows contains a version of .NET by default. Here's a listing of them.
XP
.NET v1.0 -- Service pack 1
.NET v2.0 -- Service packs 2 & 3
Vista
.NET v3.0 -- All service packs
Windows 7
.NET v3.5 -- All versions and service packs
Windows 8
.NET v4.0 + Metro UI available.
Windows 8.1
.Net v4.5 + Metro UI available.
Windows 10
.Net v4.6 + Metro UI + Universal Apps available.
Note:
All contains .NET v4.6 if Windows Update is enabled. (Not for all versions of windows)
Options of deployment:
There are several options of deployment.
Checking for .NET in installation. (Install systems like NSIS support this).
See this for more info.
If you want to deploy portable app, notify users to install the required .NET version. (easier)
Target .NET 2.0 and all users are able to run your app since I think nobody is using XP SP1. (easiest. I use this to deploy mine.)
EDIT
There needs some clarity with some other answers, so I'm quoting this Wikipedia note.
.NET Framework 1.0 is integral OS component of Windows XP Media Center edition or Tablet PC edition. Installation CDs for the Home editions and the Professional editions of Windows XP SP1, SP2 or SP3 comes with .NET Framework installation packages.
No way! CLR is absolutely needed for managed apps.
The only alternative is to not use a programming language that is based on the .net framework.
If you're writing a c# application, then the .net framework is required.
Perhaps you want to create a c++ application instead?
If you are targeting Windows 7 or later version of the OS, then just compile your program using C# 3.5. The version 3.5 of the framework is part of Windows 7.
I guess you were compiling C# 4.0 code.
Correct me if I am wrong but windows 7 comes with .Net framework installed. Windows Vista comes with installed .net framework and I believe this is valid for windows 7 as well.
And to answer your question - it is not possible to run the exe on a machine that does not have the framework as the program compiles to intermediate language that is only "understandable" by the Common language runtime(CLR)
Yes, there is Spoon (earlier XenoCode) that can wrap everything that your app needs and runs it in as a standalone.
From their site:
Spoon Studio
Easily virtualize all of your applications for instant,
zero-install delivery on Spoon Server and Spoon.net.
Spoon Studio lets you convert your existing software applications into virtual applications
that run with no installs, conflicts, or dependencies.

Which version of .Net Standard should be targeted in a class library that supports a UAP Ver 10 application

I have a game that I programmed using C#/MonoGame. I am currently using Visual Studio 2017 and am targeting release in the Windows App Store. I am planning on having 2 versions of game, one in the Windows App Store and one that does not run on UWP (so can be installed on non Windows 10 machines).
The UWP application is targeting Windows 10 Anniversary Edition
(10.0; Build 14393).
The Non UWP application is targeting .Net
Framework 4.6.2. (I don't need to target this version though. I think
.Net Framework 4.5 or newer would be fine).
The class library is using .NetStandard Version 1.5.
Error Message
'XXX.csproj' targets '.NETStandard,Version=v1.5'. It cannot be referenced by a project that targets 'UAP,Version=v10.0.10586'.
So, I'm having trouble figuring out which version of .Net Standard I need to target in my class library to support UAP ver 10. I'm new to .Net Standard, so the answer is probably simple.
You can find the answer on the .Net Standard GitHub repo. The last supported version in UWP is .NET Standard 1.4, the next version to be implemented is .NET Standard 2.0 which won't be available before the Fall Creators Update (so after the summer) as mentioned at Build 2017.

Can you launch a app C# so it doesn't need the .NET and you don't downgrade the .NET version

I asked this before but if i downgrade to .NET 3.5 I am not able to do some things with the windows form application I get errors because some things that have been added in later versions are not in the version that I am using.
I am making the application for Windows 7.
Link to previous: Can you launch a app C# so it doesn't need the .NET
As C# is essentialy a human-readable version of .NET's intermediate language (IL) you cannot run an application created using C# without .NET runtime installed.
You don't need to downgrade anything - just change target version to 3.5. However, you'll have to stick to features of 3.5 and below in that case.
If you want to use 4.0+ - just make an installer for your app which installs .NET 4.0 runtime alongside.
P.S.
I personally really doubt that there is noticable count of boxes running Windows 7 without at least .NET 4.0.
Just include the required Framework for your application in the Installer. They should be able to run side-by-side.

ClickOnce Deployment .Net Framework 4.6.1 installation error

I have a clickonce application being tested on a virtual machine. This virtual machine is empty and my application requires .Net Framework 4.6.1 on the machine. Now, my application is able to install .Net 4.6.1 but I'm having a weird behavior after install. I'm receiving this message when the application is being open after the installation of .Net 4.6.1.
I added 4.6.1 on my prerequisite by following this guide. How to Create .Net Framework Prerequisites Entry in Microsoft Visual Studio 2015
Here's the message
When I try to run the setup again, the setup process goes through then it launches my application. It seems the setup cannot detect the framework installed right after it install it. Or something went wrong somewhere during the installation. Is there a way to handle this? Any suggestion will be appreciated. Thanks!
The error message says that your application requires CLR 4.0.xxxx. If you specify .NET 4.0 as requirement too ? Maybe you are trying to execute something developped with .NET 4.0 anyway. This could help you :
Backward compatibility and the .NET Framework 4.5 :
The .NET Framework 4.5 and its point releases are backward-compatible with apps that were built with earlier versions of the .NET Framework.In other words, apps and components built with previous versions will work without modification on the .NET Framework 4.5.However, by default, apps run on the version of the common language runtime for which they were developed, so you may have to provide a configuration file to enable your app to run on the .NET Framework 4.5.For more information, see the Version compatibility for apps section earlier in this article.
source

c# app doesn't work on XP

i made a app that uses the watIn library, and target to .NET 3.5 (so it will work on XP to).
after i published the app on my PC, i installed it, and it worked well. but, when i tried it on different PC running XP, it didn't work. i made sure the PC I'm testing on is running .NET 3.5 or grater.
I'm running windows 7 and visual studio 2010.
the program work on Windows 7 (tried that on 2 PC's).
the program doesn't work on XP (tried that on 2 PC's).
On Xp i get this message:
Unable to install or run the application. The application requires that
assembly WindowsBase Version 3.0.0.0 be installed in the Global
Assembly Cache (GAC) first.
Please contact your administrator
my questions:
what should i do to make sure it work on XP?
if i start the development on .net 4, and then switch it to 3.5 and it still run, that mean i only used 3.5 code/features from the get go?
will visual studio give me compile Error if i run 4.0 code on app that i change his properties to target .net 3.5 in the middle of development?
is there a way to install the .net 3.5 framework with my app installer? (if it doesn't already got 1 on the PC)
(sorry for my English)
Make sure that the PC's running XP have .NET installed on them. Windows 7 will already come with the .NET Framework installed, but XP doesn't have the newer versions of the framework.
Also, if your project requires a specific version of the .NET framework, it's good to add it as a prerequisite in your setup installer.
Also, in your build, make sure you're targeting the proper framework.
links:
- http://www.microsoft.com/net/download
- http://www.codeproject.com/Articles/35976/Add-Prerequisites-of-NET-Framework-in-Visual-Studi

Categories

Resources