Visual Studio doesn't detect .net4 on win8 - windows-8

I've a very messy problem! I have installed VS 2013 on my win 7 PC and i'm happy with it!
but i can't use my projects on win 8 because VS doesn't detect .Net 4, e.i. when i open my projects i get an error:
Also i can't create new projects with .Net 4:
I googled around and see some solutions, like dealing with "Turn Windows features on and off",
but none of them helped me.
What should i do?
p.s. 1: I know .NET 4 is installed.
p.s. 2: I HAVE TO use .NET 4, because server admin hasn't upgrade framework!

In your Visual Studio solution, right-click the project and go into properties. Go to target Framework drop down and select 4.0.
Make sure you have this set for either Debug or Release (whichever you are running under).
If this doesn't work, you may need to re-install the framework, which will run fine alongside 4.5.
http://www.microsoft.com/en-au/download/details.aspx?id=17851
Also, it may help to delete the .suo file in the folder of your project in case it has become corrupt. It will be recreated the next time you run VS.
Then open visual studio as administrator and the .suo file will be recreated.

Related

Unable to start program "C:\Program Files\dotnet\dotnet.exe"

I've installed .NET Core 1.0.1 to use with VS 2015 Update 3 and I'm running as Administrator (on Windows 8.1 x64).
If I create any .NET Core project, be it console or web and attempt to run it Visual Studio then comes up with an error:
However I'm unable to ascertain why. VS builds it fine and I can run it from the CLI. I can also run Core fine through VSCode.
I've tried:
Deleting project.lock.json
Deleting the .vs folder
Repairing the .NET Core install
Repairing the VS 2015 install
Uninstalling and reinstalling .NET Core/SDK/Tooling & VS
Rebooting
And it still refuses to work!
I've raised this on the Core Tooling GitHub as well as can be seen here but as yet we're all a little stumped.
There are some people who have problems with Internet Explorer and Visual Studio.
Attempt to install Internet Explorer 9, or set a different default browser.
Other approaches:
Was the data path checked?
Perhaps there are wrong configured environment variables?
Are you sure that the configuration was reset by the installation?
Perhaps the path for the temporary data has been changed?
Try re-installing needed redistributables, as they are needed for executing .Net Core on Windows, as it is stated here :
https://learn.microsoft.com/en-us/dotnet/articles/core/windows-prerequisites
"NET Core requires the VC++ Redistributable when running on Windows"
If it don't work, add a try/catch at the highest level of your application and log all System.Exceptions that may occur. It may give you more informations about this error.
This error occurs if you change the name of the project. To work around this error You will have to delete all files under \object and \bin folders. After that rebuild application.
Restart the visual studio in administrator mode. This solved my problem.

System.NullReferenceException occurs in xaml designer

I've created a C++ UWP Windows 10 app using Visual Studio 2015. However, I'm not able to visualize any xaml in the designer because I'm always getting a System.NullReferenceException error. How can I fix this?
That's very odd but I solved following these steps:
Close any instance of Visual Studio
Open Visual studio and create a new C# UWP empty project (name it as you like, do not matter)
Run the "useless" created project then close it as Visual Studio
Open again your previous C++ UWP project
In my case everything started working!
Switching solution platform to x86 worked for me.
I'm experiencing exactly the same problem on my primary development machine but not on another. The reason is... I think... When I installed Visual Studio 2015 on the 2nd machine, the first time I created a Universal Solution (C#) I was shown a dialog asking me to OK "elevated permissions" (custom permissions) for the VS2015 installation folder. I OK'd it and Designer works on that machine in both Blend2015 and VS2015 (community edition)
On the other machine I was never shown the dialog asking me to confirm elevated permissions and Designer does NOT work on that machine (VS2015 Enterprise). This machine also has VS2013 update 5) on it.
I am thinking that I might have to completely wipe off VS2015 and try to clean the registry of all VS2105 references AND remove the VS2015 installation directories on C:\ AND when I reinstall, create a installation directory with a different name (if I can). What a PAIN though... I'm waiting to see if MS delivers a simple solution since I'm quite positive that this whole issue boils down to a bug (feature... grrr) having to do with custom permissions that can't be changed (or added) after installation.
Would be nice is MS would confirm this...
(please note, none of this involved c++... it was all C#)
Tom
this is the dialog I was shown on the machine where Designer works]1
Installing the Windows Software Development Kit (SDK) for Windows 10 solved the issue for me. It may ask to unistall the previous version of Windows 10 RTM SDK
https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk
This is fixed in Update 1 of Visual Studio 2015
https://www.microsoft.com/en-us/download/details.aspx?id=49989

Visual Studio online build failure for an empty universal app

I just created a new empty universal app (windows 10) and checked it in on my visual studio online project.
The configured build is constantly failing on following error...
The imported project "C:\Program Files
(x86)\MSBuild\Microsoft\WindowsXaml\v14.0\8.2\Microsoft.Windows.UI.Xaml.CSharp.targets"
was not found. Confirm that the path in the declaration is
correct, and that the file exists on disk.
I set build configurations to use VS2015 but without any luck.
I keep thinking there's a simple configuration I'm missing here... but can it also be that it's not yet supported?
The project itself is just the standard template from Visual Studio.
I'm having a similar issue running with MSBuild 8.2 target missing under VS2013 Update 5 under Windows 10 TH1. Except my target is Microsoft.Windows.UI.Xaml.Cpp.targets. So not necessarily an issue with Visual Studio but rather the substitution for $(TargetPlatformVersion) in the targets definition:
<Import Project="$(TargetPlatformVersion)\Microsoft.Windows.UI.Xaml.Cpp.targets" />
I'm building a project from Microsoft (https://github.com/Microsoft/winsdkfb), so I don't think this is your problem (meaning you've not done anything incorrect).
I know this isn't an answer, but I suspect we're caught in a gap in the Windows 10 SDK & Tools. Those aren't scheduled to be complete and available until 29 July even though VS2015 has RTM'd. I tried to track down something in the VS2015 release notes without luck.
Just inform the solution I found on this thread.
At the time of writing, it appeared that VSTO serves were not yet updated with
the Windows 10 SDK.
The only way back then to make it run was by creating your own Build VM (through Windows Azure) and link it to your VSTO builds.
I posted the thread and got the answer on the MSDN TFS forum.
I have not tried it right now, but since Windows 10 is officially released now, I guess it may work out of the box.
We now support building Universal Windows Platform (UWP) projects on the hosted build service.

Can't open project in Visual Studio 2013 Express - Framework issue

So I have a program I've been making in VB for my company through Visual Studio 2013 Express for Desktop and have not worked on it in a couple of months. When I try to open it, I get the following error:
"The VB project "WindowsApplication1" is targeting ".NETFramework,Version=4.5" which is not installed on this machine."
http://imageshack.com/a/img661/6001/DGAfuk.png
I have all of the .NET frameworks installed including all developer and service packs (even language packs). I uninstalled all .NET frameworks and re-installed each of them without any resolution.
I tried to re-install Visual Studio and even tried changing the Framework (one of the options I have) but I cannot view any code or open designer view if I do so. (http://imageshack.com/a/img633/2109/OJaXbr.png)
The strange thing is this computer is the same one I have been developing this application on for months, so I'm not sure what happened over the last 60 days since I launched it.
Does anyone have any clues as to how I can resolve this issue?
Thanks in advance,
Matt
The path to your project must be Les then 256 Character.
That can be the reason of it.
Make sure the path is short "Copy the project to your c drive "C:\ProjectFolder" and try again".

msbuild this application couldn't be started

i've got computer with Windows 8 and fresh installation of Visual Studio 13 Express.
I'm working on project which runs on .NET 4.0 Client profile.
Problem is when i try to complile, this error message is shown:
Solutions:
social.msdn : This one says:
try to restart your VS and rebuild - not working
check MSbuild from promt - not working (Message is shown twice)
I also checked project configuration vsproj and tried to make sample project
Reinstall framework:
i tried ot reinstall almost everything, framework, sdk.
when i've installed .NET Framerork v4.5.2 my VS was unnable to start and anoter .NET apps complied before had missing library
I haven't tried to reinstall VS, yet. (But i dont think if it helps)
Edit: Temporary solution shoud be Visual Studio Express 2012, but it not solves problem.
Reinstalaion of VS didn't help.