VS 2012 project load error, incompatible .Net version - c#

I'm getting an error when I try to load a project in VS 2012. This project was created on the same machine and it was working fine but now it has started to complain about project target framework.
From the error message I don't understand the difference between .NETFramework,Version=v4.5 and change target to .Net Framework 4.5
When I choose to download and install .NETFramework,Version=v4.5, the installer says this version is already part of OS and need not be installed separately.
I'm working on VS 2012 on Windows 8 64 bit OS.
Any pointers will be helpful, Thanks

Related

Can't make new project in Visual Studio 2012

Yesterday I installed Visual Studio 2012 Express for Web on Windows 7 Home Premium. When I launched it and trying to set up new project, I wasn't able to do it, because no .Net framework was seen in New Project window. I got message "No framework is selected, you must select one before creating a project". Then I reinstalled twice Visual, but it didn't solve my problem. I also tried to install .Net 4.0 manually, but I got messsage that newer version is already installed, which means that .NET 4.5 framework was installed on my computer during Visual's installation. Is there any possible solution to my issue, beside reinstalling Windows? I would be very grateful for help.

Creating .NET Reference Assemblies directory automatically

We're building a .NET 4.5 application, using VS 2012. On developer machines, where VS 2012 is installed, there are no issues. On machines where this is missing, they get an error while building the project which boils down to:
The reference assemblies for framework ".NETFramework,Version=v4.5" were not found.
I know that if I installed VS 2012 on these other machines, everything will work. I don't want to have to do that. I've tried installing a variety of things, all without any success:
.NET 4.5 SDK
.NET 4.5.1 SDK
MS Build Tools
Visual Studio 2012 SDK
Windows Software Development Kit for Windows 8.1
After picking one machine and installing VS 2012 on it, I did before and after Process Monitor snapshots during a build. The successful machine has this folder C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5, the unsuccessful machine does not.
I can copy the folder from my dev machine onto our build machines and other machines, but is there any thing I can install (short of Visual Studio), that sets this up correctly?
Visual studio 2012 does not packed with .net framework 4.5.
you can download .net framework 4.5 and install it on your machine.

Problems installing Windows SDK 7.1 for dot.net Framework 4.0 / 2 Problems in 1

Since yesterday I try to install Windows SDK 7.1 for dot.net Framework 4.0 on my windows 7 x64
machine. I get everytime the same Error during the installation.
Error message:
"Installation of the "Microsoft WIndows SDK for Windows 7" product has reported the
following error: Please refer to Samples\Setup\HTML\ConfigDetails.htm document for further information"
Thats a pretty unhelpful error message, so I browsed the www about more information and did the suggested steps peoples recommend.
I opened the View Log and get the same return error like others.
"C:\Program Files\Microsoft SDKs\Windows\v7.1\Setup\SFX\vcredist_x86.exe installation failed with the return code 5100"
I tried all that stuff that Microsoft, MSDN and others recommended but nothing works for me.
Stuff i tried to resolve the problem:
Deinstallation of the Document Explorer (recommended by msdn)
Deinstallation of the lastest Microsoft Visual C++ 2010 Redist x64/x86 Versions (microsoft)
Deinstallation of Microsoft Windows SDK Windows 7 (dot.net 3.5)
Installation of Microsoft Windows SDK 8
but like i said nothing helps :/ I get everytime the same Error message during the Installation.
other facts about my system:
I have a lot of several Microsoft Visual C++ 2008 Redist versions on my system
Microsoft Visual C++ Compilers 2008 Standard Edition enu x64/x86
Microsoft Windows SDK for Visual Studio 2008
Background info:
I installed Jenkins as Service on my machine Windows 7 x64. We did a changeover from dot.net Framework 3.5 to dot.net Framework 4.0.
But the problem was that sgen.exe sends an error:
"SGEN : error : An attempt was made to load an assembly with an incorrect format.." (to find in build log).
Windows SDKs containing the sgen.exe in their bin folders like "C:\Program Files\Microsofft SDKs\Windows\v7.0\Bin".
So I thought the SDK is out of date (v7.0a) and i tried to install the Windows SDK v7.1 for dot.net Framework 4.0.
May installing the latest Visual Studio version on my system could help to resolve the problem, because it should simultaneously install Windows SDKs.
But i wouldn't like to install Visual Studio on it to prevent wasting a license because nobody works on this computer.
Solving the Problem by installing .Net 4.5 and SDK 7.0.
Additionally set SdkToolsPath to $(TargetFrameworkSDKToolsDirectory) (find in WINDOWSDIR\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets)
... all in all a strange stituation with the SDK. Leaves a bad feeling.
I had the same problem installing the windows SDK 7.1, vcredist_x86 installation failed although when i looked at the unistall a program tab of the control panel no VC 2010 x86 redist was installed. I also had the windows 7.0 SDK installed. It turns out, there is a registry key describing if and which version of the vc 210 x86 redist is installed:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\VC\VCRedist\x86
The key is Installed
Mine was at 1 even if the uninstall tab did not show it, i set it to 0 it did not solve the problem, but deleting the whole
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\VC\VCRedist\x86
did.
Hope it helps, I recommend you backup your registry before doing that.
I find it deeply astonishing that Microsoft would release a SDK with such a problem.

Visual Studio 2008 compilation works; Same project compiled in 2010 doesn't

Have a project that was created in Visual Studio 2008 and deployed to a 64-bit Windows 2003 server. This application references a 32-bit Interop.ActiveDs.dll. The applications were originally compiled for 'Any CPU', however, explicitly compiling as 'x86' doesn't solve the problem. The project targets the 3.5 framework.
The server is running IIS 6.0 in 64-bit mode. When we deploy the version compiled in Visual Studio 2008, the app runs perfectly fine; all pages show up. In retrospect, this is actually surprising.
We migrated the application to Visual Studio 2010 (we did not change the targeted framework) and redeployed. Now we get a BadImageFormatException loading Interop.ActiveDs.dll. Which actually makes more sense than the 2008 version running.
To solve the problem, we set Enable32bitAppOnWin64 to true and ran aspnet_regiis.exe -i from the 32-bit folder of the 2.0 framework (as per various instructions on the web). In IIS, web service extensions, there were two versions of ASP.NET 2.0, one for 32-bit and one for 64-bit. We prohibited the 64-bit version, restarted IIS, and launched the website.
What we expected: The app to run as 32-bit, load the interop, and display
What we got: "Service Unavailable"
All other web pages that were previously working displayed the same message, as did the Visual Studio 2008 version.
The support page here describes the problem exactly, but tells us to do exactly what we did to resolve the problem (enable 32-bit mode).
We've rolled back to 64-bit mode in IIS and deployed the Visual Studio 2008 version for now, but we really need to figure out how to make this app run and load the interop (there are also 32-bit Oracle DLLs that are referenced)
Two questions:
Why does the Visual Studio 2008 version work at all??
How do we get the Visual Studio 2010 version to work? And what is 2010 doing differently that causes the issue?
Thanks in advance!
James
This can happen if you have one DLL compiled for 64-bit and another in 32-bit. Check through all of your references and look for those that do not have 64-bit versions. If you can't find 64-bit versions of your incompatible DLLs, you will need to compile in 32-bit mode.

Can't convert the PocketPC project in Visual Studio 2010 project format

Just downloaded the Visual Studio 2010 Premium and realized that can't compile the project, made for PDA! The error log in output window says: Loading D:\Work...\PDA2.csproj ...
D:\Work...\PDA2.csproj : error : The project file 'D:\Work...\PDA2.csproj' cannot be opened.
The project type is not supported by this installation. I want to know if mobile development projects are supported in RTM version or they are deprecated?
IT doesn't look like it for devices running versions of Windows Mobile prior to 7.0. For developing apps for earlier devices, such as 6.5, you will need to keep to VS2008 according to MSDN

Categories