Languages disappearing in VS 2019 - c#

I am brand new to asking questions in SO and I do not really know if this question is meant to be asked here but here i am asking anyways.
I will cut to the chase now.
I am using VS 2019 Community and whenever I install for example .NET for C# development , my C++ disappears and I need to reinstall the whole Desktop Development with C++ package and when that gets done , the .NET development package disappears and needs to be reinstalled to be used again.
Does anyone have an idea on why that happens and how it can be fixed?

Hi and welcome to Stack Overflow. RUn your installer and select modify if you've already got it installed.
You'll arrive at a screen like this (this uses my VS 2019 Preview installation which doesn't have a lot selected.)
When you have arrived at this page, select the workload you want, in this case "Desktop Development with C++". It will show you how much space will be required. On the right, you'll see it show you the details of what it will install, and you can add/remove any specific SDK versions that you may want right there.
The space required will update to reflect your changes and then once you're done. In this case, I selected Windows SDK version 17763 (I only had one other selected on this device).
After this you'll have everything you had before, and the new workload that you have just installed.

Related

Cross-compilation with Visual Studio 2019

I'm using VS2019 under Windows 10 and I'm trying to figure out how to compile for the non-Windows platforms. I'm aware that only some languages support cross-compilation (C# being one of them). So I decided to start off with one of Microsoft's own examples (the Console App for .NET Core). When asking VS2019 to create the Console project, it shows me various image icons which suggest that it'll be buildable for Windows, Linux and macOS - but no matter what I do, I can only make it build the Windows target.
After a bit of research I realized that I need to add this line to my C# project file:-
<RuntimeIdentifiers>win10-x64;osx.10.11-x64;ubuntu.16.10-x64</RuntimeIdentifiers>
but even after adding that line (and re-loading / re-building the project) it staunchly refuses to build anything apart from the Windows target. Over on CodeGuru, one of the devs there tried it for me (under VS2017) and managed to make it work - but I've tried it in VS2019 and also VS2015 and I can't make it work in either of them. Any ideas what I might be doing wrong??
[Edit...]
Thanks Magnetron - if I press Build->Publish I see a totally different dialog from the one you're seeing (and it's the same in both VS2015 and VS2019):-
Even if I follow the Next or Finish buttons I never see the Create Profile option :(
Go to Build > Publish, select Folder and click on Create Profile
Then Click on Edit and change the Deployment Mode to Self-contained. At last, you can specify the target OS in Target Runtime
You can create multiple profiles for each OS, and publish each one individualy as needed.
Edit:
The posted publish dialog is for a .Net Framework Console app, not an .Net Core one. The .Net framework is Windows only, you have to create your project as a .Net Core
Woohoo!! I just ran the VS2019 installer to remind myself how to uninstall (in preparation for tomorrow) and it told me there's already a 16.3.5 available. 16.3.4 only got installed a few hours ago but for the hell of it, I figured I might as well try the newer version - and it's now working !!!

Visual Studio error when I right click UWP project not finding framework

I am having the exact same issue/error as this post from yesterday. Similar SO Post
SIDE NOTE...As you can see, I am new and therefore, only have 45 reputation. As such, I could not simply add a comment to the above existing post and had to create a whole new post even though they are the same issue....seems silly. But I digress....
I wanted to provide additional comments in the hopes to get an answer. My issue started suddenly the a few days ago. I made no major changes to references, VS updates, etc... However, when I right click my csproj in visual studio, I get the error and I have to click it five times before it goes away, at which point I finally get the menu.
Again, I have made no major changes BUT I went ahead and confirmed that:
My target version and Min version is Windows 10(10.0; Build 10586). That is the SDK version that I have installed and am using.
I verified that my NuGet updates are complete and that my Microsoft.NetCore.UniversalWindowsPlatform are installed and update to date (5.2.2 as of now).
I do have a reference also to "Universal Windows". This was created automatically when I created my project and I cannot remove this reference but it is there. When I select it, I do see that it is "UAP,Version=10.0.10586.0" so this should be good. I do notice a possible issue here. Again, this reference was created for me and I cannot remove or change it. However, it is pointed to a folder named
C:\Program Files(x86)\Windows Kits\10\References\Windows.ApplicationModel.Calls.CallsVoipContract\1.0.0.0\
Why did the Windows Universal reference default to that folder and only that folder? I am not using VoIP so I wonder why it chose this one? Also, what if I need some of the other references in the References folder?
I created a brand new Windows Universal project and the same error happens on a fresh project.
Please help, it is annoying. Project still seems to build and work fine though.
Thanks!
I found the issue in my case, it was an extension that I added on to Visual Studio provided by SyncFusion (which their installer actually creates 7 or se extensions in Visual Studio). After troubleshooting my issue and doing some of the same things to resolve (repairing .Net, SDK, Visual Studio) I then thought about the error a bit more. While it is cryptic (and has poor english "An Exception has been occured") these are all clues that it could be any of the frameworks that I have installed via extensions as well.
I also had another clue, the issue started happening a few weeks ago, around the time I updated my SyncFusion controls to the latest version.
So, I went to Tools > Extensions and Updates. I went to Installed > All and found all of the SyncFusion items (there are several) and disabled them all. After I disabled them, and restarted Visual Studio, the problem went away!!!
This is a workaround for now. In the meantime, I put in a support ticket with SyncFusion on the issue. I will certainly update this thread when I get a response from them. Also in the meantime, I then went back and re-enabled each of them again, one at a time, to see who the real culprit was. In my case it was the SyncFusion Web Conversion and Migration extension.
If any of you are not using SyncFusion but having odd Visual Studio issues such as this, I suggest doing something similar by going through your extensions and disable any that you added on, starting with the most recent add ons, especially if they were added around the same time you started having the problem until you find the culprit.
Hope this helps!

What do I really need to install into VS 2015, to create a simple universal app?

I'll try to be concrete so this doesn't get tagged as a discussion question.
I'm a complete programming beginner learning C#, and one exercise includes creating a universal win10 app. Except my version of Visual Studio 2015 doesn't have this type of template pre-installed, so I clicked to download it. Turns out it's 12 Gb.
My question is whether I can opt out of some of the things that Microsoft want to install, specifically "Common tools for Visual C++ 2015". I tried unchecking it, but then it automatically also removed "Tools (1.4) and Windows 10 SDK (10.0.10586)", which seems a lot more important. So maybe I need tools for C++, even though I'm not using C++?
I notice there is another one you can check, called "Windows 10 SDK (10.0.10240)", and I thought perhaps I can choose that one instead. This one allows me to uncheck C++, which gives me back 6Gb of harddrive.
Since I'm just trying to learn, I don't need the app to be compatible with win8, I don't need to emulate a phone or Xbox or what have you. I just need to make an app with a GUI, to see how it's done.

Visual Studio 2015 - Can't create Windows 10 app packages for the Windows Store

Since I installed Visual Studio 2015 Update 2 I can't create any app packages for the Windows Store anymore. The apps are linked to the store and compile without any mistakes, however every time I try to create a store package it fails because "C:\Program Files (x86)\MSBuild\Microsoft.NetNative\x86\ilc\Tools\nutc_driver.exe" returns exit code -1073740791. I've already tried both repairing and reinstalling Visual Studio, I've also reinstalled every single Windows 10 SDK package (10240 as well as 10586.212), but none of these attempts fixed my problem. It doesn't even work with a completely new, empty project.
The weird thing is that I can create packages not linked to the store without any problems, the problem only occurs when I try to create the actual store packages.
I'm running the latest stable release of Windows 10 Pro x64 (10586.212) and never tried the Preview SDK or other sorts of pre-release things with these packages. Also, they're all located on my main partition (C:).
The next thing I'd do is to reinstall Windows 10, however that can't be the only option to fix this issue (supposing it would do). So is there anybody who knows what exactly causes Visual Studio to fail at this point?
Thanks!
Edit: The error is also specified as "ILT0005".
So I've figured out what had caused Visual Studio to fail. Believe it or not - the display language of Visual Studio was the problem. I changed the language from German into English and everything worked just fine afterwards.
However, thanks anyway. And maybe I can reach and help some other people who are struggling with the same bug.

Working with Cocos 2d-x inside of Microsoft Visual Studios Community 2015

To start things off i am an amateur programmer and have basically only used visual studios to make anything i have made in school. C# is what i am familiar with as far as game development goes, and at this point i am trying to develop a game using visual studios & cocos2ds. That i can somehow port over to the Apple App Store.(Stop me if any of this is completely impossible, like i said i am quite new to the whole app development thing)
So I have one Big question that kind of stems off into a few others. Most importantly I currently have Microsoft Visual Studios Community 2015 version, and I would like to use Cocos 2d-x in unison with VS to create an app. I have currently sifted through a lot of different websites and eventually stumbled upon this : https://www.youtube.com/watch?v=xqtT0E68TJM. This guy is the most informative resource i have found for installing Cocos with VS. I followed his entire tutorial to the very end. With a few minor changes.
At the very end of the tutorial you can see he opens the project.sln file in Visual Studios and runs it. This then brings up the little interface with some numbers across the bottom. When i open it in my Visual Studios it says :
"Unable to start program"
C:\Users\guy\Desktop\Personal\Projects\GameTest1\GameTest1\proj.win32\Debug.win32\GameTest1.exe
The system cannot find file specified."
I cant figure out What exactly is going wrong and why mine wont work. Like i said i only changed a few things from the tutorial but that was because it was from years ago, So i had VS 2015 instead of 13 etc. But my changes were as follows:
I updated my Java recently which was up to Java 8. I downloaded the Newest Eclipse from their website and ran it just like in the tutorial ^. But it didn't work so i had to figure out that in order to run .py files like in the tutorial you had to add "python " before the "cocos.py new ......" in order to create a new file. Then it told me that i had to be running Java 1.6 Whilst i was currently running 1.8. So i downloaded an earlier build of Java then used it as the path destination for eclipse. Then aside from that everything built and i ended up with the right files named correctly in the right spot and presumably in the right format. It just gave me that error ^ at the very last step of the tutorial :S.
Firstly - Cocos2d-x uses C++ or Js(i.e. Cocos2d-js) and not C#.
Secondly - Yes you can port your app to apple app store with Cocos2d-x but it can only be done by a mac but not a windows pc .So if you want to port your game to apple devices you must be having a mac.
Thirdly - It doesn't matter if you have installed java unless you are developing for android.If you want to port your game to android then you must have java installed(it doesn't matter if you have latest version or not but you should install greater than v1.5)
Now coming to your problem
Ensure that you have python version2.7 or greater is installed version 3. will not work.
Also ensure that you don't have any spaces in your file path as that may cause error sometimes.
Hope it helps
Lovekesh Garg provided me with a complete, if not incredibly extensive (abundantly helpful) explanation of basically everything i have asked.
I have been pursuing other interest after realizing the expense involved after some investigation so i apologize for the late answer posting :S.

Categories

Resources