.Net framework client profile issue - c#

I have a C# project developed by someone else. When I open it in VS 2013 then it shows message that it is targeting .Net Framework 4.0 client profile which is not installed so either change target to 4.5 or install it 4.0.
I downloaded .Net framework 4.0 client profile and when tried to install it, got error message that a higher version is already available on the system.
How to fix this issue?
Here's the link from where I downloaded the file.
http://www.microsoft.com/en-us/download/details.aspx?id=24872

Related

Building .NET 4.0 project on Windows server 2016, Window 10

We recently need to upgrade our build server from Windows server 2008 to 2016. Because 08 is fading out
As we all know, Windows Server 2016 is installed with .NET Framework 4.6 and from https://learn.microsoft.com/en-us/dotnet/framework/install/on-windows-10
You can only have one version of the .NET Framework 4.x installed on your machine.
You cannot install an earlier version of the .NET Framework on your machine if a later version is already installed.
The case is, we have many projects using
.NET 4.0 with EF 4.4.0.0
.NET 4.5 with EF 5.0.0.0
And some classes such as System.ComponentModel.DataAnnotations.Schema.ColumnAttribute had moved from EF to .NET from EF 4.4.0.0 to .NET 4.5 along the upgrade.
Therefore, missing .NET 4.0 results in:
error CS0433: The type
'System.ComponentModel.DataAnnotations.Schema.ColumnAttribute' exists
in both ...\workspace\....\EntityFramework.dll and
...\Windows\Microsoft.NET\assembly\GAC_MSIL\System.ComponentModel.DataAnnotations\v4.0_4.0.0.0__31bf3856ad364e35\System.ComponentModel.DataAnnotations.dll'
because it trys to use .NET 4.5 with EF 4.4.0.0.
My question is: we don't have resources to ask QA teams to have a full test on every aspects of our applications, but we do need to use the new build server. Do you guys have any other idea / thought thats worth trying so that the it can build?

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

Users of ClickOnce app are redirected from downloading .NET framework 4.6.1 to download 4.6

I just updated app to .net Framework 4.6.1. This app is published with ClickOnce Publish.There is no entry for 4.6.1 in Prerequisites dialogue so I needed to add it manually. I produced these files. App now calls for installing 4.6.1 framework within update. That is ok.
Problem is, there is fwlink in the Package.xml which leads to desired installator, which is not used. Currently users are redirected to page, where is acknowledged something like "App needs .NET Framework 4.6.1 but we recommends you to download .NET Framework 4.6". There are two links, Framework 4.6 and Framwork 4.6.1, both leading to .NET Framework 4.6 Web Installer download page.
I have no experiences with this sort of stuff. Is possible to change this behaviour? It seems Win OS should propose fwlink from Package file. Or does it compose its own link regarding to any other parameters? Alas, I cannot repro this issue, but it seems Microsoft handle this link and redirects users to wrong page.
Thanks for any hint.
Solution was quite simple. Prerequisite settings just didn't refresh. I just selected .NET Framework 4.6 only and then selected back .NET Framework 4.6.1. It seems to be mismatched by sharing this settings via TFS on several computers, when not all of them have modified prerequisite .NET Framework 4.6.1 entry.

C# .net exe running on machine which has visual studio 2010 installed, however it is not responding where only .net 4.0 client profile is installed

My problem is that my C# .Net executable is running on machine which has Visual Studio 2010 installed, however it is not responding where only .Net 4.0 client profile is installed.
What could be the reason? I've tried with dependency walker but couldn't found anything.
While all of the other answers are correct, you might take a look on the "my project" page in your solution. There you can find (and eventually change) the used net versions. That is better than trying all net versions...
The client profile is a small and in most cases insufficient subset of the .NET runtime. Install the full .NET 4.0 runtime instead.
Try installing 4.5 Framework 3.5 and 3.0 frameworks also and see if it works.
http://www.microsoft.com/en-in/download/details.aspx?id=30653
That's because that VS2010 has and supports .NET Framework versions (2.0, 3.0, 3.5, 4.0). So try to instal all of them and also 4.5 Framework on that machine. Also, what you could do is to see on which Framework version have you made your project and you'll know which one you're machine is missing.
Try installing the "Microsoft Visual C++ 2010 Redistributable Package" on the machine where the executable is not working.

Installer installing .NET framework 4 Client Profile even though project targets 3.5 Client Profile

I have a project that I've created in VS 2010. It initially targeted the 4.0 Client Profile framework but I've changed it so it now targets the 3.5 Client Profile framework. Mainly because most of my users will have it installed.
However, when I publish it and run the installer on another machine, it insists on downloading the 4.0 framework client profile.
Any suggestions?
Steve
Go to the project properties : Publish -> Prerequisites and check the version of the framework that you want installed.

Categories

Resources