AppFabric development on Windows XP? - visual-studio-2010

Installed app fabric x64 on Windows Server 2008.
Copied Microsoft.ApplicationServer.Caching.Client.dll and Microsoft.ApplicationServer.Caching.Core.dll from %windir%\System32\AppFabric ref to Win XP Pro 32-bit dev machine.
Added reference to both these files in project
Added using Microsoft.ApplicationServer.Caching;
Cleaned solution
Receive error: The type or namespace name 'ApplicationServer' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
Any ideas?
Thanks!

Did you verify that you were using .NET framework >= 2.0?
Do not use the client profile for the target framework version. In Visual Studio 2008,
uncheck the Client-only Framework subset checkbox. In Visual Studio 2010, select .NET
Framework versions that do not specify "Client Profile".
See here

Related

Error: this template attempted to load component assembly 'Microsoft.VisualStudio.Universal.TemplateWizards, Version=15.0.0.0

I'm using Visual Studio Community 2017 Version 15.7.1 on Windows 10 Home Version 10.0.16299 32-bit, Windows SDK Version 10.0.17134.12 and C++/WinRT Version 1.0.180505.2. When I try to create a new project using any of C++/WinRT templates, I'm getting this error message:
Error: this template attempted to load component assembly
'Microsoft.VisualStudio.Universal.TemplateWizards, Version=15.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. For more
information on this problem and how to enable this template,
please see documentation on Customizing Project Templates.
Is there an easy fix to this problem?
This error was caused by missing UWP SDK. My first installation of Visual Studio was configured for Desktop development with C++ workfload only, so UWP development workload components were missing. I added UWP development workload using Visual Studio Installer.
This error comes due to absence of UWP tools. For Visual Studio 2019, you simply have to go to Extensions>Manage Extensions>Online and search for "UWP Essentials" then download it for free. Close all Visual Studio windows and then when you open it again, the problem should be solved.
The easiest way to fix this is to install the whole UWP Essentials package. It contains a lot, but it gives you everything to fix the issue. Go to Tools > Extensions and Updates > Online and search for "UWP Essentials", and use the Visual Studio Installer to get it.

error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.5" were not found

I have recently upgraded my Visual Studio environment, and now I seem to have a problem with my .Net framework, as you can see in following error message:
9> C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(1126,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.5" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.
(the number "9" is just a counter of the nineth project within my Visual Studio solution)
Let me explain you what's so confusing about this situation:
When I load my solution, I get following error message:
The C# project ... is targeting ".NETFramework,Version=4.5", which is not installed on this machine. To proceed, select an option below:
Change the target to .NET Framework 4.6.1. You can change back to ".NETFramework,Version=4.5" at a later time.
Download the targeting pack for ".NETFramework,Version=4.5". The project will not change.
Do not load the project.
I choose for the second option, and I get following website: .NET SDKs for Visual Studio
This gives the following: list of .NET Frameworks:
4.7.1 Developer Pack, included in Visual Studio 2017 Runtime Release Details
4.7 Developer Pack, included in Visual Studio 2017 Runtime Release Details
4.6.2 Developer Pack, included in Visual Studio 2017 Runtime Release Details
4.6.1 Developer Pack, included in Visual Studio 2017 Runtime Release Details
4.6 Developer Pack, included in Visual Studio 2017 Runtime Release Details
4.5.2 Developer Pack, included in Visual Studio 2017 Runtime Release Details
3.5 SP1 Developer Pack, included in Visual Studio 2017 Runtime Release Details
=> Where is 4.5?
I have already different times downloaded 4.5.2 version, Developer Pack as well as Runtime, but nothing changes.
So, after a while, I just close the dialog box about the missing target. I'm expecting to get a more readable error message, once I get to the compilation of the project.
Next to that, I've also investigated the installation of my PC (PC settings, Add and Remove Programs), this gives following list:
Microsoft .NET Core SDK - 2.1.4 (x64)
Microsoft .NET Framework 4.5 SDK
Microsoft .NET Framework 4.5.1 Multi-Targeting Pack (ENU)
Microsoft .NET Framework 4.5.1 SDK
Microsoft .NET Framework 4.5.2 Multi-Targeting Pack (ENU)
Microsoft .NET Framework 4.6 Targeting Pack
Microsoft .NET Framework 4.6.2 SDK
Microsoft .NET Framework 4.6.2 Targeting Pack
Microsoft .NET Framework 4.7 SDK
Microsoft .NET Framework 4.7 Targeting Pack
=> Ok, there seems not to be a targeting pack for 4.5 (only the SDK seems to be present), but what to do about it?
The error message speaks about retargeting my application, but that's out of the question: I'm the only person, having this problem, and modifying the configuration of a central application is not a solution.
The error message also speaks about the so-called "Global Assembly Cache" which will be used in place of reference assemblies. So, let's have a look at those things:
I seem to have two reference assemblies on my PC:
C:\Program Files\Reference Assemblies\Microsoft\Framework (seems only to contain "v3.0" and "v3.5" directories)
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.
The latter seems to contain a ".NETFramework" directory, which, at his turn, contains a "v4.5" subdirectory, containing quite some XML files.
The error message however states that those are not used, the "Global Assembly Cache (GAC)" is used instead. If I try finding this, I find references to gacutil, sn -k ... and other programs which are not found on my PC for the specied .Net framework.
If I look, using Google, for "Microsoft .Net Framework 4.5 Targeting Pack" (exact phrase), I get zero results.
So, in other words, I get a message about a missing piece of software on my PC. I get the opportunity to install it but the installation does nothing. Then I get a compilation error about this, which talks about a very general technology which seems not to exist following Google, the mostly used search engine on the internet. It mentions a technology (GAC) which might be used or not and who is found, either on C:\Program Files or C:\Program Files (x86), and its corresponding tool (gacutil) seems only to exist on my PC for other versions.
Can anybody give me a push in the right direction here?
Thanks in advance
Meanwhile I've solved the issue, and it comes down to a general truth in working with computers:
When you have a problem, don't listen to what your computer tells you, but ask yourself what you were doing when the problem arose.
In my case, it means the following:
The problem popped up when I had upgraded my Visual Studio version (using the Visual Studio Installer), so the solution consisted of starting that Visual Studio Installer again, and check some more features to be installed (I've now checked so many of them that I can't figure out which one exactly solved my problem).
The error message, preceeded by the dialog box, were just information about the PC internals which only led to ununderstandable sidetracks.
The boxes that I checked and seemed to work were ASP.NET framework, Office/Sharepoint development, Linux development with C++, and Visual studio extension development, all under workloads. Under the individual packages I checked every single .Net framework SDK and targeting pack.
That worked eventually.
I was getting the same error on my net6 app. The build was happening on the solution and I had a reactApp included in my solution and it was doing a build on that.
I removed any Build & Deploy on that by:
Right click on my solution, -> Properties -> Configuration Properties ->
set Configuration to All Configurations
set Platform to All Platforms
then uncheck reactApp for Build and Deploy.
At the end on my CI/CD pipeline I saw:
The project "reactApp" is not selected for building in solution configuration "Debug|Any CPU".
I had the same issue in azure devops. my build was failing with same error msg. what fixed mine was to install .net Framework 4.8 developer pack. you can download it here
https://dotnet.microsoft.com/en-us/download/visual-studio-sdks?cid=getdotnetsdk

System Namespace not found

I am using using System.Net.Http , It shows
error missing directive or dll
How can I fix in visual studio 2015 Community Edition? Its an universal windows phone project.
Actually I am creating the Universal Windows application.

Deploying to Windows Server 2003

Using visual studio 2013 on a windows 8 machine I created a F# console application. The app runs fine on the dev machine. But when I build a debug release and export it to a windows 2003 server and attempt to run, I continually get the error: not a valid win32 application even though the build configuration is set to "any cpu". Does anyone know how to solve this error? Thanks.
You are probably using .NET Framework 4.5 wich is not compatible with Windows Server 2003.
If you are not using anything from .NET 4.5 you can change on Visual Studio the framework targeted by the application to 4 and then run it on Windows Server 2003.
Also, here is the list of requirements for .NET Framework 4.5
https://msdn.microsoft.com/en-us/library/8z6watww%28v=vs.110%29.aspx

Targeting WP7 async powered projects in Visual Studio 2012

Is it possible to use async stuff in Windows Phone 8.0 SDK (Visual Studio 2012) and still targeting Windows Phone 7.1?
I installed Windows Phone 8.0 SDK and opened my WP7.1 project with references to AsyncCTP nuget package. The following compilation error occurs:
Cannot find all types required by the 'async' modifier. Are you targeting the wrong framework version, or missing a reference to an assembly?
I do not want to drop support of WP7.1, so upgrade to WP8 is not an option.
It is possible using the latest version of the async CTP. You can find it on NuGet at Microsoft.Bcl.Async.
More information on the BCL Team blog: http://blogs.msdn.com/b/bclteam/archive/2012/10/22/using-async-await-without-net-framework-4-5.aspx
Note: The installation of this NuGet package seems a bit random. I had to try twice to make it work.

Resources